SST2 package

Subpackages

Submodules

SST2.rest2 module

class SST2.rest2.REST2(system, pdb, forcefield, solute_index, integrator, platform_name='CUDA', temperature=300 K, pressure=1.0 atm, barostatInterval=25, dt=2 fs, friction=1 /ps, nonbondedMethod=PME, nonbondedCutoff=1 nm, constraints=HBonds, rigidWater=True, ewaldErrorTolerance=0.0005, hydrogenMass=1.0 Da, exclude_Pro_omegas=False)[source]

Bases: object

REST2 class

Attributes:
systemSystem

The system to simulate

simulationSimulation

The simulation object

positionscoordinates

The coordinates of the system

topologyTopology

The topology of the system

solute_indexlist

The list of the solute index

solvent_indexlist

The list of the solvent index

system_forcesdict

The dict of the system forces

scalefloat

The scaling factor or lambda, default is 1.0

init_nb_paramlist

The list of the initial nonbonded parameters (charge, sigma, epsilon)

init_nb_exept_indexlist

The list of the exception indexes

init_nb_exept_valuelist

The list of the initial nonbonded exception parameters (atom1, atom2, chargeProd, sigma, epsilon)

solute_torsion_forceCustomTorsionForce

The torsion force of the solute

init_torsions_indexlist

The list of the torsion indexes

init_torsions_valuelist

The list of the initial torsion parameters

system_soluteSolute System

The solute system

simulation_soluteSolute Simulation

The solute simulation

system_forces_soluteSolute Forces

The solute forces

system_solventSolvent System

The solvent system

simulation_solventSolvent Simulation

The solvent simulation

system_forces_solventSolvent Forces

The solvent forces

init_nb_exept_solute_valuelist

The list of the initial nonbonded exception parameters of the solute (iatom, jatom, chargeprod, sigma, epsilon)

Methods

compute_all_energies()

Compute the energies of the solute and solvent

compute_solute_energies()

Compute the energies of the solute

compute_all_energies()[source]

Extract solute potential energy and solute-solvent interactions.

compute_solute_solvent_system_energy()[source]

Update solute only and solvent only systems coordinates and box vector according to the solute-solvent system values. Extract then forces for each systems.

Returns:
forces_solutelist of float * unit.kilojoules_per_mole / unit.nanometers

Forces on solute

forces_solventlist of float * unit.kilojoules_per_mole / unit.nanometers

Forces on solvent

create_rf_simulation(forcefield, nonbondedMethod=CutoffPeriodic, nonbondedCutoff=1 nm, constraints=HBonds, platform_name='CUDA', temperature=300 K, rigidWater=True, ewaldErrorTolerance=0.0005, hydrogenMass=1.0 Da, friction=1 /ps, dt=2 fs)[source]

Extract solute only and solvent only coordinates. A sytem and a simulation is then created for both systems.

Parameters:
forcefieldstr

Forcefield name

nonbondedMethodNonbonded Method

Nonbonded method, default is app.PME

nonbondedCutofffloat * unit.nanometers

Nonbonded cutoff

constraintsConstraints

Constraints

platform_namestr

Platform name, default is CUDA

rigidWaterbool

Rigid water, default is True

ewaldErrorTolerancefloat

Ewald error tolerance, default is 0.0005

hydrogenMassfloat * unit.amu

Hydrogen mass, default is 1.0 * unit.amu

frictionfloat / unit.picoseconds

Friction, default is 1 / unit.picoseconds

dtfloat * unit.femtosecond

Time step, default is 2 * unit.femtosecond

create_solute_solvent_simulation(forcefield, nonbondedMethod=PME, nonbondedCutoff=1 nm, constraints=HBonds, platform_name='CUDA', rigidWater=True, ewaldErrorTolerance=0.0005, hydrogenMass=1.0 Da, friction=1 /ps, dt=2 fs)[source]

Extract solute only and solvent only coordinates. A sytem and a simulation is then created for both systems.

Parameters:
forcefieldstr

Forcefield name

nonbondedMethodNonbonded Method

