User 010ddfdc89
31-08-2010 08:39:05
Hi Folks,
Using Tools->Potonation->pKa in Marvin I can create a nice structure with the pKa values overlayed.
Is there any way of recreating thus using the oracle cartridge?
Ideally I would like to feed the smiles string into a sql command / stored procedure and return a dataset into an embedded Marvinview applet that would show the structure with overlayed values.
Any ideas?
Cheers.
Peter
ChemAxon e08c317633
01-09-2010 12:13:20
Hi,
No, this cannot be done with Cartridge.
jc_evaluate Cartridge operator can be used for calculating pKa, but it returns only numerical values.
Examples:
select jc_evaluate(<input-molecule>, 'apka("1")') from dual;
select jc_evaluate_x(<input-molecule>, 'pka()') from dual;
Zsolt
User 010ddfdc89
03-09-2010 06:41:00
Hi,
You seem to have something eqivalent to what we need in www.chemicalize.org in the pKa calculation module - what mechanisms did you guys use to take in the smiles string, calculate the pKa and generate the image shown in the pKa portlet?
Cheers.
Peter
ChemAxon e08c317633
03-09-2010 09:08:23
Hi,
We use the pKaPlugin Java API on chemicalize.org. My colleague will provide more details.
Zsolt
ChemAxon 6c76bc6409
03-09-2010 14:05:32
Hi David,
This is an extracted version of the code we use on chemicalize.org in a java servlet, it should contain the answer to your question.
The key function calls are:
//take the mol query argument from the URL of the page
String name = new String(request.getParameter("mol").getBytes("ISO-8859-1"), "UTF-8");
try {
//import the string - this can be any format recognized by marvin
Molecule m = MolImporter.importMol(name);
try {
//set up a pka calculation
pKaPlugin plugin = new pKaPlugin();
plugin.setMolecule(m);
plugin.setpHLower(0);
plugin.setpHUpper(14);
plugin.setpHStep(0.1);
if (!plugin.run()) {
out.println(plugin.getErrorMessage());
out.println(plugin.getWarningMessage());
} else {
//display the result molecule
Molecule pkamol = plugin.getResultMolecule();
//the default settings of toBinFormat are good here - atom labels are set on pkaMol -, we only need dearomatization
byte[] img = pkamol.toBinFormat("png:-a,w400,h300");
//save img as file or return it to the user as dataURI
}
} catch (PluginException e) {
e.printStackTrace(System.err);
}
} catch (MolFormatException e) {
e.printStackTrace(System.err);
}
Andras