Michal: from my experience, MMFF in rdkit is slower than UFF (ca. 2x for my test cases) but converges faster, so in certain cases the overall execution time (embedding+optimization) won't be much shorter for UFF. It really depends on what molecules you work on. AFAIK rdkit's 3d coord generation algorithm was designed for small- to medium-sized "druglike" molecules, so you may expect it to fail in areas very far from this territory. For example, it does not work well for long conjugated oligomers - sometimes it produces molecular knots instead of straight strands, and is quite slow for large systems. That's why I switched to CORINA, btw. Best wishes, Michal Krompiec
On 5 April 2014 18:05, JP <jeanpaul.ebe...@inhibox.com> wrote: > I don't know about the "ultimate way": but this works for me (to generate n > conformers): > > writer = Chem.SDWriter('some_file.sdf') > # add Hydrogens > molH = Chem.AddHs(mol) > # create n conformers for molecule > confIds = AllChem.EmbedMultipleConfs(molH, n) > # E optimize > for confId in confIds: > AllChem.UFFOptimizeMolecule(molH, confId=confId) > # write to output file > writer.write(molH, confId=confId) > > You should replace the EmbedMultipleConfs with EmbedMolecule if you are only > interested in generating only one conformer. UFFOptimizeMolecule(...) > returns an integer, which if 0 tells you the optimization has converged (or > 1 otherwise). > > UFF is significantly faster, and I do not think the results are worse of > than the ones generated for MMFF. At least for the small molecules I was > looking at, but I am sure there are exceptions to this. Paolo has done a > lot of excellent work on the forcefields, and I think the amide and carbonyl > planarity issues for UFF have now been fixed. > > > > > > > - > Jean-Paul Ebejer > Early Stage Researcher > > > On 5 April 2014 13:35, Michał Nowotka <mmm...@gmail.com> wrote: >> >> Hi, >> >> I've found this >> (http://code.google.com/p/rdkit/wiki/Generating3DCoordinates) wiki page >> suggesting how to compute 3D coordinates: >> >> from rdkit import Chem >> from rdkit.Chem import AllChem >> >> >> >> m = Chem.MolFromSmiles('c1ccccc1C(=O)O') >> >> AllChem.EmbedMolecule(m) >> # the molecule now has a crude conformation, clean it up: >> >> AllChem.UFFOptimizeMolecule(m) >> >> On the other hand, "Getting started document" describes this differently: >> >> >> >> >> AllChem.EmbedMolecule(m2) >> AllChem.UFFOptimizeMolecule(m2) >> >> In the meantime, someone suggested that I should call: >> >> >> Chem.AddHs(m) >> >> Before calculating 3D properties. >> >> >> So what is an ultimate way of doing this? Lets assume I already have rdkit >> molecule: >> >> m = Chem.MolFromSmiles('Cc1ccccc1') >> >> >> >> >> or: >> >> m = Chem.MolFromMolFile('data/input.mol') >> >> >> what should I do with 'm' to compute 3D coordinates? >> >> Also, once we have MMFF implemented in rdkit, is there any benefit of >> using UFF (apart from maybe backwards compatibility, as this is a new >> feature)? >> >> >> >> Is UFF significantly faster then MMFF? >> >> Kind regards, >> >> Michał Nowotka >> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> 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 > ------------------------------------------------------------------------------ _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss