Rename the reference_state to reference_sampler_state to reduce "state" confusion
@@ -2087,7 +2087,7 @@ class RMSD(ReceptorLigandRestraint):
The spring constant (units compatible with kilocalories_per_mole/angstrom**2).
RMSD0 : simtk.unit.Quantity, optional, default=2.0*angstrom
The RMSD at which the restraint becomes nonzero.
- reference_state : openmmtools.states.SamplerState or None, Optional
+ reference_sampler_state : openmmtools.states.SamplerState or None, Optional
Reference sampler state with coordinates to use as the structure to align the RMSD to.
The sampler state must have the same number of particles as the thermodynamic state you
will apply this force to. This can temporarily be left undefined, but
@@ -2134,12 +2134,12 @@ class RMSD(ReceptorLigandRestraint):
"""
def __init__(self, restrained_receptor_atoms=None, restrained_ligand_atoms=None,
K_RMSD=None, RMSD0=None,
- reference_state=None):
+ reference_sampler_state=None):
self.restrained_receptor_atoms = restrained_receptor_atoms
self.restrained_ligand_atoms = restrained_ligand_atoms
self.K_RMSD = K_RMSD
self.RMSD0 = RMSD0
- self.reference_state = reference_state
+ self.reference_sampler_state = reference_sampler_state
# -------------------------------------------------------------------------
# Public properties.
@@ -2200,7 +2200,7 @@ class RMSD(ReceptorLigandRestraint):
restrained_atoms = self.restrained_receptor_atoms + self.restrained_ligand_atoms
# Create RMSDForce CV for all restrained atoms
- rmsd_cv = openmm.RMSDForce(self.reference_state.positions, restrained_atoms)
+ rmsd_cv = openmm.RMSDForce(self.reference_sampler_state.positions, restrained_atoms)
# Create an CustomCVForce
energy_expression = 'lambda_restraints * step(dRMSD) * (K_RMSD/2)*dRMSD^2; dRMSD = (RMSD-RMSD0);'
@@ -2275,7 +2275,7 @@ class RMSD(ReceptorLigandRestraint):
logger.debug(msg)
# Assign the sampler state
- _assign_if_undefined('reference_state', sampler_state)
+ _assign_if_undefined('reference_sampler_state', sampler_state)
# -------------------------------------------------------------------------
# Internal-usage
@@ -2287,8 +2287,8 @@ class RMSD(ReceptorLigandRestraint):
raise RestraintParameterError('Undefined restrained atoms. Please run `determine_missing_parameters`')
if None in [self.K_RMSD, self.RMSD0]:
raise RestraintParameterError("Undefined RMSD parameters. Please run `determine_missing_parameters`")
- if self.reference_state is None:
- raise RestraintParameterError("No reference configuration as defined, "
+ if self.reference_sampler_state is None:
+ raise RestraintParameterError("No reference configuration/structure as defined, "
"Please run `determine_missing_parameters`")
@property
