ChemDoodleWeb und Ghost

Darstellung von Molekülen (2D/3D)

ChemDoodleWeb und Ghost

ChemDoodleWeb ist eine JavaScript-Bibliothek mit dem Schwerpunkt auf der Darstellung von Molekülen in 2- oder 3-dimensionaler Repräsentation.

Da ChemDoodleWeb nicht als CDN (Content Delivery Network) zur Verfügung steht, wurde diese Bibliothek als statischer Inhalt per nginx eingebunden. Details zu dieser Konfiguration findet man in diesem Posting.

   ...
    location /static/ {
        alias /var/www/ghost/;
    }
    ...

Per Code injection werden dann die lokalen Abhängigkeiten in den Eigenschaften eines Postings eingebunden.

<link rel="stylesheet" href="https://flutterdev.at/static/chemdoodle/ChemDoodleWeb.css" type="text/css">
<script type="text/javascript" src="https://flutterdev.at/static/chemdoodle/ChemDoodleWeb.js"></script>

Folgende Beispiele wurden von ChemDoodleWeb entnommen:

<script>
  let f = 2;  
  let viewACS = new ChemDoodle.ViewerCanvas('viewACS', 200, 200);
  viewACS.styles.bonds_width_2D = .6 * f;
  viewACS.styles.bonds_saturationWidthAbs_2D = 2.6 * f;
  viewACS.styles.bonds_hashSpacing_2D = 2.5 * f;
  viewACS.styles.atoms_font_size_2D = 10 * f;
  viewACS.styles.atoms_font_families_2D = ['Helvetica', 'Arial', 'sans-serif'];
  viewACS.styles.atoms_displayTerminalCarbonLabels_2D = true;
  let caffeineMolFile = 'Molecule Name\n  CHEMDOOD08070920033D 0   0.00000     0.00000     0\n[Insert Comment Here]\n 14 15  0  0  0  0  0  0  0  0  1 V2000\n   -0.3318    2.0000    0.0000   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -0.3318    1.0000    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n   -1.1980    0.5000    0.0000   N 0  0  0  1  0  0  0  0  0  0  0  0\n    0.5342    0.5000    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n   -1.1980   -0.5000    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n   -2.0640    1.0000    0.0000   C 0  0  0  4  0  0  0  0  0  0  0  0\n    1.4804    0.8047    0.0000   N 0  0  0  1  0  0  0  0  0  0  0  0\n    0.5342   -0.5000    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n   -2.0640   -1.0000    0.0000   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -0.3318   -1.0000    0.0000   N 0  0  0  1  0  0  0  0  0  0  0  0\n    2.0640   -0.0000    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n    1.7910    1.7553    0.0000   C 0  0  0  4  0  0  0  0  0  0  0  0\n    1.4804   -0.8047    0.0000   N 0  0  0  1  0  0  0  0  0  0  0  0\n   -0.3318   -2.0000    0.0000   C 0  0  0  4  0  0  0  0  0  0  0  0\n  1  2  2  0  0  0  0\n  3  2  1  0  0  0  0\n  4  2  1  0  0  0  0\n  3  5  1  0  0  0  0\n  3  6  1  0  0  0  0\n  7  4  1  0  0  0  0\n  4  8  2  0  0  0  0\n  9  5  2  0  0  0  0\n 10  5  1  0  0  0  0\n 10  8  1  0  0  0  0\n  7 11  1  0  0  0  0\n  7 12  1  0  0  0  0\n 13  8  1  0  0  0  0\n 13 11  2  0  0  0  0\n 10 14  1  0  0  0  0\nM  END\n> \n07-08-2009\n';
  let caffeine = ChemDoodle.readMOL(caffeineMolFile);
  caffeine.scaleToAverageBondLength(14.4 * f);
  viewACS.loadMolecule(caffeine);
</script>

<script>
  let rotate2D = new ChemDoodle.RotatorCanvas('rotate2D', 300, 300);
  rotate2D.styles.atoms_useJMOLColors = true;
  rotate2D.styles.atoms_displayTerminalCarbonLabels_2D = true;
  let exampleMolFile = 'Molecule Name\n  CHEMDOOD08070920113D 0   0.00000     0.00000     0\n[Insert Comment Here]\n 42 47  0  0  0  0  0  0  0  0  1 V2000\n    2.5688   -1.4702    0.0000   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -1.3587    0.4207    0.0000   O 0  0  0  1  0  0  0  0  0  0  0  0\n    7.1400   -0.8173    0.0000   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -4.3466    0.6451    0.0000   N 0  0  0  1  0  0  0  0  0  0  0  0\n   -4.5151    1.6308    0.0000   N 0  0  0  1  0  0  0  0  0  0  0  0\n   -2.8921   -0.3846    0.0000   N 0  0  0  2  0  0  0  0  0  0  0  0\n   -1.4280   -1.3100    0.0000   N 0  0  0  2  0  0  0  0  0  0  0  0\n    5.6867    0.1250    0.0000   N 0  0  0  2  0  0  0  0  0  0  0  0\n    4.5987   -1.5532    0.0000   N 0  0  0  1  0  0  0  0  0  0  0  0\n    4.2288    1.1115    0.0000   N 0  0  0  1  0  0  0  0  0  0  0  0\n   -3.4856    3.0853    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n   -3.6298    2.0957    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n   -3.3412    4.0748    0.0000   C 0  0  0  4  0  0  0  0  0  0  0  0\n   -4.4751    3.2295    0.0000   C 0  0  0  4  0  0  0  0  0  0  0  0\n   -2.4960    2.9409    0.0000   C 0  0  0  4  0  0  0  0  0  0  0  0\n   -2.9141    1.3973    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -3.3571    0.5008    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n   -5.0449   -0.0706    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n   -6.0140    0.1763    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -4.7742   -1.0333    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -1.8929   -0.4246    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n   -0.4288   -1.3500    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n    0.0361   -2.2353    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n    1.0353   -2.2754    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n   -6.7123   -0.5395    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -5.4727   -1.7490    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -6.4416   -1.5021    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n    1.5696   -1.4301    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n    0.1055   -0.5047    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n    1.1046   -0.5448    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -0.5340   -3.1071    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n    1.5338   -3.1900    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -7.1400   -2.2179    0.0000   C 0  0  0  4  0  0  0  0  0  0  0  0\n   -0.0568   -4.0331    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n    0.9840   -4.0748    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n    3.1030   -0.6249    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n    4.1440   -0.6625    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n    4.6880    0.1766    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n    2.6224    0.2992    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n    3.1890    1.1732    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n    6.1413   -0.7658    0.0000   C 0  0  0  1  0  0  0  0  0  0  0  0\n    5.5973   -1.6048    0.0000   C 0  0  0  2  0  0  0  0  0  0  0  0\n  1 28  1  0  0  0  0\n  1 36  1  0  0  0  0\n  2 21  2  0  0  0  0\n  3 41  2  0  0  0  0\n  4  5  1  0  0  0  0\n  4 17  1  0  0  0  0\n  4 18  1  0  0  0  0\n  5 12  2  0  0  0  0\n  6 17  1  0  0  0  0\n  6 21  1  0  0  0  0\n  7 21  1  0  0  0  0\n  7 22  1  0  0  0  0\n  8 38  1  0  0  0  0\n  8 41  1  0  0  0  0\n  9 37  1  0  0  0  0\n  9 42  2  0  0  0  0\n 10 38  2  0  0  0  0\n 10 40  1  0  0  0  0\n 11 12  1  0  0  0  0\n 11 13  1  0  0  0  0\n 11 14  1  0  0  0  0\n 11 15  1  0  0  0  0\n 12 16  1  0  0  0  0\n 16 17  2  0  0  0  0\n 18 19  2  0  0  0  0\n 18 20  1  0  0  0  0\n 19 25  1  0  0  0  0\n 20 26  2  0  0  0  0\n 22 23  1  0  0  0  0\n 22 29  2  0  0  0  0\n 23 24  1  0  0  0  0\n 23 31  2  0  0  0  0\n 24 28  1  0  0  0  0\n 24 32  2  0  0  0  0\n 25 27  2  0  0  0  0\n 26 27  1  0  0  0  0\n 27 33  1  0  0  0  0\n 28 30  2  0  0  0  0\n 29 30  1  0  0  0  0\n 31 34  1  0  0  0  0\n 32 35  1  0  0  0  0\n 34 35  2  0  0  0  0\n 36 37  2  0  0  0  0\n 36 39  1  0  0  0  0\n 37 38  1  0  0  0  0\n 39 40  2  0  0  0  0\n 41 42  1  0  0  0  0\nM  END\n';
  let mol = ChemDoodle.readMOL(exampleMolFile);
  rotate2D.loadMolecule(mol);
  rotate2D.startAnimation();
