Dear OpenBabelers

I am using OpenBabel in my Java application.I would like to generate set of
conformers for my molecule using Openbabel and write the generated
conformers to an output file (SDF format).

I am able to generate the conformers using GetConformers method in
OBConformerSearch class, Since, the return type of the method is void, I am
not able to get hold of the generated conformers and write them to the
output file. It would be great if I can have a list of generated conformers
which I can later write them in an SDF file?

Below is the java code, by the way with this code, writes only one
generated conformer to the output file.

System.loadLibrary("openbabel_java");

OBMol mol = new OBMol();

OBConformerSearch conformer = new OBConformerSearch();

OBConversion conv = new OBConversion();

conv.ReadFile(mol,"input.mol");

conv.SetOutFormat("sdf");

conformer.Setup(mol,5);

conformer.GetConformers(mol);

conv.WriteFile(mol, "conformers.sdf");


I have seen a similar post
​ ​
(
http://forums.openbabel.org/Generating-a-diverse-set-of-conformers-td4656011.html
)
in python but there seems to be no answer.
Any suggestion in the right direction is highly appreciated. Thank you.

-- 
Regards
Vinothkumar Mohanakrishnan
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to