Thanks Geoffrey, that helps alright but I am still stuck with zero
coordinates when I write to an output file (say mol2 or com). What am I
still missing?

mol = openbabel.OBMol()
cv = openbabel.OBConversion()
cv.SetInAndOutFormats('smi', outfile_type)
cv.ReadString(mol, smiles_string)
mol.AddHydrogens()
ff = openbabel.OBForceField.FindForceField("MMFF94")
ff.SteepestDescent(1500, 1.0e-4)
ff.WeightedRotorSearch(250, 25)
ff.ConjugateGradients(2500, 1.0e-6)
ff.GetCoordinates(mol)
cv.WriteFile(mol,outfile_name)

Also, I am currently using gen3d to generate my 3D molecule (which already
does a weighted rotor search and steepest descent etc) and then doing a
further weighted rotor search with much stricter energy convergence and much
larger number of conformers to search for (see code below which iterates
over a number of smiles strings). 

- I assume this is basically the same as doing the one intensive weighted
rotor search?? 
- If time is not an issue, should you ideally maximize the number of
conformers and steps in WeightedRotorSearch and for the pre and post
optimization (ie SteepestDescent and ConjugateGradients)?? 

for smiles_string in smiles_string_list:
    mol = openbabel.OBMol()
    cv = openbabel.OBConversion()
    cv.SetInAndOutFormats('smi', outfile_type)
    cv.ReadString(mol, smiles_string)
    mol.AddHydrogens()
    gen3d = openbabel.OBOp.FindType("Gen3D")
    gen3d.Do(mol)
    ff = openbabel.OBForceField.FindForceField("MMFF94")
    ff.Setup(mol)
    ff.SteepestDescent(ffsd_steps, ffsd_convergence)
    ff.WeightedRotorSearch(ffwrs_conformers,ffwrs_steps)
    ff.ConjugateGradients(ffcg_steps,ffcg_convergence)
    ff.GetCoordinates(mol)
    cv.WriteFile(mol,mol_name)

 And lastly, how do I write the log to a file?

 ff.SetLogLevel(openbabel.OBFF_LOGLVL_LOW)
 ff.SetLogToStdErr()

I think that is the end of my conformer search questions, so thanks again
for all the help so far! 

Scott

--
View this message in context: 
http://forums.openbabel.org/Weighted-rotor-search-tp4655264p4655285.html
Sent from the General discussion mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to