Re: [OpenBabel-scripting] OBConformer question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [OpenBabel-scripting] OBConformer question

Noel O'Boyle
Administrator
Hi Marat,

I am also interested in this feature...the generation of N distinct
conformers for a particular input. I hope to get around to
implementing this at some point, but to be honest, it will probably be
a few months before I do it.

By the way, your question does not relate to scripting so I am ccing
this email to the openbabel-discuss list instead.

Regards,
   Noel

On 9 February 2010 08:17, Marat Talipov <[hidden email]> wrote:

> Greetings,
>
> As is known, obconformer utility generates a number of conformers,
> and, after MM optimization, prints XYZ coords of the most stable one.
> The question is, how to modify obconformer behaviour to make it
> print coords not one but N most stable conformer XYZs?
>
>
> --
> Sincerely yours,,
>  Marat                          mailto:[hidden email]
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> OpenBabel-scripting mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
>

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: [OpenBabel-scripting] OBConformer question

Matt Ketterer
I have looked at the OBConformer code and asked myself that same question.  I modified it a bit to generate multiple conformations, and then I had to use code segments from OBFit to align the conformers and create an RMSD distance matrix between all the elements so as to neglect similar conformations.  
As far as I can tell, using a weighted rotor search calculates the energy for the scorings but doesn't do minimization.  Therefore it says to minimize before, and probably after if maybe not that many conformers are sampled.  Because it generates random rotors, and then scores each one as to how well it fits the Boltzmann distribution at room temperature, I don't think it is any different if one were to just run the weighted rotor search more times and maybe with less sampling.  If someone could give their two cents as to what they think about this, I would be appreciative.  Such as comparing this approach to changing only one rotor or torsion and optimizing it that way iteratively as in Monte Carlo, or even with using different temperatures as in Simulated Annealing.  

The code below is just a slight modification of OBConformer, but instead of outputting just one low energy conformer, it just puts the coordinates in the conformer container, as a mol can have any number of conformers associated with it.  To print them out, you can see some of the sample code on the other OBtools using a simple for loop over all the conformers.

OBRotorList rl;
 OBRotamerList rotamers;
 
 OBRandom rand;
 rand.TimeSeed();
 rl.Setup(mol);

      cerr << " Number of rotatable bonds: " << rl.Size() << endl;

      // indexed from 1, rotorKey[0] = 0
      vector<int> rotorKey(rl.Size() + 1, 0);

      // each entry represents the configuration of a rotor
     
      OBRotorIterator ri;
        rotamers.SetBaseCoordinateSets(mol);
        rotamers.Setup(mol,rl);
        for (int j = 0; j< 10; ++j){//Whatever number of conformers you want
      OBRotor *rotor = rl.BeginRotor(ri);
        for(int i = 1; i < rl.Size() + 1; ++i, rotor = rl.NextRotor(ri))
           rotorKey[i] = rand.NextInt() % rotor ->GetResolution().size();
     
     
      rotamers.AddRotamer(rotorKey);
        }
       
    rotamers.ExpandConformerList(mol, mol.GetConformers());
     
        for (int i = 0; i< mol.NumConformers(); i++){
            mol.SetConformer(i);
            pFF->ConjugateGradients(200);
            pFF->SteepestDescent(3000);
            pFF->WeightedRotorSearch(40, 20);//this will take awhile

             pFF->SteepestDescent(200);
     
     

      pFF->SetCoordinates(mol);
     
      }//end for  
 
Reply | Threaded
Open this post in threaded view
|

Re: [OpenBabel-scripting] OBConformer question

Geoffrey Hutchison
> As far as I can tell, using a weighted rotor search calculates the energy
> for the scorings but doesn't do minimization.

It's useful to start with a pre-minimized structure, but yes, a weighted rotor search will do some number of steepest descent optimization steps for each generated conformer.

> it fits the Boltzmann distribution at room temperature, I don't think it is
> any different if one were to just run the weighted rotor search more times
> and maybe with less sampling.

No, the weighted rotor search does re-weighting with each generated conformer. The method isn't published, and it's not "true" Monte Carlo (since the adjustments aren't based on relative energies). But in general, I do better with longer sampling than with multiple short runs.

But, of course, there are many ideas on the "best" way to do conformer searching and global optimization of molecules. Other implementations would be welcome.

Hope that helps,
-Geoff
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss