Hi Noel,

I am trying to create 3D sdf from smiles using python and openbabel
but I am having a bit of a snag:

obConversion = openbabel.OBConversion()
mol = openbabel.OBMol()
conv.SetInFormat("smi")
conv.ReadString(mol, "C(Cl)(=O)CCC(=O)Cl")
conv.SetOutFormat("sdf")
OBOp gen3d = OBOp.FindType("Gen3D")
gen3d.Do(mol)
obConversion.WriteFile(mol, 'Name.sdf')

Then I would also like to add the molecule name as property to the SDF
can this be done?


Thanks in advance

-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
OpenBabel-scripting mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting

Reply via email to