With my luck factor, I'd probably randomly get the same seed twice.
I'd rather do it the Java way - something akin to using
getCurrentTimeInMillis() as seed.
Yes, in utils.cpp, it always looks like it is initialized to static rng_type
generator(42u);
Some Hitch-hikers Guide to the Galaxy fan there...
Thanks Greg
On 12 April 2011 11:28, Greg Landrum <greg.land...@gmail.com> wrote:
> Hi JP,
>
> On Tue, Apr 12, 2011 at 6:19 AM, JP <jeanpaul.ebe...@inhibox.com> wrote:
> >
> > A further discovery -- if you change the random seed
> > in .EmbedMultipleConfs(m, numConfs=10) you do get different conformers
> > randomSeed=1000
> > randomSeed=100
> > randomSeed=10
> > But randomSeed=-1 should do that by default! (no ?)
>
> There's an error in the documentation. If you don't provide a seed to
> EmbedMultipleConfs(), it uses -1 as the seed. If you want truly random
> conformations, use something like randomSeed=random.randint(0,1e6).
>
> Best,
> -greg
>
> >
> > On 12 April 2011 11:08, JP <jeanpaul.ebe...@inhibox.com> wrote:
> >>
> >> I cannot understand this. Using distance geometry, you should get
> >> different molecules each time you run the following program right
> (because
> >> of the random distance matrix) ?
> >> Why does this produce identical conformers on every run?
> >> from rdkit import Chem
> >> from rdkit.Chem import AllChem
> >> from rdkit.Chem import Descriptors
> >> def generateconformations(m):
> >> m = Chem.AddHs(m)
> >> ids=AllChem.EmbedMultipleConfs(m, numConfs=10)
> >> for id in ids:
> >> AllChem.UFFOptimizeMolecule(m, confId=id)
> >> return m
> >> mol = Chem.MolFromSmiles('C1CCC1OC')
> >> m = generateconformations(mol)
> >> confIds = [x.GetId() for x in m.GetConformers()]
> >> for id in confIds:
> >> print Chem.MolToMolBlock(m, confId=id)
> >>
> >>
> >> Is this the intended behaviour? A common use case is to generate
> >> conformers for a molecule and save them in a database -- but if you run
> this
> >> code 10 times, you will get the same 10 conformers, 10 times...
> >> Why is this?
> >>
> >>
> >>
> >>
> >>
> >> --
> >>
> >> Jean-Paul Ebejer
> >> Early Stage Researcher
> >> InhibOx Ltd
> >> Pembroke House
> >> 36-37 Pembroke Street
> >> Oxford
> >> OX1 1BP
> >> UK
> >> (+44 / 0) 1865 262 034
> >>
> >>
> >> This email and any files transmitted with it are confidential and
> intended
> >> solely for the use of the individual or entity to whom they are
> addressed.
> >> Any unauthorised dissemination or copying of this email or its
> attachments,
> >> and any use or disclosure of any information contained in them, is
> strictly
> >> prohibited and may be illegal. If you have received this email in error
> >> please notify the sender and delete all copies from your system.
> >>
> >> We and our group companies accept no liability or responsibility for
> >> personal emails or emails unconnected with our business.
> >>
> >> Internet communications including emails and access and use of web sites
> >> cannot be guaranteed to be secure or error free as information can be
> >> intercepted, corrupted, lost or arrive late. Furthermore, while we have
> >> taken steps to control the spread of viruses on our systems, we cannot
> >> guarantee that this email and any files transmitted with it are virus
> free.
> >> No liability is accepted for any errors, omissions, interceptions,
> corrupted
> >> mail, lost communications or late delivery arising as a result of
> receiving
> >> this message via the Internet or for any virus that may be contained in
> it.
> >>
> >
> >
> >
> > --
> >
> > Jean-Paul Ebejer
> > Early Stage Researcher
> > InhibOx Ltd
> > Pembroke House
> > 36-37 Pembroke Street
> > Oxford
> > OX1 1BP
> > UK
> > (+44 / 0) 1865 262 034
> >
> >
> > This email and any files transmitted with it are confidential and
> intended
> > solely for the use of the individual or entity to whom they are
> addressed.
> > Any unauthorised dissemination or copying of this email or its
> attachments,
> > and any use or disclosure of any information contained in them, is
> strictly
> > prohibited and may be illegal. If you have received this email in error
> > please notify the sender and delete all copies from your system.
> >
> > We and our group companies accept no liability or responsibility for
> > personal emails or emails unconnected with our business.
> >
> > Internet communications including emails and access and use of web sites
> > cannot be guaranteed to be secure or error free as information can be
> > intercepted, corrupted, lost or arrive late. Furthermore, while we have
> > taken steps to control the spread of viruses on our systems, we cannot
> > guarantee that this email and any files transmitted with it are virus
> free.
> > No liability is accepted for any errors, omissions, interceptions,
> corrupted
> > mail, lost communications or late delivery arising as a result of
> receiving
> > this message via the Internet or for any virus that may be contained in
> it.
> >
> >
> >
> ------------------------------------------------------------------------------
> > Forrester Wave Report - Recovery time is now measured in hours and
> minutes
> > not days. Key insights are discussed in the 2010 Forrester Wave Report as
> > part of an in-depth evaluation of disaster recovery service providers.
> > Forrester found the best-in-class provider in terms of services and
> vision.
> > Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
> > _______________________________________________
> > Rdkit-discuss mailing list
> > Rdkit-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
> >
> >
>
--
Jean-Paul Ebejer
Early Stage Researcher
InhibOx Ltd
Pembroke House
36-37 Pembroke Street
Oxford
OX1 1BP
UK
(+44 / 0) 1865 262 034
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Any unauthorised dissemination or copying of this email or its attachments,
and any use or disclosure of any information contained in them, is strictly
prohibited and may be illegal. If you have received this email in error
please notify the sender and delete all copies from your system.
We and our group companies accept no liability or responsibility for
personal emails or emails unconnected with our business.
Internet communications including emails and access and use of web sites
cannot be guaranteed to be secure or error free as information can be
intercepted, corrupted, lost or arrive late. Furthermore, while we have
taken steps to control the spread of viruses on our systems, we cannot
guarantee that this email and any files transmitted with it are virus free.
No liability is accepted for any errors, omissions, interceptions, corrupted
mail, lost communications or late delivery arising as a result of receiving
this message via the Internet or for any virus that may be contained in it.
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss