Package schrodinger :: Package application :: Package desmond :: Module remd
[hide private]
[frames] | no frames]

Module remd

Utilities for REMD.

Copyright Schrodinger, LLC. All rights reserved.

Functions [hide private]
 
is_water(site, constraint)
 
get_nonduplicated_atom(ct)
 
get_num_wateratom(model, selected_atom)
 
get_num_nonwateratom(model, selected_atom)
 
get_num_constraint(model, selected_atom)
 
get_degrees_of_freedom(model, selected_atom)
 
get_rest_params(model, asl)
Returns parameters that are required for temperature ladder prediction
tuple(list of floats, list of floats)
predict_temperature_ladder(temperature, exchange_probability, model, asl, should_fix=True, floaty=False)
Returns: returns a tuple with two lists.
 
_predict_temperature_ladder(temperature, exchange_probability, ndf, nw, np, nc, should_fix, floaty)
Backend calculation for predicting temperature ladder
 
predict_with_temp_and_exch(temp, exchange_probability, model, asl)
Given temperature range and exchange_probability, predicts the number of replica and returns the temperature ladder.
(list of floats, list of floats)
predict_with_nreplica_and_exch(n_replica, exchange_probability, base_temp, model, asl)
Given the base temperature, number of replicas, and exchange_probability, predicts the top temperature and returns the temperature ladder.
(list of floats, list of floats)
predict_with_temp_and_nreplica(temperature, n_replica, model, asl)
Given the temperature range and number of replicas, predicts the exchange probability and returns the temperature ladder.
 
split_ct(ct, selected_atom)
 
set_freezing_atommass(model, mass_scale)
 
freeze_atom(model, asl, frozen_atom_mass_threshold=1000000000.0)
 
write_ff_solute_tempering(model, out_fname, asl, scaling_factor, should_scale_torsion=True)
write cms.Cms to a file with scaled force field terms
cms.Cms
rescale_ff_solute_tempering(model, asl, scaling_factor, should_scale_torsion=True)
return cms.Cms with scaled force field terms
 
rescale_ff(ct, rest_atoms, scaling_factor, should_scale_torsion=True)
scales force field terms for rest atoms
 
_rescale_charge(ct, rest_atoms, scaling_factor)
scales rest atom charge
 
_rescale_vdw(ct, rest_atoms, scaling_factor)
scales vdwtype and creates new vdwtype by appending _S for rest atoms
 
_rescale_dihedral(ct, rest_atoms, scaling_factor)
scales dihedral terms
 
test_get_num_wateratom(model)
 
test_get_num_nonwateratom(model)
 
test_get_num_constraint(model)
 
test_get_degrees_of_freedom(model)
 
test_predict_temperature(model)
 
test_freeze_atom(model)
 
test_predict_with_nreplica_and_exch(model)
 
test_predict_with_temp_and_nreplica(model)
Variables [hide private]
  erf = <ufunc 'erf'>
  FROZEN_ATOM_MASS_THRESHOLD = 1000000000.0
  model = cms.Cms(file= "test.cms")
  __package__ = 'schrodinger.application.desmond'
Function Details [hide private]

get_rest_params(model, asl)

 

Returns parameters that are required for temperature ladder prediction

@type model: C{schrodinger.application.desmond.cms.Cms}
@type asl: str

@return the tuple with the following values:
    degrees of freedom, number of selected waters, number of selected
    non-waters, number of constraints.
@rtype tuple(int, int, int, int)

predict_temperature_ladder(temperature, exchange_probability, model, asl, should_fix=True, floaty=False)

 
Parameters:
  • temperature (tuple(float, float)) - a tuple (t0, t1) temperature range in Kelvin
  • should_fix (bool) - ???
  • floaty (bool) - ???
  • exchange_probability (float)
  • model (schrodinger.application.desmond.cms.Cms)
  • asl (str)
Returns: tuple(list of floats, list of floats)
returns a tuple with two lists. First list is a temperature profile, second list is probability profile.

