Thank you very much Paolo! That worked technically but did not accomplish what 
I was hoping it would. What ended up working was looping through the common 
core and setting the target x,y,z coordinates to the reference coordinates 
prior to the energy minimization.

Thank you again,
Chris.

From: Paolo Tosco <paolo.tosco.m...@gmail.com>
Date: Friday, June 25, 2021 at 1:57 AM
To: "Neale, Christopher Andrew" <cne...@lanl.gov>
Cc: "rdkit-discuss@lists.sourceforge.net" <rdkit-discuss@lists.sourceforge.net>
Subject: [EXTERNAL] Re: [Rdkit-discuss] How can I remove all angle potentials 
from a force field before EM?

Hi Chris,

you can switch on/off individual MMFF potential terms in the force field; you 
can't do that with UFF.
To switch off all angle terms in MMFF you can do the following:

from rdkit import Chem, ForceField
from rdkit.Chem import rdForceFieldHelpers

mp = rdForceFieldHelpers.MMFFGetMoleculeProperties(mol)
mp.SetMMFFAngleTerm(False)
ff = rdForceFieldHelpers.MMFFGetMoleculeForceField(mol, mp)
ff.Minimize()

Then, to do another minimization with all terms on, you will need to re-create 
a complete force field:

mp.SetMMFFAngleTerm(True)
ff = rdForceFieldHelpers.MMFFGetMoleculeForceField(mol, mp)
ff.Minimize()

If you detect an H atom stuck on the wrong side of a tetrahedral center you 
might also consider inverting its direction vector with respect to the C atom 
it is bonded to before minimizing.

HTH, cheers
p.


On Fri, Jun 25, 2021 at 2:10 AM Neale, Christopher Andrew via Rdkit-discuss 
<rdkit-discuss@lists.sourceforge.net<mailto:rdkit-discuss@lists.sourceforge.net>>
 wrote:
Hello,

I am trying to embed one chemical on another and have them fit as well as 
possible given the common substructure. I am (sometimes) having trouble with 
chiral centers. It’s automated, so I don’t want to hand-define things. The 
position restraints we introduce via ff.AddDistanceConstraint are usually 
working, but the hydrogen can sometimes get stuck on the “wrong” side of a 
carbon. Based on my previous experience with other molecular simulation tools, 
it’s the regular ff angle potentials that most strongly inhibit harmonic 
distance/position restraints from pulling the hydrogen over to the 
“correct”/desired side. What I would like to do is remove all angle potentials 
(or set their force constant to zero/near zero), do the EM via ff.Minimize(), 
then add back the regular angles and do EM again. However, I cannot figure out 
how to remove some or all of the regular ff potentials in python.

I investigated removing all bonds following this idea: 
https://github.com/rdkit/rdkit/issues/393 and generating a LJ/q-only force 
field, but the subsequent call to 
rdForceFieldHelpers.MMFFGetMoleculeProperties() returns None and then the 
AddDistanceConstraint() call fails.

I also see that I can use 
rdkit.Chem.rdForceFieldHelpers.GetUFFAngleBendParams(), which works to print 
out what is there, but there does not seem to be an analogous Set function, at 
least not one that is accessible via python.

Thank you for your advice,
Chris.
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to