Nonbonded method, default is app.PME

nonbondedCutofffloat * unit.nanometers

Nonbonded cutoff

constraintsConstraints

Constraints

platform_namestr

Platform name, default is CUDA

rigidWaterbool

Rigid water, default is True

ewaldErrorTolerancefloat

Ewald error tolerance, default is 0.0005

hydrogenMassfloat * unit.amu

Hydrogen mass, default is 1.0 * unit.amu

frictionfloat / unit.picoseconds

Friction, default is 1 / unit.picoseconds

dtfloat * unit.femtosecond

Time step, default is 2 * unit.femtosecond

find_nb_solute_system()[source]

Extract in the solute only system: - exeption indexes and values (chargeprod, sigma, epsilon)

Solute nonbonded values are not extracted as they are identical to the main system. Indexes are [0 :len(nonbonded values)]

Exception values are stored as indexes [iatom, jatom] are different.

find_solute_nb_index()[source]

Extract initial solute nonbonded indexes and values (charge, sigma, epsilon). Extract also exclusion indexes and values (chargeprod, sigma, epsilon)

Parameters:
None
Returns:
None
get_customPotEnergie()[source]

Extract solute potential energy and solute-solvent interactions.

scale_nonbonded_torsion(scale)[source]

Scale solute nonbonded potential and solute torsion potential

separate_cmap_pot()[source]

CMAP potential is separate in two groups: - the solute (scaled one) - the solvent

The original cmap potential is deleted.

Parameters:
None
Returns:
None
separate_torsion_pot(exclude_Pro_omegas=False)[source]

Use in the REST2 case as it avoid to modify twice the torsion terms in the rest2 system and in the solute system.

Torsion potential is separate in two groups: - the solute (scaled one) - the solvent and not scaled solute torsion.

As improper angles are not supposed to be scaled, here we extract only the proper torsion angles.

To identify proper angles we use a trick from: https://github.com/maccallumlab/meld/blob/master/meld/runner/transform/rest2.py

The original torsion potential is deleted.

Parameters:
exclude_Pro_omegasbool

The exclusion of the proline omegas scaling, default is False

Returns:
None
setup_simulation(integrator, temperature=300 K, pressure=1.0 atm, barostatInterval=25, platform_name='CUDA')[source]

Add the simulation object.

Parameters:
integratoropenmm.Integrator

Integrator

temperaturefloat * unit.kelvin

Temperature, default is 300 * unit.kelvin

pressurefloat * unit.atmospheres

Pressure, default is 1.0 * unit.atmospheres

barostatIntervalint

Barostat interval, default is 25

platform_namestr

Platform name, default is “CUDA”

update_bonded_reaction_field(scale)[source]

Scale system bonded interaction: - LJ epsilon by scale - Coulomb charges by sqrt(scale) - charge product is scaled by scale

update_cmap(scale)[source]

Scale system solute cmap by a scale factor.

update_nonbonded(scale)[source]

Scale system nonbonded interaction: - LJ epsilon by scale - Coulomb charges by sqrt(scale) - charge product is scaled by scale

update_nonbonded_reaction_field(scale)[source]

Scale system nonbonded interaction: - LJ epsilon by scale - Coulomb charges by sqrt(scale) - charge product is scaled by scale

update_nonbonded_solute(scale)[source]

Scale solute only system nonbonded interaction: - LJ epsilon by scale - Coulomb charges by sqrt(scale) - charge product is scaled by scale

update_torsions(scale)[source]

Scale system solute torsion by a scale factor.

class SST2.rest2.Rest2Reporter(file, reportInterval, rest2)[source]

Bases: object

Reporter for REST2 simulation

Attributes:
filestring

The file to write to

reportIntervalint

The interval (in time steps) at which to write frames

rest2REST2

The REST2 object to generate the report

Methods

describeNextReport(simulation)

Generate a report.

describeNextReport(simulation)[source]
report(simulation, state)[source]

Generate a report. Compute the energies of: - the solute scaled - the solute not scaled - the solvent - the solute-solvent

