Dear CDK users, we are using CDK version 2.3 in our application. As a user tried to add a structure (see attachment) we found a difference in the molecular formula of the structure.
The original structure was draw with ChemDraw 18.
A multi-center attachment was added to the structure and ChemDraw shows this
molecular formula: C30H46Cl2PRu
Whereas our application takes the mol-version of the cdx-file and computes this
formula: C31H49Cl2PRu
To get the formula we use this piece of code:
IMolecularFormula form = MolecularFormulaManipulator.getMolecularFormula(mol);
sumFormula = MolecularFormulaManipulator.getString(form);
Did we missed something by creating the AtomContainer?
We create the atomcontainer directly by parsing the mol-file:
try (StringReader sr = new StringReader(molFile); MDLV2000Reader mr = new
MDLV2000Reader(sr, mode)) {
AtomContainer mol = new AtomContainer();
AtomContainer ac = mr.read(mol);
}
Maybe someone can give us a hint, what we are doing wrong.
Best regards,
Manuel Stesycki
IT
0208 / 306-2146
Physikbau, Büro 117
[email protected]<mailto:[email protected]>
Max-Planck-Institut für Kohlenforschung
Kaiser-Wilhelm-Platz 1
D-45470 Mülheim an der Ruhr
http://www.kofo.mpg.de/de
structure.cdx
Description: structure.cdx
structure.mol
Description: structure.mol
_______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

