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> 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
> 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