Then write them to the file (self._out).

Parameters:
stateState

The current state of the simulation

Returns:
None
SST2.rest2.run_rest2(sys_rest2, generic_name, tot_steps, dt, save_step_dcd=100000, save_step_log=500, save_step_rest2=500, overwrite=False, remove_reporters=True, add_REST2_reporter=True, save_checkpoint_steps=None)[source]

Run REST2 simulation

Parameters:
sys_rest2Rest2 object

System to run

generic_namestr

Generic name for output files

tot_stepsint

Total number of steps to run

dtfloat

Time step in fs

save_step_dcdint, optional

Step to save dcd file, by default 100000

save_step_logint, optional

Step to save log file, by default 500

save_step_rest2int, optional

Step to save rest2 file, by default 500

overwritebool, optional

If True, overwrite previous files, by default False

save_checkpoint_stepsint, optional

Step to save checkpoint file, by default None

SST2.sst2 module

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

class SST2.sst2.SST2(rest2, temperatures, refTemperature=None, weights=None, tempChangeInterval=25, reportInterval=1000, reportFile=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, restart_files=None, restart_files_full=None)[source]

Bases: object

SimulatedTempering implements the simulated tempering algorithm for accelerated sampling.

It runs a simulation while allowing the temperature to vary. At high temperatures, it can more easily cross energy barriers to explore a wider area of conformation space. At low temperatures, it can thoroughly explore each local region. For details, see Marinari, E. and Parisi, G., Europhys. Lett. 19(6). pp. 451-458 (1992).

The set of temperatures to sample can be specified in two ways. First, you can explicitly provide a list of temperatures by using the “temperatures” argument. Alternatively, you can specify the minimum and maximum temperatures, and the total number of temperatures to use. The temperatures are chosen spaced exponentially between the two extremes. For example,

st = SimulatedTempering(simulation, numTemperatures=15,

minTemperature=300*kelvin, maxTemperature=450*kelvin)

After creating the SimulatedTempering object, call step() on it to run the simulation.

Transitions between temperatures are performed at regular intervals, as specified by the “tempChangeInterval” argument. For each transition, a new temperature is selected using the independence sampling method, as described in Chodera, J. and Shirts, M., J. Chem. Phys. 135, 194110 (2011).

Simulated tempering requires a “weight factor” for each temperature. Ideally, these should be chosen so the simulation spends equal time at every temperature. You can specify the list of weights to use with the optional “weights” argument. If this is omitted, weights are selected automatically using the Wang-Landau algorithm as described in Wang, F. and Landau, D. P., Phys. Rev. Lett. 86(10), pp. 2050-2053 (2001).

To properly analyze the results of the simulation, it is important to know the temperature and weight factors at every point in time. The SimulatedTempering object functions as a reporter, writing this information to a file or stdout at regular intervals (which should match the interval at which you save frames from the simulation). You can specify the output file and reporting interval with the “reportFile” and “reportInterval” arguments.

Parameters:
rest2: REST2

The REST2 object defining the System, Context, and Integrator to use

simulation: Simulation

The Simulation defining the System, Context, and Integrator to use

Attributes:
weights

Methods

step(steps)

Run a number of time steps.

compute_starting_weight(restart_files, restart_files_full)[source]

Compute the weight factor for each temperature.

Parameters:
restart_files: list of strings

Files to read restart information to, specified as a file name

restart_files_full: string

Full Rest2 files to read restart information to, specified as a file name

Returns:
first_temp_index: int

Index of the last used temperature to use

step(steps)[source]

Advance the simulation by integrating a specified number of time steps.

property weights
class SST2.sst2.SST2Reporter(sst2)[source]

Bases: object

Methods

describeNextReport

report

describeNextReport(simulation)[source]
report(simulation, state)[source]
SST2.sst2.run_sst2(sys_rest2, generic_name, tot_steps, dt, temperatures, ref_temp, save_step_dcd=100000, save_step_log=500, save_step_rest2=500, tempChangeInterval=500, reportInterval=500, overwrite=False, save_checkpoint_steps=None)[source]

