I am trying to perform a QM/MM optimization in which my substrate is in the MM region. However when this happens there are significant changes to the geometry (undesired). I want to avoid fixing all atoms in place and having to constrain all distances/angles/diehedrals. Does anyone know how to select an index of atoms to constrain and which constraint might be best (using pDynamo)?
To tether a set of atoms (index or fragment) in pDynamo, the below lines are needed (energy model can vary):
tethers = pM.SoftConstraintContainer () system.DefineSoftConstraints ( tethers ) reference = Clone ( system.coordinates3 ) tetherEnergyModel = SoftConstraintEnergyModelHarmonic ( 0.1 , 500.0 ) NAME1 = "IronOH" sele1 = Selection.FromIterable ( range(5024,5027) ) tethers[NAME1] = SoftConstraintMultipleTether ( sele1 , reference , tetherEnergyModel )
This particular constraint tethers the atoms in range 5024-5027 to 0.1 Å from the reference with a force constant of 500.0 kJ/mol.
To have multiple ranges the below can be used:
sele = Selection.FromIterable ( range(0,2878) + range(2896,3191) )