Hi all, I've been using RDKit to generate geometries for sodium adduct ions that I subsequently use in a workflow. I wrote the following procedure for adding a Na+ to a neutral about a year ago, when I was still very new at RDKit:
from rdkit import Chem from rdkit.Chem import AllChem glycine = Chem.MolFromSmiles('NCC(=O)O') glycine = Chem.AddHs(glycine) glycineRW = Chem.RWMol(glycine) Na = glycineRW.AddAtom((Chem.Atom(11))) glycineRW.AddBond(3, Na, Chem.BondType.SINGLE) glycineRW.GetAtomWithIdx(3).SetFormalCharge(1) Chem.SanitizeMol(glycineRW) potential = AllChem.ETKDG() AllChem.EmbedMolecule(glycineRW, potential) ids = AllChem.EmbedMultipleConfs(glycineRW, 50, enforceChirality=True) _=AllChem.MMFFOptimizeMoleculeConfs(glycineRW) Although a chemist might be a bit offended by this representation of a sodium adduct ion (since the charge ends up on the oxygen instead of the sodium), it performed quite well in my workflow. However, since upgrading to rdkit version 2019.09.01 the last line _=AllChem.MMFFOptimizeMoleculeConfs(glycineRW) returns a Segmentation fault. This did not occur for version 2019.03.2 and earlier. Additionally the segmentation fault does not occur when substituting the sodium for a hydrogen. Any advise on resolving the segmentation fault would be greatly appreciated! And if you have advise on making more realistic sodium adduct ions, that would also be very welcome ;-) Best wishes, Kas Houthuijs
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss