Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge from branch '2.5.x'
- Loading branch information
Showing
19 changed files
with
169 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.settings | ||
bin | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
plugins/net.bioclipse.data.sampledata/data/Javascripts/buildmol.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/******************************************************************************* | ||
* Bioclipse-script to iteratively build a molecule in JChemPaint | ||
* Author: Ola Spjuth | ||
* Author: Egon Willighagen | ||
******************************************************************************/ | ||
|
||
//Start with a carbon and open in JCP | ||
mol=cdk.fromSMILES("C") | ||
mol2=cdk.generate2dCoordinates(mol) | ||
ui.open(mol2) | ||
|
||
//Add some atoms and bonds and wait 1 sec in between | ||
atom=jcp.getModel().getAtomContainer().getAtom(0); | ||
atom=jcp.addAtom("C", atom) | ||
js.delay(1) | ||
atom=jcp.addAtom("C", atom) | ||
js.delay(1) | ||
atom=jcp.addAtom("C", atom) | ||
js.delay(1) | ||
atom=jcp.addAtom("C", atom) | ||
js.delay(1) | ||
jcp.addPhenyl(atom) | ||
js.delay(1) | ||
molecule=jcp.getModel().getAtomContainer() | ||
atom=molecule.getAtom(molecule.getAtomCount()-1); | ||
atom=jcp.addAtom("C", atom) | ||
js.delay(1) | ||
atom=jcp.addAtom("C", atom) | ||
js.delay(1) | ||
jcp.addRing(atom,5) |
8 changes: 8 additions & 0 deletions
8
plugins/net.bioclipse.data.sampledata/data/Javascripts/dlPDBrotate.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//Download PDB | ||
mol=ws.queryPDB("1d66") | ||
ui.open(mol.get(0)) | ||
|
||
//Do some jmol visualization | ||
jmol.run("move 0 0 90 00 0 0 0 0 1;set selectionhalos off; select all; spacefill 0; cartoon on;") | ||
jmol.run("select nucleic; isosurface dna1 solvent; delay 1; color isosurface red;"); | ||
jmol.run("delay 1; color isosurface blue; delay 1; color isosurface translucent; move 0 360 90 90 0 0 0 0 4;"); |
8 changes: 8 additions & 0 deletions
8
plugins/net.bioclipse.data.sampledata/data/Javascripts/dnaiso.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//Download PDB via Web service at EBI and open in Jmol | ||
mol=ws.queryPDB("1d66") | ||
ui.open(mol.get(0)) | ||
|
||
//Execute some jmol script commands | ||
jmol.run("select all; spacefill 0; wireframe off; cartoon on;select none") | ||
jmol.run("select !dna; isosurface solvent; select none; color isosurface blue") | ||
jmol.spinOn() |
3 changes: 2 additions & 1 deletion
3
plugins/net.bioclipse.data.sampledata/data/Javascripts/extractsmiles.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
//Output SMILES for all molecules in an SDFile | ||
var mols = cdk.loadMolecules("/Sample Data/SDF/Fragments2.sdf"); | ||
for (var i = 0; i < mols.size(); i++) { | ||
print(cdk.calculateSMILES(mols.get(i)) + "\n"); | ||
js.print(cdk.calculateSMILES(mols.get(i)) + "\n"); | ||
} |
7 changes: 4 additions & 3 deletions
7
plugins/net.bioclipse.data.sampledata/data/Javascripts/extractsmilesAndMass.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
//Output SMILES and MASS for all molecules in an SDFile | ||
var mols = cdk.loadMolecules("/Sample Data/SDF/Fragments2.sdf"); | ||
|
||
for (var i = 0; i < mols.size(); i++) { | ||
var mol = mols.get(i); | ||
|
||
print(cdk.calculateMass(mol) + | ||
"\t" + | ||
cdk.calculateSMILES(mol) + | ||
js.print( cdk.calculateSMILES(mol) + | ||
": \t" + | ||
cdk.calculateMass(mol) + | ||
"\n" ); | ||
} |
40 changes: 40 additions & 0 deletions
40
plugins/net.bioclipse.data.sampledata/data/Javascripts/gencoords.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/******************************************************************************* | ||
* Bioclipse-script to generate different coordinates on a list of molecules. | ||
* Author: Ola Spjuth | ||
******************************************************************************/ | ||
|
||
//Create list of molecules | ||
mols=cdk.createMoleculeList(); | ||
mols.add(cdk.fromSMILES("CCC")); | ||
mols.add(cdk.fromSMILES("CCCNCC")); | ||
mols.add(cdk.fromSMILES("CCNCCOC(C)CC")); | ||
|
||
//Print out molecules with no coordinates | ||
js.print("\n\nWe have " + mols.size() + " mols in list: mols\n"); | ||
for (i=0; i<mols.size();i++){ | ||
js.print( i +" has 2D: " + cdk.has2d(mols.get(i)) + " , has 3D:" + cdk.has3d(mols.get(i)) +" \n"); | ||
} | ||
|
||
//Generate 2D coordinates from no coordinates | ||
mols2=cdk.generate2dCoordinates(mols); | ||
js.print("\nWe have " + mols2.size() + " mols in list: mols2\n"); | ||
for (i=0; i<mols2.size();i++){ | ||
js.print( i +" has 2D: " + cdk.has2d(mols2.get(i)) + " , has 3D:" + cdk.has3d(mols2.get(i)) +" \n"); | ||
} | ||
|
||
//Generate 3D coordinates from no coordinates | ||
mols3=cdk.generate3dCoordinates(mols); | ||
js.print("\nWe have " + mols3.size() + " mols in list: mols3\n"); | ||
for (i=0; i<mols3.size();i++){ | ||
js.print( i +" has 2D: " + cdk.has2d(mols3.get(i)) + " , has 3D:" + cdk.has3d(mols3.get(i)) +" \n"); | ||
} | ||
|
||
//Generate 3D coordinates from 2D coordinates | ||
mols4=cdk.generate3dCoordinates(mols2); | ||
js.print("\nWe have " + mols4.size() + " mols in list: mols4\n"); | ||
for (i=0; i<mols4.size();i++){ | ||
js.print( i +" has 2D: " + cdk.has2d(mols4.get(i)) + " , has 3D:" + cdk.has3d(mols4.get(i)) +" \n"); | ||
} | ||
|
||
//Test open MolTable on Molecules with 5D | ||
ui.open(mols); |
5 changes: 5 additions & 0 deletions
5
plugins/net.bioclipse.data.sampledata/data/Javascripts/jcpcustom.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//Create a molecule from SMILES, open in JCP and customize rendering | ||
mol=cdk.fromSMILES("C1CCCCC1CC(CCO)CCNC") | ||
mol2=cdk.generate2dCoordinates(mol) | ||
ui.open(mol2) | ||
jcpglobal.setShowAromaticity(true) |
19 changes: 19 additions & 0 deletions
19
plugins/net.bioclipse.data.sampledata/data/Javascripts/jmolExample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//Generate molecule from SMILES and generate 3D coordinates with CDK | ||
mol = cdk.fromSMILES("C(C1C(C(C(C(O1)O)O)O)O)O"); | ||
mol = cdk.addExplicitHydrogens(mol); | ||
cdk.generate3dCoordinates(mol); | ||
|
||
//Save to file in CML | ||
fileName = "/Virtual/" + cdk.molecularFormula(mol) + ".cml"; | ||
if ( ui.fileExists(fileName) ) { | ||
ui.remove(fileName); | ||
} | ||
cdk.saveCML(mol, fileName); | ||
|
||
//Open file and do some Jmol scripting | ||
ui.open(fileName); | ||
jmol.run("background black"); | ||
jmol.run("set echo botom left; echo Mass: " + cdk.calculateMass(mol)) | ||
jmol.run("select all; dots on; select none"); | ||
jmol.minimize(); | ||
jmol.run("move 60 360 30 -45 0 0 0 0 7"); |
7 changes: 7 additions & 0 deletions
7
plugins/net.bioclipse.data.sampledata/data/Javascripts/multimol.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//Demonstrates basic manipulation of multiple molecules in Bioclipse | ||
//Requires sample data installed in default location | ||
mols=cdk.loadMolecules("/Sample Data/SDF/Fragments2.sdf") | ||
mols.size() | ||
mol=mols.get(3) | ||
cdk.calculateSMILES(mols.get(4)) | ||
ui.open(mols) |
30 changes: 30 additions & 0 deletions
30
plugins/net.bioclipse.data.sampledata/data/SMILES/sample30.smi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
C(=O)N(Cc1ccco1)C(c1cc2ccccc2cc1)C(=O)NCc1ccccc1 1 | ||
C(=O)(C=CC)N(CCCCCCC)C(c1cc2c(cccc2)c2ccccc12)C(=O)NC(C)(C)C 2 | ||
C(=O)(CNC(=O)OC(C)(C)C)N(Cc1oc(C(F)(F)F)cc1)C(c1ccccc1)C(=O)NCc1ccccc1 3 | ||
C(=O)(CNC(=O)OC(C)(C)C)N(Cc1ccco1)C(c1ccccc1)C(=O)NCc1ccccc1 4 | ||
C(=O)(CNC(=O)OC(C)(C)C)N(Cc1ccc(o1)C)C(c1ccc(OC)c(c1)OC)C(=O)NCc1ccccc1 5 | ||
C(=O)(C=CC)N(Cc1ccccc1)C(c1cc2c(cccc2)c2ccccc12)C(=O)NC(C)(C)C 6 | ||
C(=O)(CNC(=O)OC(C)(C)C)N(Cc1ccc(o1)C)C(c1ccccc1)C(=O)NC(C)(C)C 7 | ||
C(=O)(CNC(=O)OC(C)(C)C)N(Cc1ccco1)C(c1ccccc1)C(=O)NC(C)(C)C 8 | ||
C(=O)(CNC(=O)OC(C)(C)C)N(Cc1ccc(o1)C)C(c1ccc2OCOc2c1)C(=O)NC(C)(C)C 9 | ||
C(=O)(CNC(=O)OC(C)(C)C)N(Cc1ccco1)C(c1ccc(OC)c(c1)OC)C(=O)NC(C)(C)C 10 | ||
C(=O)(C(NC(=O)OC(C)(C)C)CC1c2ccccc2NC1)N(CCCCCCC)C(c1cccc(c1O)OC)C(=O)NCc1ccccc1 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C)C)CC1c2ccccc2NC1)N(Cc1ccco1)C(c1ccc(OC)c(c1)OC)C(=O)NCCCCC 25 | ||
C(=O)N(CCCCCC)C(c1cc2ccccc2cc1)C(=O)NCCCCC 26 | ||
C(=O)(CCCc1ccc2ccc3cccc4ccc1c2c34)N(C)C(c1cc2ccccc2cc1)C(=O)NC(C)(C)C 27 | ||
C(=O)(c1cccc(O)c1O)N(C)C(c1ccc(c2ccc(OC)cc12)OC)C(=O)NCS(=O)(=O)c1ccc(cc1)C 28 | ||
C(=O)(c1c(cc(O)cc1O)O)N(C)C(c1ccc(O)c(c1)O)C(=O)NCS(=O)(=O)c1ccc(cc1)C 29 | ||
C(=O)N(Cc1ccc(o1)C)C(c1ccccc1)C(=O)NCS(=O)(=O)c1ccc(cc1)C 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters