On 9/13/07, Raphael wrote on the CDK user mailing list:
(again) some problems/ questions regarding pdb file reading and writing:
in short: i am generating pdb files with cdk with the following code:
FileWriter output = new FileWriter(...)
PDBWriter pdbWriter = new PDBWriter(output);
Molecule molecule = new Molecule(...);
pdbWriter.write(molecule);
pdbWriter.close();the result is something like:
HETATM 41 C MOL 8,460 5,977 21,933
HETATM 42 C MOL 7,310 -2,963 19,960
HETATM 43 C MOL 7,885 -2,750 21,390
HETATM 44 C MOL 6,797 -2,337 22,376
TERbut the problem is that i cannot read those files or at least the
containing atoms with the cdk:reader.PDBReader pdbReader = new PDBReader(...);
ChemFile chemFile = (ChemFile) pdbReader.read((ChemObject) new ChemFile());I tried in fact all methods and their daughter methods of:
List Containers = ChemFileManipulator.getALL(chemFile);(getting all moleculesets, getting all atomcontainers...).
is it possible that cdk has problems reading pdb files generated by
itself? maybe i oversaw the "getAllAtoms" method somewhere?
Might be a bug. Filed it as such. A JUnit test must be written.