Run a SST2 simulation.

Parameters:
sys_rest2Rest2 object

The system to simulate.

generic_namestr

Generic name for the output files.

tot_stepsint

Total number of steps to run.

dtfloat

Time step in fs.

temperatureslist of float

List of temperatures to simulate.

ref_tempfloat

Reference temperature.

save_step_dcdint, optional

Number of steps between each DCD save. The default is 100000.

save_step_logint, optional

Number of steps between each log save. The default is 500.

save_step_rest2int, optional

Number of steps between each Rest2 save. The default is 500.

tempChangeIntervalint, optional

Number of steps between each temperature change. The default is 500.

reportIntervalint, optional

Number of steps between each report. The default is 500.

overwritebool, optional

Overwrite the previous simulation. The default is True.

save_checkpoint_stepsint, optional

Number of steps between each checkpoint save. The default is None.

SST2.st module

Authors: Samuel Murail.

This package is largely inspired by the Peter Eastman’s simulatedtempering library from the OpenMM package. The original license is reproduced below :

simulatedtempering.py: Implements simulated tempering

This is part of the OpenMM molecular simulation toolkit originating from Simbios, the NIH National Center for Physics-Based Simulation of Biological Structures at Stanford, funded under the NIH Roadmap for Medical Research, grant U54 GM072970. See https://simtk.org.

Portions copyright (c) 2015 Stanford University and the Authors. Authors: Peter Eastman Contributors:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

class SST2.st.ST(simulation, temperatures, weights=None, tempChangeInterval=25, reportInterval=1000, reportFile=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, restart_files=None, restart_files_full=None)[source]

Bases: object

SimulatedTempering implements the simulated tempering algorithm for accelerated sampling.

It runs a simulation while allowing the temperature to vary. At high temperatures, it can more easily cross energy barriers to explore a wider area of conformation space. At low temperatures, it can thoroughly explore each local region. For details, see Marinari, E. and Parisi, G., Europhys. Lett. 19(6). pp. 451-458 (1992).

The set of temperatures to sample can be specified in two ways. First, you can explicitly provide a list of temperatures by using the “temperatures” argument. Alternatively, you can specify the minimum and maximum temperatures, and the total number of temperatures to use. The temperatures are chosen spaced exponentially between the two extremes. For example,

st = SimulatedTempering(simulation, numTemperatures=15)

After creating the SimulatedTempering object, call step() on it to run the simulation.

Transitions between temperatures are performed at regular intervals, as specified by the “tempChangeInterval” argument. For each transition, a new temperature is selected using the independence sampling method, as described in Chodera, J. and Shirts, M., J. Chem. Phys. 135, 194110 (2011).

Simulated tempering requires a “weight factor” for each temperature. Ideally, these should be chosen so the simulation spends equal time at every temperature. You can specify the list of weights to use with the optional “weights” argument. If this is omitted, weights are selected automatically using the Wang-Landau algorithm as described in Wang, F. and Landau, D. P., Phys. Rev. Lett. 86(10), pp. 2050-2053 (2001).

To properly analyze the results of the simulation, it is important to know the temperature and weight factors at every point in time. The SimulatedTempering object functions as a reporter, writing this information to a file or stdout at regular intervals (which should match the interval at which you save frames from the simulation). You can specify the output file and reporting interval with the “reportFile” and “reportInterval” arguments.

Parameters:
simulation: Simulation

The Simulation defining the System, Context, and Integrator to use

temperatures: list

The list of temperatures to use for tempering, in increasing order

weights: list

The weight factor for each temperature. If none, weights are selected automatically.

tempChangeInterval: int

The interval (in time steps) at which to attempt transitions between temperatures

reportInterval: int

The interval (in time steps) at which to write information to the report file

reportFile: string or file

The file to write reporting information to, or stdout if not specified

Attributes:
weights

Methods

compute_starting_weight(restart_files, restart_files_full)

Compute the starting weight for each temperature

compute_starting_weight(restart_files, restart_files_full)[source]

