Commit
·
7bafb03
1
Parent(s):
105a853
Update main.py
Browse files
main.py
CHANGED
|
@@ -180,11 +180,18 @@ def predict(pdb_code, pdb_file):
|
|
| 180 |
data = []
|
| 181 |
|
| 182 |
|
| 183 |
-
for i in range(
|
| 184 |
-
|
| 185 |
|
| 186 |
-
|
| 187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
|
| 189 |
pdb = open(pdb_file.name, "r").read()
|
| 190 |
|
|
|
|
| 180 |
data = []
|
| 181 |
|
| 182 |
|
| 183 |
+
for i in range(10):
|
| 184 |
+
view.addSphere({'center':{'x':atoms_protein.iloc[topN_ind[i], atoms_protein.columns.get_loc("x")], 'y':atoms_protein.iloc[topN_ind[i], atoms_protein.columns.get_loc("y")],'z':atoms_protein.iloc[topN_ind[i], atoms_protein.columns.get_loc("z")]},'radius':adaptability[topN_ind[i]]/1.5,'color':'orange','alpha':0.75})
|
| 185 |
|
| 186 |
+
# Add lighting and shading options to the view object:
|
| 187 |
+
view.setStyle({'stick': {'colorscheme': {'prop': 'resi', 'C': 'turquoise'}}})
|
| 188 |
+
view.setStyle({'sphere': {}})
|
| 189 |
+
view.addLight([0, 0, 10], [1, 1, 1], 1) # Add directional light from the z-axis
|
| 190 |
+
view.setSpecular(0.5) # Adjust the specular lighting effect
|
| 191 |
+
view.setAmbient(0.5) # Adjust the ambient lighting effect
|
| 192 |
+
|
| 193 |
+
#topN = 100
|
| 194 |
+
#topN_ind = np.argsort(adaptability)[::-1][:topN]
|
| 195 |
|
| 196 |
pdb = open(pdb_file.name, "r").read()
|
| 197 |
|