Skip to content

Commit c38348d

Browse files
author
Cyrille Favreau
authored
Merge pull request #133 from favreau/master
Notebooks cleanup
2 parents c921a97 + 0c330af commit c38348d

12 files changed

+30
-30
lines changed

bioexplorer/pythonsdk/notebooks/animation/BioExplorer_spike.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
25-
"from bioexplorer import BioExplorer, AnimationParams, MovieMaker, Protein, Sugars, Quaternion\n",
25+
"from bioexplorer import BioExplorer, AnimationParams, MovieMaker, Protein, Sugar, Quaternion\n",
2626
"uri = 'localhost:5000'\n",
2727
"be = BioExplorer(uri)\n",
2828
"core = be.core_api()\n",
@@ -106,7 +106,7 @@
106106
" '''High-mannose'''\n",
107107
" indices = [61, 122, 234, 603, 709, 717, 801, 1074]\n",
108108
"\n",
109-
" high_mannose_glycans = Sugars(\n",
109+
" high_mannose_glycans = Sugar(\n",
110110
" rotation=Quaternion(0.707, 0.0, 0.0, 0.707),\n",
111111
" assembly_name=name, name=be.NAME_GLYCAN_HIGH_MANNOSE, \n",
112112
" protein_name=name, source=high_mannose_paths[0], \n",
@@ -123,7 +123,7 @@
123123
"\n",
124124
" for index in [323, 325]:\n",
125125
" o_glycan_name = name + '_' + be.NAME_GLYCAN_O_GLYCAN + '_' + str(index)\n",
126-
" o_glycan = Sugars(\n",
126+
" o_glycan = Sugar(\n",
127127
" assembly_name=name, name=o_glycan_name, source=o_glycan_paths[0],\n",
128128
" protein_name=protein_name, site_indices=[index],\n",
129129
" representation=glycan_representation,\n",
@@ -136,7 +136,7 @@
136136
" if open_spike:\n",
137137
" indices = [17, 74, 149, 165, 282, 331, 343, 657, 1098, 1134, 1158, 1173, 1194]\n",
138138
"\n",
139-
" complex_glycans = Sugars(\n",
139+
" complex_glycans = Sugar(\n",
140140
" rotation=Quaternion(0.0, 0.0, 0.0, 1.0),\n",
141141
" assembly_name=name, name=be.NAME_GLYCAN_COMPLEX, \n",
142142
" protein_name=name, source=complex_paths[0], \n",