</script>

<script>
  let transform = new ChemDoodle.TransformCanvas('transform1', 350, 200, true);
  transform.styles.atoms_useJMOLColors = true;
  transform.styles.bonds_splitColor = true;
  transform.styles.bonds_width_2D = 3;
  transform.styles.atoms_display = false;
  transform.styles.backgroundColor = 'black';
  transform.styles.bonds_clearOverlaps_2D = true;
  let exampleMolFile2 = 'Molecule from ChemDoodle Web Components\n  CHEMDOOD09200912563D 0   0.00000     0.00000     0\nhttps://www.ichemlabs.com\n143159  0  0  0  0  0  0  0  0  1 V2000\n    7.0719   -2.5140   -2.1887   P 0  0  0  1  0  0  0  0  0  0  0  0\n    7.6261   -2.8751   -3.1673   O 0  0  0  2  0  0  0  0  0  0  0  0\n    6.8896   -3.3511   -1.3702   O 0  0  0  2  0  0  0  0  0  0  0  0\n    5.9672   -1.9548   -2.5226   O 0  0  0  1  0  0  0  0  0  0  0  0\n    5.9787   -1.0952   -3.2982   C 0  0  0  3  0  0  0  0  0  0  0  0\n    4.8588   -0.6687   -3.3297   C 0  0  0  2  0  0  0  0  0  0  0  0\n    4.5707   -0.4674   -2.2421   O 0  0  0  1  0  0  0  0  0  0  0  0\n    4.0169   -1.4561   -3.7312   C 0  0  0  2  0  0  0  0  0  0  0  0\n    3.6079   -1.1882   -4.7812   O 0  0  0  1  0  0  0  0  0  0  0  0\n    3.2036   -1.5111   -2.8086   C 0  0  0  3  0  0  0  0  0  0  0  0\n    3.4337   -0.4676   -2.2255   C 0  0  0  2  0  0  0  0  0  0  0  0\n    3.1406   -0.4658   -1.0713   N 0  0  0  1  0  0  0  0  0  0  0  0\n    2.4718    0.3016   -0.6795   C 0  0  0  2  0  0  0  0  0  0  0  0\n    2.0473    0.9526   -1.2803   O 0  0  0  2  0  0  0  0  0  0  0  0\n    2.3230    0.3665    0.3983   N 0  0  0  2  0  0  0  0  0  0  0  0\n    2.7984   -0.3286    1.0966   C 0  0  0  2  0  0  0  0  0  0  0  0\n    2.6418   -0.1840    2.0592   O 0  0  0  2  0  0  0  0  0  0  0  0\n    3.4467   -1.1427    0.6859   C 0  0  0  2  0  0  0  0  0  0  0  0\n    3.9735   -1.9483    1.4138   C 0  0  0  4  0  0  0  0  0  0  0  0\n    3.6350   -1.1829   -0.4133   C 0  0  0  3  0  0  0  0  0  0  0  0\n    2.5985   -1.7895   -5.2921   P 0  0  0  1  0  0  0  0  0  0  0  0\n    2.6339   -1.6747   -6.4614   O 0  0  0  2  0  0  0  0  0  0  0  0\n    2.5062   -2.8925   -4.8821   O 0  0  0  2  0  0  0  0  0  0  0  0\n    1.6472   -1.0625   -4.8611   O 0  0  0  1  0  0  0  0  0  0  0  0\n    1.6316    0.0605   -5.1225   C 0  0  0  3  0  0  0  0  0  0  0  0\n    0.6421    0.5261   -4.6163   C 0  0  0  2  0  0  0  0  0  0  0  0\n    0.6979    0.3313   -3.4884   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -0.4205    0.0611   -4.9817   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -1.1529    0.8834   -5.3020   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -0.7717   -0.6094   -4.0175   C 0  0  0  3  0  0  0  0  0  0  0  0\n   -0.3589    0.0888   -3.1179   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -0.2045   -0.5066   -2.0923   N 0  0  0  1  0  0  0  0  0  0  0  0\n   -0.6184   -0.0964   -1.1664   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -1.1982    0.6960   -1.2185   O 0  0  0  2  0  0  0  0  0  0  0  0\n   -0.3796   -0.5477   -0.2250   N 0  0  0  2  0  0  0  0  0  0  0  0\n    0.2423   -1.4123   -0.1841   C 0  0  0  2  0  0  0  0  0  0  0  0\n    0.4830   -1.8517    0.7807   N 0  0  0  3  0  0  0  0  0  0  0  0\n    0.6488   -1.8827   -1.1129   C 0  0  0  3  0  0  0  0  0  0  0  0\n    0.4176   -1.4045   -2.0914   C 0  0  0  3  0  0  0  0  0  0  0  0\n   -2.1202    0.6268   -6.1059   P 0  0  0  1  0  0  0  0  0  0  0  0\n   -2.3471    1.6331   -6.7000   O 0  0  0  2  0  0  0  0  0  0  0  0\n   -1.8968   -0.3632   -6.7263   O 0  0  0  2  0  0  0  0  0  0  0  0\n   -3.0963    0.3772   -5.3217   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -3.5307    1.2257   -4.6755   C 0  0  0  3  0  0  0  0  0  0  0  0\n   -4.2723    0.7226   -3.8809   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -3.6236    0.1398   -3.1369   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -5.0743   -0.0989   -4.3085   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -6.0735   -0.0125   -3.7683   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -4.5155   -1.1495   -4.0554   C 0  0  0  3  0  0  0  0  0  0  0  0\n   -4.1821   -0.8325   -2.9437   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -3.4419   -1.5881   -2.4247   N 0  0  0  1  0  0  0  0  0  0  0  0\n   -2.7621   -2.3319   -2.8467   C 0  0  0  3  0  0  0  0  0  0  0  0\n   -2.2269   -2.8749   -2.0916   N 0  0  0  2  0  0  0  0  0  0  0  0\n   -2.5871   -2.4460   -1.1693   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -2.3082   -2.6874   -0.0898   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -1.6635   -3.3466    0.2495   O 0  0  0  2  0  0  0  0  0  0  0  0\n   -2.8640   -2.0560    0.6116   N 0  0  0  2  0  0  0  0  0  0  0  0\n   -3.5980   -1.2882    0.3640   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -4.0636   -0.7411    1.1802   N 0  0  0  3  0  0  0  0  0  0  0  0\n   -3.8537   -1.0579   -0.6400   N 0  0  0  2  0  0  0  0  0  0  0  0\n   -3.3162   -1.6598   -1.3484   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -7.0565    0.5587   -4.3489   P 0  0  0  1  0  0  0  0  0  0  0  0\n   -6.6786    1.4724   -5.0013   O 0  0  0  2  0  0  0  0  0  0  0  0\n   -7.6541   -0.2918   -4.9131   O 0  0  0  2  0  0  0  0  0  0  0  0\n   -7.7045    1.0431   -3.3640   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -7.2737    1.9754   -2.8232   C 0  0  0  3  0  0  0  0  0  0  0  0\n   -7.4238    1.8492   -1.6302   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -6.8328    0.9220   -1.3184   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -8.5545    1.6618   -1.2146   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -8.7982    2.2993   -0.2857   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -8.5740    0.4539   -1.0274   C 0  0  0  3  0  0  0  0  0  0  0  0\n   -7.4595    0.3189   -0.5742   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -7.0601   -0.7911   -0.6832   N 0  0  0  1  0  0  0  0  0  0  0  0\n   -6.7102   -1.3179    0.1996   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -6.7918   -0.8622    1.0660   O 0  0  0  2  0  0  0  0  0  0  0  0\n   -6.2718   -2.2902    0.1037   N 0  0  0  2  0  0  0  0  0  0  0  0\n   -6.1789   -2.7503   -0.8565   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -5.6859   -3.7188   -0.9565   N 0  0  0  3  0  0  0  0  0  0  0  0\n   -6.5471   -2.2444   -1.7740   C 0  0  0  3  0  0  0  0  0  0  0  0\n   -6.9972   -1.2322   -1.6722   C 0  0  0  3  0  0  0  0  0  0  0  0\n  -10.0191    2.4772    0.0451   P 0  0  0  1  0  0  0  0  0  0  0  0\n  -10.1154    3.4864    0.6582   O 0  0  0  2  0  0  0  0  0  0  0  0\n  -10.6848    2.3727   -0.9237   O 0  0  0  2  0  0  0  0  0  0  0  0\n  -10.2838    1.5012    0.8292   O 0  0  0  1  0  0  0  0  0  0  0  0\n   -9.9801    1.5440    1.9435   C 0  0  0  3  0  0  0  0  0  0  0  0\n  -10.2734    0.4715    2.4029   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -9.6941   -0.2921    1.7917   O 0  0  0  1  0  0  0  0  0  0  0  0\n  -11.4477    0.0987    2.3121   C 0  0  0  2  0  0  0  0  0  0  0  0\n  -12.0015    0.0697    3.3195   O 0  0  0  2  0  0  0  0  0  0  0  0\n  -11.3495   -1.0021    1.7753   C 0  0  0  3  0  0  0  0  0  0  0  0\n  -10.1949   -1.2850    2.0237   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -9.7538   -2.0437    1.2383   N 0  0  0  1  0  0  0  0  0  0  0  0\n   -9.9025   -2.0538    0.1524   C 0  0  0  3  0  0  0  0  0  0  0  0\n   -9.3739   -2.8536   -0.3264   N 0  0  0  2  0  0  0  0  0  0  0  0\n   -8.8709   -3.3560    0.4858   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -8.1620   -4.2550    0.4621   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -7.8509   -4.7816   -0.3093   O 0  0  0  2  0  0  0  0  0  0  0  0\n   -7.8379   -4.5348    1.4730   N 0  0  0  2  0  0  0  0  0  0  0  0\n   -8.1143   -4.0515    2.4074   C 0  0  0  2  0  0  0  0  0  0  0  0\n   -7.7313   -4.4884    3.3256   N 0  0  0  3  0  0  0  0  0  0  0  0\n   -8.7482   -3.1922    2.4306   N 0  0  0  2  0  0  0  0  0  0  0  0\n   -9.0883   -2.8911    1.4478   C 0  0  0  2  0  0  0  0  0  0  0  0\n   11.0059    1.8418    6.0605   P 0  0  0  1  0  0  0  0  0  0  0  0\n   12.0015    1.2269    6.2218   O 0  0  0  2  0  0  0  0  0  0  0  0\n   10.0975    1.6310    6.7842   O 0  0  0  2  0  0  0  0  0  0  0  0\n   10.6356    1.6264    4.8611   O 0  0  0  1  0  0  0  0  0  0  0  0\n   11.4169    1.5998    4.0229   C 0  0  0  3  0  0  0  0  0  0  0  0\n   10.7892    1.3892    3.0317   C 0  0  0  2  0  0  0  0  0  0  0  0\n    9.9439    2.1584    3.0501   O 0  0  0  1  0  0  0  0  0  0  0  0\n   10.2435    0.3014    2.9561   C 0  0  0  2  0  0  0  0  0  0  0  0\n   10.5940   -0.2968    2.0348   O 0  0  0  1  0  0  0  0  0  0  0  0\n    9.0588    0.5979    2.9849   C 0  0  0  3  0  0  0  0  0  0  0  0\n    9.0858    1.6927    2.4703   C 0  0  0  2  0  0  0  0  0  0  0  0\n    8.1395    2.3475    2.7617   N 0  0  0  1  0  0  0  0  0  0  0  0\n    7.7772    2.5975    3.7633   C 0  0  0  3  0  0  0  0  0  0  0  0\n    6.9464    3.2763    3.7499   N 0  0  0  2  0  0  0  0  0  0  0  0\n    6.7835    3.4639    2.6990   C 0  0  0  2  0  0  0  0  0  0  0  0\n    6.0439    4.1464    2.1531   C 0  0  0  2  0  0  0  0  0  0  0  0\n    5.3294    4.7816    2.6807   N 0  0  0  3  0  0  0  0  0  0  0  0\n    6.0995    4.1773    1.0897   N 0  0  0  2  0  0  0  0  0  0  0  0\n    6.8232    3.5772    0.5837   C 0  0  0  3  0  0  0  0  0  0  0  0\n    7.5510    2.9178    0.9951   N 0  0  0  2  0  0  0  0  0  0  0  0\n    7.4822    2.9035    2.0734   C 0  0  0  2  0  0  0  0  0  0  0  0\n   10.0557   -1.4119    1.7080   P 0  0  0  1  0  0  0  0  0  0  0  0\n   10.8023   -2.0311    1.0307   O 0  0  0  2  0  0  0  0  0  0  0  0\n    9.6207   -1.9812    2.6574   O 0  0  0  2  0  0  0  0  0  0  0  0\n    9.1069   -1.0164    0.9638   O 0  0  0  1  0  0  0  0  0  0  0  0\n    9.3461   -0.3695    0.0529   C 0  0  0  3  0  0  0  0  0  0  0  0\n    8.2727   -0.1802   -0.4396   C 0  0  0  2  0  0  0  0  0  0  0  0\n    7.6438    0.3981    0.3070   O 0  0  0  1  0  0  0  0  0  0  0  0\n    7.6472   -1.2030   -0.6341   C 0  0  0  2  0  0  0  0  0  0  0  0\n    7.7428   -1.5323   -1.7254   O 0  0  0  1  0  0  0  0  0  0  0  0\n    6.5132   -0.9354   -0.2453   C 0  0  0  3  0  0  0  0  0  0  0  0\n    6.5803    0.2698   -0.0515   C 0  0  0  2  0  0  0  0  0  0  0  0\n    5.9176    0.6730    0.8449   N 0  0  0  1  0  0  0  0  0  0  0  0\n    5.1656    1.4257    0.6412   C 0  0  0  2  0  0  0  0  0  0  0  0\n    5.0064    1.7283   -0.2858   O 0  0  0  2  0  0  0  0  0  0  0  0\n    4.6128    1.8478    1.4845   N 0  0  0  2  0  0  0  0  0  0  0  0\n    4.7743    1.5288    2.5200   C 0  0  0  2  0  0  0  0  0  0  0  0\n    4.2639    1.9840    3.2327   O 0  0  0  2  0  0  0  0  0  0  0  0\n    5.5224    0.7230    2.7124   C 0  0  0  2  0  0  0  0  0  0  0  0\n    5.7070    0.3069    3.8264   C 0  0  0  4  0  0  0  0  0  0  0  0\n    6.1035    0.3086    1.8546   C 0  0  0  3  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n 21 23  1  0  0  0  0\n 21 22  1  0  0  0  0\n  1  3  1  0  0  0  0\n  1  4  1  0  0  0  0\n  9 21  1  0  0  0  0\n132  1  1  0  0  0  0\n 21 24  1  0  0  0  0\n  8  9  1  0  0  0  0\n  4  5  1  0  0  0  0\n  8 10  1  0  0  0  0\n  6  8  1  0  0  0  0\n  5  6  1  0  0  0  0\n131132  1  0  0  0  0\n 24 25  1  0  0  0  0\n124125  1  0  0  0  0\n  6  7  1  0  0  0  0\n 10 11  1  0  0  0  0\n131133  1  0  0  0  0\n 52 53  1  0  0  0  0\n129131  1  0  0  0  0\n 40 42  1  0  0  0  0\n124126  1  0  0  0  0\n124127  1  0  0  0  0\n 25 26  1  0  0  0  0\n127128  1  0  0  0  0\n  7 11  1  0  0  0  0\n128129  1  0  0  0  0\n 53 54  1  0  0  0  0\n 28 30  1  0  0  0  0\n 38 39  1  0  0  0  0\n 26 28  1  0  0  0  0\n111124  1  0  0  0  0\n 51 52  1  0  0  0  0\n 28 29  1  0  0  0  0\n 11 12  1  0  0  0  0\n 29 40  1  0  0  0  0\n133134  1  0  0  0  0\n 40 43  1  0  0  0  0\n 30 31  1  0  0  0  0\n 55 56  1  0  0  0  0\n 26 27  1  0  0  0  0\n 32 39  1  0  0  0  0\n129130  1  0  0  0  0\n 12 20  1  0  0  0  0\n 40 41  1  0  0  0  0\n 54 55  1  0  0  0  0\n 36 38  1  0  0  0  0\n 18 20  1  0  0  0  0\n 96 97  1  0  0  0  0\n 77 78  1  0  0  0  0\n 18 19  1  0  0  0  0\n 54 61  1  0  0  0  0\n 27 31  1  0  0  0  0\n 49 50  1  0  0  0  0\n 47 49  1  0  0  0  0\n 51 61  1  0  0  0  0\n 31 32  1  0  0  0  0\n 50 51  1  0  0  0  0\n130134  1  0  0  0  0\n 36 37  1  0  0  0  0\n110111  1  0  0  0  0\n 12 13  1  0  0  0  0\n 77 79  1  0  0  0  0\n 55 57  1  0  0  0  0\n 43 44  1  0  0  0  0\n 96 98  1  0  0  0  0\n 32 33  1  0  0  0  0\n134135  1  0  0  0  0\n 46 50  1  0  0  0  0\n 16 18  1  0  0  0  0\n 35 36  1  0  0  0  0\n 47 48  1  0  0  0  0\n 95 96  1  0  0  0  0\n 60 61  1  0  0  0  0\n 45 47  1  0  0  0  0\n 76 77  1  0  0  0  0\n 79 80  1  0  0  0  0\n 13 14  1  0  0  0  0\n 98 99  1  0  0  0  0\n 45 46  1  0  0  0  0\n 62 64  1  0  0  0  0\n 33 35  1  0  0  0  0\n 44 45  1  0  0  0  0\n110112  1  0  0  0  0\n 13 15  1  0  0  0  0\n135143  1  0  0  0  0\n 57 58  1  0  0  0  0\n108110  1  0  0  0  0\n 48 62  1  0  0  0  0\n 94 95  1  0  0  0  0\n 15 16  1  0  0  0  0\n 33 34  1  0  0  0  0\n 58 60  1  0  0  0  0\n135136  1  0  0  0  0\n 99100  1  0  0  0  0\n 16 17  1  0  0  0  0\n 62 63  1  0  0  0  0\n136137  1  0  0  0  0\n112113  1  0  0  0  0\n 95102  1  0  0  0  0\n 74 76  1  0  0  0  0\n141143  1  0  0  0  0\n 73 80  1  0  0  0  0\n 93 94  1  0  0  0  0\n107108  1  0  0  0  0\n 99101  1  0  0  0  0\n 62 65  1  0  0  0  0\n108109  1  0  0  0  0\n 58 59  1  0  0  0  0\n109113  1  0  0  0  0\n 73 74  1  0  0  0  0\n136138  1  0  0  0  0\n101102  1  0  0  0  0\n141142  1  0  0  0  0\n113114  1  0  0  0  0\n106107  1  0  0  0  0\n 92102  1  0  0  0  0\n139141  1  0  0  0  0\n 74 75  1  0  0  0  0\n 92 93  1  0  0  0  0\n 72 73  1  0  0  0  0\n138139  1  0  0  0  0\n121122  1  0  0  0  0\n122123  1  0  0  0  0\n 65 66  1  0  0  0  0\n114123  1  0  0  0  0\n103106  1  0  0  0  0\n103104  1  0  0  0  0\n 68 72  1  0  0  0  0\n114115  1  0  0  0  0\n139140  1  0  0  0  0\n 71 72  1  0  0  0  0\n 91 92  1  0  0  0  0\n120121  1  0  0  0  0\n 67 68  1  0  0  0  0\n117123  1  0  0  0  0\n 66 67  1  0  0  0  0\n103105  1  0  0  0  0\n 69 71  1  0  0  0  0\n115116  1  0  0  0  0\n 67 69  1  0  0  0  0\n 90 91  1  0  0  0  0\n116117  1  0  0  0  0\n118120  1  0  0  0  0\n 87 91  1  0  0  0  0\n117118  1  0  0  0  0\n 69 70  1  0  0  0  0\n 88 90  1  0  0  0  0\n118119  1  0  0  0  0\n 86 87  1  0  0  0  0\n 86 88  1  0  0  0  0\n 70 81  1  0  0  0  0\n 81 83  1  0  0  0  0\n 81 84  1  0  0  0  0\n 88 89  1  0  0  0  0\n 85 86  1  0  0  0  0\n 84 85  1  0  0  0  0\n 81 82  1  0  0  0  0\nM  END';
  let mol2 = ChemDoodle.readMOL(exampleMolFile2);
  transform.loadMolecule(mol2);