Compute the weight factor for each temperature.

Parameters:
restart_files: list of strings

Files to read restart information to, specified as a file name

restart_files_full: string

Full Rest2 files to read restart information to, specified as a file name

Returns:
first_temp_index: int

Index of the last used temperature

step(steps)[source]

Advance the simulation by integrating a specified number of time steps.

property weights
class SST2.st.STReporter(st)[source]

Bases: object

ST reporter to the simulation which will handle the updates and reports.

Methods

describeNextReport

report

describeNextReport(simulation)[source]
report(simulation, state)[source]
SST2.st.run_st(simulation, topology, generic_name, tot_steps, dt, temperatures, tempChangeInterval=100, save_step_dcd=100000, save_step_log=500, overwrite=False, save_checkpoint_steps=None)[source]

Run REST2 simulation

Parameters:
sys_rest2Rest2 object

System to run

generic_namestr

Generic name for output files

tot_stepsint

Total number of steps to run

dtfloat

Time step in fs

save_step_dcdint, optional

Step to save dcd file, by default 100000

save_step_logint, optional

Step to save log file, by default 500

save_step_rest2int, optional

Step to save rest2 file, by default 500

overwritebool, optional

If True, overwrite previous files, by default False

save_checkpoint_stepsint, optional

Step to save checkpoint file, by default None

SST2.tools module

SST2.tools.add_distance_restr(system, index_0_list, index_1_list, dist_min_list, k_rest, restr_force_group=None, constant_name='k_dist')[source]

Add position restraints to the system

Parameters:
systemopenmm.System

System object

index_0int

Index of the first atom

index_1int

Index of the second atom

dist_minfloat

Minimum distance (nm)

k_restfloat

Force constant (KJ/mol/nm^2)

restr_force_groupint

Force group, default is 2

constant_namestr

Name of the force constant, default is k_dist

Returns:
restraintopenmm.CustomExternalForce

Restraint object

SST2.tools.add_pos_restr(system, index_list, cif_ref, k_rest, restr_force_group=None, constant_name='k')[source]

Add position restraints to the system

Parameters:
systemopenmm.System

System object

index_listlist

List of indices to restrain

cif_refopenmm.app.PDBxFile

Reference cif file

k_restfloat

Force constant (KJ/mol/nm^2)

restr_force_groupint

Force group, default is 2

constant_namestr

Name of the force constant, default is k

Returns:
restraintopenmm.CustomExternalForce

Restraint object

SST2.tools.compute_ladder_num(generic_name, min_temp, max_temp, sst2_score=False)[source]

Compute the number of temperatures to simulate.

Parameters:
generic_namestr

Generic name for the simulation files.

min_tempfloat

Minimum temperature to simulate.

max_tempfloat

Maximum temperature to simulate.

sst2_scorebool, optional

If True, use the SST2 score. The default is False.

Robert Denschlag, Martin Lingenheil, Paul Tavan, Optimal temperature ladders in replica exchange simulations, Chemical Physics Letters, Volume 473, Issues 1–3, 2009,

$$ N = 1 +

rac{0.594 sqrt{-E_{pot}}}{2 cdot 0.534} lnleft(
rac{T_{max}}{T_{min}}
ight) $$
Returns:
int

Number of temperatures to simulate.

SST2.tools.compute_temperature_list(minTemperature, maxTemperature, numTemperatures, refTemperature=None)[source]

Compute the list of temperatures to simulate.

Parameters:
minTemperaturefloat

Minimum temperature to simulate.

maxTemperaturefloat

Maximum temperature to simulate.

numTemperaturesint

Number of temperatures to simulate.

refTemperaturefloat, optional

Reference temperature. The default is None.

SST2.tools.create_custom_bonded_force_rf(original_nonbonded_force, atom_index, ONE_4PI_EPS0=138.935456)[source]

Create a CustomBondForce to compute the solute-solvent exceptions. This force is used in combination with the CustomNonbondedForce with Reaction Field. The CustomNonbondedForce with Reaction Field does not include exceptions, so we need to add them with a CustomBondForce.

