Hi All,

I've been tinkering a bit more with RDKit and having fun.

I have hit a problem though. I am trying to reproduce Greg's "Generating 
3D coordinates" in RDKit-overview.pdf in C++:

This is what I have (mostly via cut 'n paste):



int
main(int argc, char **argv) {

    std::string smiles_string = "C1CCC1";

    RDKit::RWMol *mol=new RDKit::RWMol();
    mol = RDKit::SmilesToMol(smiles_string);
    RDDepict::compute2DCoords(*mol);

    double vdwThresh=10.0;
    int confId = -1;
    bool ignoreInterfragInteractions=true;
    int maxIters = 200;

    ForceFields::ForceField *ff =
       RDKit::UFF::constructForceField(*mol,
                       vdwThresh, confId,
                       ignoreInterfragInteractions);
    ff->initialize();
    int res=ff->minimize(maxIters);
    delete ff;

    std::cout << RDKit::MolToMolBlock(*mol, true, -1) << std::endl;

    return 0;
}


But I get 2D coordinates:


      RDKit          2D

   5  5  0  0  0  0  0  0  0  0999 V2000
     1.2879    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
     0.3980    1.2249    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    -1.0419    0.7570    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    -1.0419   -0.7570    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
     0.3980   -1.2249    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   1  2  1  0
   2  3  1  0
   3  4  1  0
   4  5  1  0
   5  1  1  0
M  END


What makes 3D coordinates?  (I'm guessing it's a one-liner somewhere...)

Cheers,

Paul.


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to