</script>

Dieses Molekül kann mit der Maus gedreht werden.


<script>
    let transformBallAndStick = new ChemDoodle.TransformCanvas3D('transformBallAndStick', 300, 300);
  transformBallAndStick.styles.set3DRepresentation('Ball and Stick');
  transformBallAndStick.styles.backgroundColor = 'black';
  let molFile3 = '3036\n  CHEMDOOD12280913053D\n\n 28 29  0     0  0  0  0  0  0999 V2000\n    0.0456    1.0544   -1.9374 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n   -0.7952   -1.7026   -1.7706 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n    0.6447   -0.8006   -4.1065 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n    1.8316   -0.9435    4.4004 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n    6.9949    1.1239   -3.9007 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n    1.9032   -1.0692   -1.6001 C   0  0  0  0  0  0  0  0  0  0  0  0\n    1.8846   -1.0376   -0.1090 C   0  0  0  0  0  0  0  0  0  0  0  0\n    3.2176   -0.5035   -2.1949 C   0  0  0  0  0  0  0  0  0  0  0  0\n    0.5585   -0.6223   -2.3126 C   0  0  0  0  0  0  0  0  0  0  0  0\n    2.2670    0.1198    0.5688 C   0  0  0  0  0  0  0  0  0  0  0  0\n    4.3480   -1.2638   -2.0859 C   0  0  0  0  0  0  0  0  0  0  0  0\n    1.4856   -2.1660    0.6075 C   0  0  0  0  0  0  0  0  0  0  0  0\n    3.1719    0.7242   -2.7939 C   0  0  0  0  0  0  0  0  0  0  0  0\n    2.2506    0.1490    1.9633 C   0  0  0  0  0  0  0  0  0  0  0  0\n    5.5313   -0.7541   -2.6203 C   0  0  0  0  0  0  0  0  0  0  0  0\n    1.4691   -2.1369    2.0020 C   0  0  0  0  0  0  0  0  0  0  0  0\n    4.3552    1.2340   -3.3284 C   0  0  0  0  0  0  0  0  0  0  0  0\n    1.8515   -0.9793    2.6800 C   0  0  0  0  0  0  0  0  0  0  0  0\n    5.5350    0.4948   -3.2417 C   0  0  0  0  0  0  0  0  0  0  0  0\n    1.9777   -2.1366   -1.8749 H   0  0  0  0  0  0  0  0  0  0  0  0\n    2.5727    1.0177    0.0401 H   0  0  0  0  0  0  0  0  0  0  0  0\n    4.3513   -2.2356   -1.6034 H   0  0  0  0  0  0  0  0  0  0  0  0\n    1.1951   -3.0814    0.0991 H   0  0  0  0  0  0  0  0  0  0  0  0\n    2.3077    1.3562   -2.8879 H   0  0  0  0  0  0  0  0  0  0  0  0\n    2.5491    1.0585    2.4783 H   0  0  0  0  0  0  0  0  0  0  0  0\n    6.4431   -1.3411   -2.5451 H   0  0  0  0  0  0  0  0  0  0  0  0\n    1.1584   -3.0244    2.5473 H   0  0  0  0  0  0  0  0  0  0  0  0\n    4.3449    2.2098   -3.8075 H   0  0  0  0  0  0  0  0  0  0  0  0\n  1  9  1  0  0  0  0\n  2  9  1  0  0  0  0\n  3  9  1  0  0  0  0\n  4 18  1  0  0  0  0\n  5 19  1  0  0  0  0\n  6  7  1  0  0  0  0\n  6  8  1  0  0  0  0\n  6  9  1  0  0  0  0\n  6 20  1  0  0  0  0\n  7 10  2  0  0  0  0\n  7 12  1  0  0  0  0\n  8 11  2  0  0  0  0\n  8 13  1  0  0  0  0\n 10 14  1  0  0  0  0\n 10 21  1  0  0  0  0\n 11 15  1  0  0  0  0\n 11 22  1  0  0  0  0\n 12 16  2  0  0  0  0\n 12 23  1  0  0  0  0\n 13 17  2  0  0  0  0\n 13 24  1  0  0  0  0\n 14 18  2  0  0  0  0\n 14 25  1  0  0  0  0\n 15 19  2  0  0  0  0\n 15 26  1  0  0  0  0\n 16 18  1  0  0  0  0\n 16 27  1  0  0  0  0\n 17 19  1  0  0  0  0\n 17 28  1  0  0  0  0\nM  END\n';
  let molecule3 = ChemDoodle.readMOL(molFile3, 1);
  transformBallAndStick.loadMolecule(molecule3);
</script>

Dieses Molekül kann mit der Maus gedreht werden.