Parameters:
original_nonbonded_forceNonbondedForce

The original NonbondedForce of the system

atom_indexlist

The list of the solute and solvent indexes

ONE_4PI_EPS0float

The constant 1/(4*pi*epsilon0) in kJ nm / mol e2, default is 138.935456 kJ nm / mol e2

Returns:
CustomBondForce

The custom bond force with reaction field

SST2.tools.create_custom_nonbonded_force_rf(original_nonbonded_force, indexes, cutoff=1 nm, ONE_4PI_EPS0=138.935456)[source]

Create a CustomNonbondedForce with Reaction Field to compute the solute-solvent interactions.

Parameters:
original_nonbonded_forceNonbondedForce

The original NonbondedForce of the system

indexeslist

The list of the solute and solvent indexes

cutofffloat * unit.nanometers

The cutoff distance, default is 1 nm

ONE_4PI_EPS0float

The constant 1/(4*pi*epsilon0) in kJ nm / mol e2, default is 138.935456 kJ nm / mol e2

Returns:
CustomNonbondedForce

The custom nonbonded force with reaction field

SST2.tools.create_linear_peptide(seq, out_pdb, n_term=None, c_term=None)[source]

Creates a linear peptide and save it in out_pdb file.

Parameters:
seqstr

Sequence of the peptide

out_pdbstr

Path to the output pdb file

n_termstr

N-terminal residue, default is None

c_termstr

C-terminal residue, default is None

Returns:
None
SST2.tools.create_sim_system(cif, forcefield, temp=300.0, h_mass=1.5, base_force_group=1, rigidWater=True, constraints=HBonds)[source]
SST2.tools.create_system_simulation(file_io, forcefield, cif_format=True, dt=2 fs, temperature=300 K, friction=1 /ps, nonbondedMethod=PME, nonbondedCutoff=1 nm, constraints=HBonds, platform_name='CUDA', rigidWater=True, ewaldErrorTolerance=0.0005, hydrogenMass=1.0 Da)[source]

Creates a system and simulation object

Parameters:
file_iostr or StringIO

Path or StringIO of the cif/pdb file

forcefieldOpenmm forcefield

forcefield object

cif_formatbool

Is the file in cif format, default is True

dtunit.Quantity

Time step, default is 2 fs

temperatureunit.Quantity

Temperature, default is 300 K

frictionunit.Quantity

Friction coefficient, default is 1 / ps

nonbondedMethodnonbonded method

Nonbonded method, default is app.PME

nonbondedCutoffunit.Quantity

Nonbonded cutoff, default is 1 nm

constraintsconstraint

Constraints, default is app.HBonds

platform_namestr

Platform name, default is CUDA

rigidWaterbool

Rigid water, default is True

ewaldErrorTolerancefloat

Ewald error tolerance, default is 0.0005

hydrogenMassunit.Quantity

Hydrogen mass, default is 1 amu

Returns:
systemopenmm.System

System object

simulationopenmm.app.Simulation

Simulation object

SST2.tools.create_water_box(in_file, out_file, forcefield, pad=None, vec=None, ionicStrength=0.15 M, positiveIon='Na+', negativeIon='Cl-', overwrite=False)[source]

Add a water box around a prepared cif file.

Parameters:
in_filestr

Path to the input cif/pdb file

out_filestr

Path to the output cif/pdb file

forcefieldopenmm ForceField

forcefield object

padfloat

Padding around the peptide in nm

vecfloat

Vector of the box (nm), default is None

ionicStrengthunit.Quantity

Ionic strength of the system, default is 0.15 M

positiveIonstr

Positive ion, default is Na+

negativeIonstr

Negative ion, default is Cl-

overwritebool

Overwrite the output file, default is False

SST2.tools.get_forcefield(forcefield_name, water_model)[source]

Create the forcefield object from the forcefield name.

Parameters:
forcefield_namestr

Name of the forcefield

water_modelstr

Name of the water forcefield

Returns:
forcefieldopenmm ForceField

Forcefield object

SST2.tools.get_forces(system, simulation)[source]

Returns the forces of the system

Parameters:
systemopenmm.System

System object

simulationopenmm.app.Simulation

Simulation object

Returns:
forces_dictdict

Dictionary with the forces

SST2.tools.get_specific_forces(system, simulation, force_name)[source]

Prints the forces of the system

Parameters:
systemopenmm.System

System object

simulationopenmm.app.Simulation

Simulation object

Returns:
None
SST2.tools.implicit_sim(cif_in, forcefield, time, out_generic_name, temp=300 K, dt=2 fs, min_steps=10000, save_coor_step=10000, overwrite=False)[source]

Launch an implicit simulation with following steps: - Energy minimization with maxIterations=min_steps - Implicit simulation

Parameters:
cif_instr

Path to the input cif file

forcefieldopenmm ForceField

forcefield object

timefloat

Simulation time in ns

out_generic_namestr

Generic name of the output files

tempunit.Quantity

Temperature, default is 300 K

dtunit.Quantity

Time step, default is 2 fs

min_stepsint

Number of minimization steps, default is 10000

save_coor_stepint

Save coordinates every save_coor_step steps, default is 10000

overwritebool

Overwrite the output file, default is False

Returns:
None
SST2.tools.minimize(simulation, out_cif, topology, maxIterations=10000, overwrite=False)[source]

Minimize the energy of a system

Parameters:
simulationopenmm.app.Simulation

Simulation object

out_cifstr

Path to the output cif file

topologyopenmm.app.Topology

Topology object

maxIterationsint

Maximum number of iterations, default is 10000

overwritebool

Overwrite the output file, default is False

SST2.tools.prepare_pdb(in_pdb, out_cif, pH=7.0, overwrite=False)[source]

Prepare a raw pdb file adding : - missing residues - add hydrogens at user defined pH - add missing atoms

Parameters:
in_pdbstr

Path to the input pdb file

out_cifstr

Path to the output pdb file

pHfloat

pH of the system, default is 7.0

overwritebool

Overwrite the output file, default is False

SST2.tools.print_forces(system, simulation)[source]

Prints the forces of the system

Parameters:
systemopenmm.System

System object

simulationopenmm.app.Simulation

Simulation object

Returns:
None
SST2.tools.run_sim_check_time(simulation, nsteps, dt, save_checkpoint_steps=None, chekpoint_name=None)[source]

Run a simulation and check the time

Parameters:
simulationopenmm.app.Simulation

Simulation object

nstepsint

Number of steps

dtunit.Quantity

Time step

save_checkpoint_stepsint

Number of steps between each checkpoint

chekpoint_namestr

Name of the checkpoint file

SST2.tools.setup_simulation(system, position, topology, integrator, platform_name='CUDA')[source]

Creates a simulation object

Parameters:
systemopenmm.System

System object

positionunit.Quantity

Positions

topologyopenmm.app.Topology

Topology object

integratoropenmm.Integrator

Integrator object

platform_namestr

Platform name, default is CUDA

Returns:
simulationopenmm.app.Simulation

Simulation object

SST2.tools.simulate(simulation, topology, tot_steps, dt, generic_name, additional_reporters=[], save_step_dcd=10000, save_step_log=10000, remove_reporters=True, save_checkpoint_steps=None, overwrite=False)[source]

Run the simulation.

Parameters:
simulationopenmm.app.Simulation

Simulation object.

topologyopenmm.app.Topology

Topology object.

tot_stepsint

Total number of steps to run.

dtfloat

Time step.

generic_namestr

Generic name for output files.

additional_reporterslist, optional

List of additional reporters. The default is [].

save_step_dcdint, optional

Step to save dcd file. The default is 10000.

save_step_logint, optional

Step to save log file. The default is 10000.

save_checkpoint_stepsint, optional

Step to save consecutive checkpoint file. The default is None.

overwritebool, optional

Overwrite previous simulation. The default is False.

Module contents

SST2 module.

SST2.show_log()[source]