bioexplorer/pythonsdk/notebooks/animation/BioExplorer_virus_entering_cell.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"outputs": [],
2626
"source": [
2727
"from bioexplorer import BioExplorer, Protein, Surfactant, Membrane, Volume, \\\n",
28-
" Cell, Sugars, AnimationParams, Vector2, Vector3, Quaternion, MovieMaker\n",
28+
" Cell, Sugar, AnimationParams, Vector2, Vector3, Quaternion, MovieMaker\n",
2929
"import glob\n",
3030
"\n",
3131
"url = 'localhost:5000'\n",
@@ -226,7 +226,7 @@
226226
" [739, Quaternion(0.707, 0.0, 0.707, 0.0)]]\n",
227227
" for index in indices:\n",
228228
" o_glycan_name = name + '_' + be.NAME_GLYCAN_O_GLYCAN + '_' + str(index[0])\n",
229-
" o_glycan = Sugars(\n",
229+
" o_glycan = Sugar(\n",
230230
" assembly_name=name, name=o_glycan_name, \n",
231231
" source=o_glycan_paths[0],\n",
232232
" protein_name=name + '_' + be.NAME_RECEPTOR, \n",

bioexplorer/pythonsdk/notebooks/animation/BioExplorer_virus_fusion.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
25-
"from bioexplorer import BioExplorer, Protein, Membrane, Cell, Sugars, \\\n",
25+
"from bioexplorer import BioExplorer, Protein, Membrane, Cell, Sugar, \\\n",
2626
" AnimationParams, Vector2, Vector3, Quaternion, MovieMaker\n",
2727
"be = BioExplorer('localhost:5000')\n",
2828
"core = be.core_api()\n",
@@ -151,7 +151,7 @@
151151
" [739, Quaternion(0.707, 0.0, 0.707, 0.0)]]\n",
152152
" for index in indices:\n",
153153
" o_glycan_name = name + '_' + be.NAME_GLYCAN_O_GLYCAN + '_' + str(index[0])\n",
154-
" o_glycan = Sugars(\n",
154+
" o_glycan = Sugar(\n",
155155
" assembly_name=name, name=o_glycan_name, \n",
156156
" source=o_glycan_paths[0],\n",
157157
" protein_name=name + '_' + be.NAME_RECEPTOR, \n",

bioexplorer/pythonsdk/notebooks/assemblies/BioExplorer_ACE2_Receptor.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
25-
"from bioexplorer import BioExplorer, Protein, Sugars, Quaternion, MovieMaker\n",
25+
"from bioexplorer import BioExplorer, Protein, Sugar, Quaternion, MovieMaker\n",
2626
"import os\n",
2727
"\n",
2828
"be = BioExplorer('localhost:5000')\n",
@@ -231,7 +231,7 @@
231231
"outputs": [],
232232
"source": [
233233
"glycan_name = name + '_Complex'\n",
234-
"glycans = Sugars(\n",
234+
"glycans = Sugar(\n",
235235
" rotation=Quaternion(0.707, 0.0, 0.0, 0.707),\n",
236236
" assembly_name=name, name=glycan_name, protein_name=name,\n",
237237
" source=os.path.join(complex_folder, '36.pdb'),\n",

bioexplorer/pythonsdk/notebooks/assemblies/BioExplorer_E_protein.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
25-
"from bioexplorer import BioExplorer, Protein, Sugars, Quaternion\n",
25+
"from bioexplorer import BioExplorer, Protein, Sugar, Quaternion\n",
2626
"be = BioExplorer('localhost:5000')\n",
2727
"be.reset_scene()\n",
2828
"print(be.version())\n",
@@ -136,7 +136,7 @@
136136
"outputs": [],
137137
"source": [
138138
"indices = [48, 66]\n",
139-
"complex_glycans = Sugars(\n",
139+
"complex_glycans = Sugar(\n",
140140
" rotation=Quaternion(0.707, 0.0, 0.0, 0.707),\n",
141141
" assembly_name=name, name=be.NAME_GLYCAN_COMPLEX, \n",
142142
" protein_name=name, source=complex_paths[0], \n",

bioexplorer/pythonsdk/notebooks/assemblies/BioExplorer_M_protein.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
25-
"from bioexplorer import BioExplorer, Protein, Sugars, Quaternion\n",
25+
"from bioexplorer import BioExplorer, Protein, Sugar, Quaternion\n",
2626
"be = BioExplorer('localhost:5000')\n",
2727
"be.reset_scene()\n",
2828
"print(be.version())\n",
@@ -117,7 +117,7 @@
117117
"outputs": [],
118118
"source": [
119119
"indices = [5]\n",
120-
"high_mannose_glycans = Sugars(\n",
120+
"high_mannose_glycans = Sugar(\n",
121121
" rotation=Quaternion(0.707, 0.0, 0.0, 0.707),\n",
122122
" assembly_name=name, name=be.NAME_GLYCAN_HIGH_MANNOSE, \n",
123123
" protein_name=name, source=high_mannose_paths[0], \n",

bioexplorer/pythonsdk/notebooks/assemblies/BioExplorer_full_scene.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"outputs": [],
1919
"source": [
2020
"from bioexplorer import BioExplorer, Protein, Surfactant, Membrane, Volume, \\\n",
21-
" Cell, Sugars, Vector2, Vector3, Quaternion, AnimationParams\n",
21+
" Cell, Sugar, Vector2, Vector3, Quaternion, AnimationParams\n",
2222
"import nglview\n",
2323
"\n",
2424
"be = BioExplorer('localhost:5000')"
@@ -239,7 +239,7 @@
239239
" [739, Quaternion(0.707, 0.0, 0.707, 0.0)]]\n",
240240
"for index in indices:\n",
241241
" o_glycan_name = name + '_' + be.NAME_GLYCAN_O_GLYCAN + '_' + str(index[0])\n",
242-
" o_glycan = Sugars(\n",
242+
" o_glycan = Sugar(\n",
243243
" assembly_name=name, name=o_glycan_name, \n",
244244
" source=o_glycan_paths[0],\n",
245245
" protein_name=name + '_' + be.NAME_RECEPTOR, \n",

bioexplorer/pythonsdk/notebooks/assemblies/BioExplorer_spike.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"metadata": {},
2222
"outputs": [],
2323
"source": [
24-
"from bioexplorer import BioExplorer, Protein, Sugars, Quaternion, MovieMaker\n",
24+
"from bioexplorer import BioExplorer, Protein, Sugar, Quaternion, MovieMaker\n",
2525
"be = BioExplorer()\n",
2626
"core = be.core_api()\n",
2727
"print(be.version())\n",
@@ -145,7 +145,7 @@
145145
"source": [
146146
"indices = [61, 122, 234, 603, 709, 717, 801, 1074]\n",
147147
"\n",
148-
"high_mannose_glycans = Sugars(\n",
148+
"high_mannose_glycans = Sugar(\n",
149149
" rotation=Quaternion(0.707, 0.0, 0.0, 0.707),\n",
150150
" assembly_name=name, name=be.NAME_GLYCAN_HIGH_MANNOSE, \n",
151151
" protein_name=name, source=high_mannose_paths[0], \n",
@@ -176,7 +176,7 @@
176176
" \n",
177177
"for index in [323, 325]:\n",
178178
" o_glycan_name = name + '_' + be.NAME_GLYCAN_O_GLYCAN + '_' + str(index)\n",
179-
" o_glycan = Sugars(\n",
179+
" o_glycan = Sugar(\n",
180180
" assembly_name=name, name=o_glycan_name, source=o_glycan_paths[0],\n",
181181
" protein_name=protein_name, site_indices=[index],\n",
182182
" representation=glycan_representation)\n",
@@ -201,7 +201,7 @@
201201
"if open_spike:\n",
202202
" indices = [17, 74, 149, 165, 282, 331, 343, 657, 1098, 1134, 1158, 1173, 1194]\n",
203203
"\n",
204-
"complex_glycans = Sugars(\n",
204+
"complex_glycans = Sugar(\n",
205205
" rotation=Quaternion(0.0, 0.0, 0.0, 1.0),\n",
206206
" assembly_name=name, name=be.NAME_GLYCAN_COMPLEX, \n",
207207
" protein_name=name, source=complex_paths[0], \n",
@@ -439,7 +439,7 @@
439439
"\n",
440440
"indices = [modified_aa_index]\n",
441441
"glycan_variant_name = be.NAME_GLYCAN_COMPLEX + '_variant'\n",
442-
"complex_glycans = Sugars(\n",
442+
"complex_glycans = Sugar(\n",
443443
" assembly_name=name, name=glycan_variant_name,\n",
444444
" protein_name=name, source=complex_paths[0], \n",
445445
" site_indices=indices,\n",

bioexplorer/pythonsdk/notebooks/assemblies/BioExplorer_spike_and_ACE2_receptor.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"metadata": {},
1515
"outputs": [],
1616
"source": [
17-
"from bioexplorer import BioExplorer, Protein, Membrane, Cell, Sugars, \\\n",
17+
"from bioexplorer import BioExplorer, Protein, Membrane, Cell, Sugar, \\\n",
1818
" AnimationParams, Vector2, Vector3, Quaternion, MovieMaker\n",
1919
"\n",
2020
"be = BioExplorer('localhost:5000')\n",
@@ -208,7 +208,7 @@
208208
" [730, Quaternion(0.0, 0.707, 0.0, 0.707)]]\n",
209209
"for index in indices:\n",
210210
" o_glycan_name = name + '_' + be.NAME_GLYCAN_O_GLYCAN + '_' + str(index[0])\n",
211-
" o_glycan = Sugars(\n",
211+
" o_glycan = Sugar(\n",
212212
" assembly_name=name, name=o_glycan_name, \n",
213213
" source=o_glycan_paths[0],\n",
214214
" protein_name=name + '_' + be.NAME_RECEPTOR, \n",

bioexplorer/pythonsdk/notebooks/scenarios/high_glucose/BioExplorer_high_glucose_scenario.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"outputs": [],
3232
"source": [
33-
"from bioexplorer import BioExplorer, Protein, Surfactant, Membrane, Cell, Sugars, \\\n",
33+
"from bioexplorer import BioExplorer, Protein, Surfactant, Membrane, Cell, Sugar, \\\n",
3434
" Volume, AnimationParams, Vector2, Vector3, Quaternion\n",
3535
"import nglview\n",
3636
"\n",
@@ -305,7 +305,7 @@
305305
" [730, Quaternion(0.707, 0.0, 0.707, 0.0)]]\n",
306306
" for index in indices:\n",
307307
" o_glycan_name = name + '_' + be.NAME_GLYCAN_O_GLYCAN + '_' + str(index[0])\n",
308-
" o_glycan = Sugars(\n",
308+
" o_glycan = Sugar(\n",
309309
" assembly_name=name, name=o_glycan_name, source=o_glycan_paths[0],\n",
310310
" protein_name=name + '_' + be.NAME_RECEPTOR, representation=glycan_representation,\n",
311311
" chain_ids=[2, 4], site_indices=[index[0]], rotation=index[1])\n",
@@ -437,7 +437,7 @@
437437
"def add_glucose_to_surfactant_head(name):\n",
438438
" for index in [321, 323]:\n",
439439
" glucose_name = name + '_' + be.NAME_GLUCOSE + '_' + str(index)\n",
440-
" glucose = Sugars(\n",
440+
" glucose = Sugar(\n",
441441
" assembly_name=name, name=glucose_name, source=glucose_path,\n",
442442
" protein_name=name + '_' + be.NAME_SURFACTANT_HEAD, \n",
443443
" representation=glycan_representation, site_indices=[index])\n",

bioexplorer/pythonsdk/notebooks/scenarios/low_glucose/BioExplorer_low_glucose_scenario.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"outputs": [],
3232
"source": [
33-
"from bioexplorer import BioExplorer, Protein, Surfactant, Membrane, Cell, Sugars, \\\n",
33+
"from bioexplorer import BioExplorer, Protein, Surfactant, Membrane, Cell, Sugar, \\\n",
3434
" Volume, AnimationParams, Vector2, Vector3, Quaternion\n",
3535
"import nglview\n",
3636
"\n",
@@ -318,7 +318,7 @@
318318
" [730, Quaternion(0.707, 0.0, 0.707, 0.0)]]\n",
319319
" for index in indices:\n",
320320
" o_glycan_name = name + '_' + be.NAME_GLYCAN_O_GLYCAN + '_' + str(index[0])\n",
321-
" o_glycan = Sugars(\n",
321+
" o_glycan = Sugar(\n",
322322
" assembly_name=name, name=o_glycan_name, source=o_glycan_paths[0],\n",
323323
" protein_name=name + '_' + be.NAME_RECEPTOR, representation=glycan_representation,\n",
324324
" chain_ids=[2, 4], site_indices=[index[0]], rotation=index[1])\n",

bioexplorer/pythonsdk/notebooks/utils/BioExplorer_drop_virus_on_receptor.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"outputs": [],
3232
"source": [
33-
"from bioexplorer import BioExplorer, MovieMaker, Protein, ParametricMembrane, Cell, Sugars, \\\n",
33+
"from bioexplorer import BioExplorer, MovieMaker, Protein, ParametricMembrane, Cell, Sugar, \\\n",
3434
" Vector2, Vector3, Quaternion\n",
3535
"\n",
3636
"hostname = 'localhost:5000'\n",
@@ -201,7 +201,7 @@
201201
" [730, Quaternion(0.707, 0.0, 0.707, 0.0)]]\n",
202202
" for index in indices:\n",
203203
" o_glycan_name = name + '_' + be.NAME_GLYCAN_O_GLYCAN + '_' + str(index[0])\n",
204-
" o_glycan = Sugars(\n",
204+
" o_glycan = Sugar(\n",
205205
" assembly_name=name, name=o_glycan_name, source=o_glycan_paths[0],\n",
206206
" protein_name=name + '_' + be.NAME_RECEPTOR, representation=glycan_representation,\n",
207207
" chain_ids=[2, 4], site_indices=[index[0]], rotation=index[1])\n",

0 commit comments

Comments
 (0)