User fe5cbe5ff5
29-07-2008 18:13:12
Hi,
I am using the Calculator plugins in JChem 5.0.6 and I have written a simple java program that takes in a Smiles string for a compound and calculates its LogP value. Problem is, the logP values that my program is calculating from the getlogPTrue() method and the getlogPMicro() method are both not matching with the compounds actual logP value. So either I am using the wrong method or the methods are not calculating the right logP value for a compound, given its Smiles string. Please help! My program is as follows:
public class GetLogP {
public static void main(String args[]) {
try{
Properties params = new Properties();
logPPlugin lplugin = new logPPlugin();
lplugin.setCloridIonConcentration(0.2);
lplugin.setNaKIonConcentration(0.2);
lplugin.setUserTypes("logPTrue,logPMicro,increments");
System.out.println("molecule\tlogP\tincrements");
MolImporter mi = new MolImporter(new ByteArrayInputStream("O=C(O)[C@@H](N)Cc2c1ccccc1nc2".getBytes()));
Molecule target = mi.read();
lplugin.setMolecule(target);
lplugin.run();
double logp = lplugin.getlogPTrue();
double logpm = lplugin.getlogPMicro();
int count = target.getAtomCount();
double[] increments = new double[count];
for (int i=0; i < count; ++i) {
increments = lplugin.getAtomlogPIncrement(i);
}
System.out.println("True logP : "+logp);
System.out.println("Micro logP: "+logpm);
System.out.println("logP increments: ");
for (int i=0; i < count; ++i) {
System.out.print(increments+";");
}
System.out.println();
mi.close();
}
catch(IOException ioe){
}
catch(PluginException pe){
}
}
}
I am using the Calculator plugins in JChem 5.0.6 and I have written a simple java program that takes in a Smiles string for a compound and calculates its LogP value. Problem is, the logP values that my program is calculating from the getlogPTrue() method and the getlogPMicro() method are both not matching with the compounds actual logP value. So either I am using the wrong method or the methods are not calculating the right logP value for a compound, given its Smiles string. Please help! My program is as follows:
public class GetLogP {
public static void main(String args[]) {
try{
Properties params = new Properties();
logPPlugin lplugin = new logPPlugin();
lplugin.setCloridIonConcentration(0.2);
lplugin.setNaKIonConcentration(0.2);
lplugin.setUserTypes("logPTrue,logPMicro,increments");
System.out.println("molecule\tlogP\tincrements");
MolImporter mi = new MolImporter(new ByteArrayInputStream("O=C(O)[C@@H](N)Cc2c1ccccc1nc2".getBytes()));
Molecule target = mi.read();
lplugin.setMolecule(target);
lplugin.run();
double logp = lplugin.getlogPTrue();
double logpm = lplugin.getlogPMicro();
int count = target.getAtomCount();
double[] increments = new double[count];
for (int i=0; i < count; ++i) {
increments = lplugin.getAtomlogPIncrement(i);
}
System.out.println("True logP : "+logp);
System.out.println("Micro logP: "+logpm);
System.out.println("logP increments: ");
for (int i=0; i < count; ++i) {
System.out.print(increments+";");
}
System.out.println();
mi.close();
}
catch(IOException ioe){
}
catch(PluginException pe){
}
}
}