Quantcast

A question about random seed in openbabel

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

A question about random seed in openbabel

Sergey Sosnin
I try to set random seed to provide reproducibility in a 3D coordinate generation process. But in Pybel I found no way to do that. In openbabel.py there is a class OBRandom that looks like that I need.
But when I try to set seed nothing happens.

Code:

import pybel,openbabel
rnd = openbabel.OBRandom()
rnd.Seed(1)
p = pybel.readstring('smiles','CC1(C(N2C(S1)C(C2=O)NC(=O)CC3=CC=CC=C3)C(=O)O)C')
p.addh()
p.make3D(forcefield='uff',steps=5000)
print p.write('xyz').split('\n')



But If I repeat it I have absolutely other output
The question is how to generate 3D coordinates in a reproducible way?

Best regards,
Sergey Sosnin

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Loading...