predict_with_nreplica_and_exch(n_replica, exchange_probability, base_temp, model, asl)

 

Given the base temperature, number of replicas, and exchange_probability, predicts the top temperature and returns the temperature ladder.

Parameters:
  • model (schrodinger.application.desmond.cms.Cms)
  • asl (str)
  • base_temp (float)
  • n_replica (int)
  • exchange_probability (float)
Returns: (list of floats, list of floats)
a list of temperatures in Kelvin (length n_replica) and exchange a list of corresponding exchange probabilities (length n_replica-1)

predict_with_temp_and_nreplica(temperature, n_replica, model, asl)

 

Given the temperature range and number of replicas, predicts the exchange probability and returns the temperature ladder.

Parameters:
  • temperature (tuple(float, float)) - a tuple of (min, max) temperatures, in Kelvin
  • base_temp (float)
  • model (schrodinger.application.desmond.cms.Cms)
  • asl (str)
  • exchange_probability (float)
Returns: (list of floats, list of floats)
a list of temperatures (length n_replica) and exchange a list of corresponding exchange probabilities (length n_replica-1)

write_ff_solute_tempering(model, out_fname, asl, scaling_factor, should_scale_torsion=True)

 

write cms.Cms to a file with scaled force field terms

Parameters:
  • model (cms.Cms) - input cms.Cms
  • out_fname (str) - output file name
  • asl (str) - ASL expression to define rest atoms
  • scaling_factor (float) - T_ref/T_hot
  • should_scale_torsion (Boolean) - whether to scale dihedral terms

rescale_ff_solute_tempering(model, asl, scaling_factor, should_scale_torsion=True)

 

return cms.Cms with scaled force field terms

Parameters:
  • model (cms.Cms) - input cms.Cms
  • asl (str) - ASL expression to define rest atoms
  • scaling_factor (float) - T_ref/T_hot
  • should_scale_torsion (Boolean) - whether to scale dihedral terms
Returns: cms.Cms
rescaled cms.Cms

rescale_ff(ct, rest_atoms, scaling_factor, should_scale_torsion=True)

 

scales force field terms for rest atoms

Parameters:
  • ct (ffiostructure.FFIOStructure) - input/output structure handle
  • rest_atoms (list of int) - sequence of atom indices in rest region
  • scaling_factor (float) - T_ref/T_hot
  • should_scale_torsion (Boolean) - whether to scale dihedral terms

_rescale_charge(ct, rest_atoms, scaling_factor)

 

scales rest atom charge

@type ct: ffiostructure.FFIOStructure
@param ct: input/output structure handle
@type rest_atoms: list of int
@param rest_atoms: sequence of atom indices in rest region
@type scaling_factor: float
@param scaling_factor: T_ref/T_hot

Charge scaling in place
q_i *= sf_i
where
    sf_i = sqrt(scaling_factor) when i is a rest atom
    otherwise sf_i = 1.0

_rescale_vdw(ct, rest_atoms, scaling_factor)

 

scales vdwtype and creates new vdwtype by appending _S for rest atoms

Parameters:
  • ct (ffiostructure.FFIOStructure) - input/output structure handle
  • rest_atoms (list of int) - sequence of atom indices in rest region
  • scaling_factor (float) - T_ref/T_hot

    vdw.t1 = scaling_factor

_rescale_dihedral(ct, rest_atoms, scaling_factor)

 

scales dihedral terms

@type ct: ffiostructure.FFIOStructure
@param ct: input/output structure handle
@type rest_atoms: list of int
@param rest_atoms: sequence of atom indices in rest region
@type scaling_factor: float
@param scaling_factor: T_ref/T_hot

Dihedral scaling
d.t1 = sf_i * sf_l
where
    d.t1 = scaling factor for a dihedral term with i, j, k, l atoms
    sf_i = sqrt(scaling_factor) when i is a rest atom
    sf_l = sqrt(scaling_factor) when l is a rest atom
    otherwise sf_i = sf_l = 1.0