Hi Puck, When you read a SDF file using a SDMolSupplier RDKit will retain 3D coordinates. You can access them from the mol Conformer (a molecule can have multiple Conforrmers; one is generated for you when you read a set of coordinates):
mol.GetConformer().GetAtomPosition(atom_idx) If you wish to retain hydrogen atoms, make sure to set removeHs=False when creating the supplier. Cheers, p. > On 20 Aug 2020, at 12:54, Puck van Gerwen <puck.vanger...@gmail.com> wrote: > > Dear rdkit, > > I am wondering whether after reading a molecule from an sdf file, it is > possible to keep the original 3d coordinates that were in that sdf file? I > will modify the molecules (fragment bonds and saturate with hydrogen) but as > much as possible I want to keep the original coordinates. For example, if I > had H3C-CH=CH2 and I break the first bond to remove H3C (to saturate to CH4) > leaving CH=CH2 (to saturate to H2C=CH2), would it be possible to keep the > original C coordinates rather than generate conformations and so on? > > I appreciate the assistance. > Best regards, > -- > Puck van Gerwen > Doktorandin / PhD candidate > Departement Chemie > Klingelbergstrasse 80 > CH-4056 Basel > https://www.chemspacelab.org/ > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss