save ionized molecules

ChemAxon 60613ab728

09-09-2008 12:29:49

Hi All,


Is there any way to save a set of the possible ionized molecules to a specific PH as a result of a pKa calculation?


Input would be an SD file. Output would contain the list of the ionized molecules and pKa values.


I am also interested in an API solution, if possible.





Thank you,


Miklos





AMRI Hungary

ChemAxon e08c317633

10-09-2008 10:23:18

Hi Miklos,





Microspecies (protonation form at a specified pH) list with distributions at given pH can be calculated with cxcalc. You have to use microspeciesdistribution calculation.





Example:
Code:
cxcalc -o result.sdf microspeciesdistribution -H 4.5 test.sdf



The example calculates the microspecies distribution at pH 4.5. The input file (test.sdf) and the output file (result.sdf) is attached; the default ouput format is SDF, with distribution values in SDF fields. See also the attached image, it shows the four microspecies with largest distribution at pH 4.5.





For API usage example see the API header of the pKaPlugin class.





Marvin GUI: pKa Plugin can display microspecies distribution chart.





I hope this helps,


Zsolt

ChemAxon 60613ab728

10-09-2008 11:25:53

Zsolt,


Thank you for the prompt answer. This is very nice. Your command line worked very well.


Is there any soultion to narrow the output SD file in order to get results listed only with a DISTR number is higher than zero?


Thank You,





Miklos

ChemAxon e08c317633

11-09-2008 14:38:39

mjszabo wrote:
Is there any soultion to narrow the output SD file in order to get results listed only with a DISTR number is higher than zero?


No, in cxcalc there is no solution for this yet. We will add an option for this in a future release (Marvin 5.2).





Using the API it can be done.





Code:
// instantiate plugin


pKaPlugin plugin = new pKaPlugin();





// set pH


plugin.setpH(3.0);





MolImporter importer = new MolImporter("mols.sdf");


Molecule mol = null;


while ((mol = importer.read()) != null) {


    // set molecule and run calculation


    plugin.setMolecule(mol);


    plugin.run();





    // get microspecies data (molecule and distribution)


    for (int i=0; i < plugin.getMsCount(); ++i) {


        Molecule ms = plugin.getMsMolecule(i);


        double distr = plugin.getSingleMsDistribution(i);


    }


}


importer.close();



If in the example above plugin.getSingleMsDistribution(i) - in the last for loop - returns too low distribution value, then don't add the molecule returned by plugin.getMsMolecule(i) to results.





Zsolt