Hi Paul, On Mon, Nov 1, 2010 at 3:54 PM, Paul Emsley <paul.ems...@bioch.ox.ac.uk> wrote: > > For the record, I would like to describe how I proceeded in the light of > your reply. > > My starting point to construct an RWMol is an mmCIF restraints file. As > well as containing description of the bonds and angles (etc.) this file > describes the atoms, part of the description of which is the > "type_energy". Pyrrole and carbazole Ns (for example) have the type > "NR15"(energy types are listed in energy_lib.cif [1]) so now when I see > an atom of that type [2], I add an extra H bonded to the N and > everything is then peachy.
What you are describing sounds correct. One possible, minor, optimization if you are building the molecule atom by atom (as opposed to reading it from a mol block): you don't actually need to put the H in the graph. You can instead do something like the following: [6]>>> m = Chem.MolFromSmiles('c1cccn1',sanitize=False) [7]>>> m.GetAtomWithIdx(4).SetNumExplicitHs(1) [8]>>> Chem.SanitizeMol(m) [9]>>> print Chem.MolToSmiles(m) -----> print(Chem.MolToSmiles(m)) c1cc[nH]c1 > > Thanks again, you're welcome! Best Regards, -greg ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss