UnifiedFreeEnergyDynamics¶
- class ufedmm.UnifiedFreeEnergyDynamics(variables, temperature, height=None, frequency=None, bias_factor=None, grid_expansion=20, enforce_gridless=False, buffer_size=100)[source]¶
A Unified Free-Energy Dynamics (UFED) setup.
- Parameters:
variables (list of DynamicalVariable) – The variables.
temperature (float or unit.Quantity) – The temperature.
- Keyword Arguments:
height (float or unit.Quantity, default=None) – The height.
frequency (int, default=None) – The frequency.
bias_factor (float, default=None) – Scales the height of the hills added to the metadynamics bias potential. If it is None, then the hills will have a constant height over time. For a bias factor to be applicable, all bias variables must be at the same temperature T. The extended-space dynamical variables are sampled as if the effective temperature were T*bias_factor.
grid_expansion (int, default=20) – The grid expansion.
enforce_gridless (bool, default=False) – If this is True, gridless metadynamics is enforced even for 1D to 3D problems.
buffer_size (int, default=100) – The buffer size.
Example
>>> import ufedmm >>> from openmm import unit >>> model = ufedmm.AlanineDipeptideModel(water='tip3p') >>> mass = 50*unit.dalton*(unit.nanometer/unit.radians)**2 >>> Ks = 1000*unit.kilojoules_per_mole/unit.radians**2 >>> Ts = 1500*unit.kelvin >>> limit = 180*unit.degrees >>> s_phi = ufedmm.DynamicalVariable( ... 's_phi', -limit, limit, mass, Ts, model.phi, Ks ... ) >>> s_psi = ufedmm.DynamicalVariable( ... 's_psi', -limit, limit, mass, Ts, model.psi, Ks ... ) >>> ufedmm.UnifiedFreeEnergyDynamics([s_phi, s_psi], 300*unit.kelvin) <variables=[s_phi, s_psi], temperature=300, height=None, frequency=None>
Methods
- simulation(topology, system, integrator, platform=None, platformProperties=None)[source]¶
Returns a ExtendedSpaceSimulation object.
Warning
If the temperature of any driving parameter is different from the particle-system temperature, then the passed integrator must be a openmm.CustomIntegrator object containing a per-dof variable kT whose content is the Boltzmann constant times the temperature associated to each degree of freedom. This is true for all integrators available in
ufedmm.integrators, which are subclasses ofufedmm.integrators.CustomIntegrator.- Parameters:
topology (openmm.app.Topology) – The topology.
system (openmm.System) – The system.
integrator – The integrator.
- Keyword Arguments:
platform (openmm.Platform, default=None) – The platform.
platformProperties (dict, default=None) – The platform properties.
Example
>>> import ufedmm >>> from openmm import unit >>> model = ufedmm.AlanineDipeptideModel(water='tip3p') >>> mass = 50*unit.dalton*(unit.nanometer/unit.radians)**2 >>> Ks = 1000*unit.kilojoules_per_mole/unit.radians**2 >>> Ts = 1500*unit.kelvin >>> dt = 2*unit.femtoseconds >>> gamma = 10/unit.picoseconds >>> limit = 180*unit.degrees >>> s_phi = ufedmm.DynamicalVariable( ... 's_phi', -limit, limit, mass, Ts, model.phi, Ks ... ) >>> s_psi = ufedmm.DynamicalVariable( ... 's_psi', -limit, limit, mass, Ts, model.psi, Ks ... ) >>> ufed = ufedmm.UnifiedFreeEnergyDynamics([s_phi, s_psi], 300*unit.kelvin) >>> integrator = ufedmm.GeodesicLangevinIntegrator( ... 300*unit.kelvin, gamma, dt ... ) >>> simulation = ufed.simulation(model.topology, model.system, integrator)