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
propane = cdk.fromSMILES("CCC"); | |
cdk.calculateMass(propane) |
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
dimethylether = cdk.fromSMILES( "COC" ); | |
cdk.addExplicitHydrogens( dimethylether ); | |
cdk.generate3dCoordinates( dimethylether ); | |
// save as CML | |
cdk.saveCML( dimethylether, "/Virtual/dimethylether.cml" ); | |
ui.open( "/Virtual/dimethylether.cml" ); // this should open a JmolEditor | |
jmol.minimize(); |
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
cdk.determineFormat("/DemoData/3D Structures/cml/alcohols/(2R,3R,4R,5S)-hexane-1,2,3,4,5,6-hexol.cml") | |
cdk.determineFormat("/DemoData/3D Structures/mol/alcohols/(2R,3R,4R,5S)-hexane-1,2,3,4,5,6-hexol.mol") |
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
xmpp.connect(); | |
service = xmpp.getService("cdk.ws1.bmc.uu.se"); | |
service.discoverSync(5000); | |
service.getFunctions(); | |
f = service.getFunction("calculateMass"); | |
ios = f.getIoSchemataSync(90000); | |
iof = xmpp.getIoFactory(ios); | |
smiDoc = iof.createSmilesDocument(); | |
smiDoc.setSmiles("CCC"); | |
result = f.invokeSync(smiDoc.toString(), 900000); |
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
ui.open( "/CDK Demo Scripts/propan-2-ol.cml" ) | |
cdkMolecule1 = cdk.loadMolecule( "/CDK Demo Scripts/propan-2-ol.cml" ) | |
cdkdebug.depictCDKAtomTypes( cdkMolecule1 ) |
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
var dbName = "exampleScriptDB"; | |
if ( structuredb.allDatabaseNames().contains(dbName) ) { | |
structuredb.deleteDatabase(dbName); | |
} | |
structuredb.createDatabase(dbName); | |
smiles = new Array("Cc1ccccc1", "CCO", "O=O"); | |
names = new Array("toluene", "beer", "air"); |
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
# just illustrative, and only works on a file only I have, but you get the idea | |
ui.open("/PeptideMimetics/10.cml") | |
oxygen = jcp.getModel().getAtomContainer().getAtom(11) | |
jcp.addAtom("C", oxygen) | |
newCarbon = jcp.getModel().getAtomContainer().getAtom(12) | |
jcp.addPhenyl(newCarbon) |
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
mol = cdk.fromSMILES("C"); | |
inchi1 = inchi.generate(mol); | |
js.print(inchi1 + "\n"); | |
js.print("Key: " + inchi1.getKey() + "\n"); |
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
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> | |
SELECT DISTINCT ?c WHERE { | |
?c a dbpedia-owl:ChemicalCompound | |
} ORDER BY ?c LIMIT 1000 OFFSET 0 |
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
xmpp.connect(); | |
service = xmpp.getService("cdk.ws1.bmc.uu.se"); | |
service.discoverSync(5000); | |
service.getFunctions(); | |
f = service.getFunction("TPSA"); | |
result = f.invokeSync(cdk.fromSMILES("CC").CML, 5000); | |
tpsaString = result.getTextContent() |
OlderNewer