On Fri, Jul 10, 2009 at 11:33 AM, Evgueni Kolossov<ekolos...@gmail.com> wrote: > Dear Greg, > > Now I have found that Compute2DCoords(m) failing in Atom::getNumImplicitHs() > on > PRECONDITION(d_implicitValence>-1, "getNumImplicitHs() called without > preceding call to calcImplicitValence()") > > mol it trying to process: [*]NC(=N)N[*] >
You need to call mol.updatePropertyCache(false) to get the valence stuff set up. >>To have a chance at getting something reasonable for >>fragments, you probably ought to generate 2D coordinates for the full >>molecule, then manually set the positions of the atoms in the >>fragment's conformer. > And how I can do that? I assume you have some map between atoms in the fragment and atoms in the molecule. 1) Generate coordinates for the full molecule as you normally would. 2) Create a conformer for the fragment (with the correct number of atoms). 3) Loop over atoms of the fragment and set the position in the conformer using the corresponding atom in the full molecule. -greg