You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes PDB files are written without coordinates with OpenEye. Both times I observed this was from creating a molecule from RDKit.
To Reproduce
(uses MDAnalysis to read and parse the PDB)
from openff.toolkit import Molecule
import MDAnalysis as mda
mol = Molecule.from_smiles("CC")
mol.generate_conformers()
mol.to_file("test.pdb", "PDB")
u = mda.Universe("test.pdb")
u.add_TopologyAttr("elements", u.atoms.types)
rdmol = u.atoms.convert_to("RDKIT")
mol2 = Molecule.from_rdkit(rdmol)
assert len(mol2.conformers)
mol2.to_file("test2.pdb", "PDB")
Output
test.pdb contains coordinates:
> cat test.pdb
ATOM 1 C UNL 1 0.815 -0.538 0.493 1.00 20.00
ATOM 2 C UNL 1 2.155 -0.052 -0.012 1.00 20.00
ATOM 3 H UNL 1 0.000 0.001 0.001 1.00 20.00
ATOM 4 H UNL 1 0.693 -1.607 0.291 1.00 20.00
ATOM 5 H UNL 1 0.730 -0.380 1.572 1.00 20.00
ATOM 6 H UNL 1 2.970 -0.591 0.480 1.00 20.00
ATOM 7 H UNL 1 2.277 1.017 0.191 1.00 20.00
ATOM 8 H UNL 1 2.240 -0.210 -1.091 1.00 20.00
TER 9 UNL 1
CONECT 1 2 3 4 5
CONECT 2 6 7 8
MASTER 0 0 0 0 0 0 0 0 8 1 2 0
END
test2.pdb does not:
ATOM 1 C UNL
ATOM 2 C UNL
ATOM 3 H UNL
ATOM 4 H UNL
ATOM 5 H UNL
ATOM 6 H UNL
ATOM 7 H UNL
ATOM 8 H UNL
TER 9 UNL
CONECT 1 2 3 4 5
CONECT 2 6 7 8
MASTER 0 0 0 0 0 0 0 0 8 1 2 0
END
If I write it using the RDKitToolkitWrapper though:
ATOM 1 C UNL 1 0.815 -0.538 0.493 1.00 0.00 C
ATOM 2 C UNL 1 2.155 -0.052 -0.012 1.00 0.00 C
ATOM 3 H UNL 1 0.000 0.001 0.001 1.00 0.00 H
ATOM 4 H UNL 1 0.693 -1.607 0.291 1.00 0.00 H
ATOM 5 H UNL 1 0.730 -0.380 1.572 1.00 0.00 H
ATOM 6 H UNL 1 2.970 -0.591 0.480 1.00 0.00 H
ATOM 7 H UNL 1 2.277 1.017 0.191 1.00 0.00 H
ATOM 8 H UNL 1 2.240 -0.210 -1.091 1.00 0.00 H
CONECT 1 2 3 4 5
CONECT 2 6 7 8
END
Computing environment (please complete the following information):
Describe the bug
Sometimes PDB files are written without coordinates with OpenEye. Both times I observed this was from creating a molecule from RDKit.
To Reproduce
(uses MDAnalysis to read and parse the PDB)
Output
test.pdb
contains coordinates:test2.pdb
does not:If I write it using the RDKitToolkitWrapper though:
Computing environment (please complete the following information):
conda list
Additional context
The text was updated successfully, but these errors were encountered: