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

Module cms

Classes and functions for dealing with *.cms files.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  Restrain
  AtomGroup
  Site
  Pseudo
  Constraint
  Vdw
A class for handling VDW parameters.
  Cms
Functions [hide private]
 
check_sanity(struc)
 
mark_fullsystem_ct(struc)
Marks atoms in the "full_system" CT with the "s_ffio_ct_type" and "i_ffio_ct_index" properties, and returns the marked full_system CT as a 'Structure' object.
 
get_box(ct)
Given a CT, extract the following properties' values: "r_chorus_box_ax", "r_chorus_box_ay", "r_chorus_box_az", "r_chorus_box_bx", "r_chorus_box_by", "r_chorus_box_bz", "r_chorus_box_cx", "r_chorus_box_cy", "r_chorus_box_cz", and returns them as a list of float values.
 
get_boxsize(box)
Given a simulation box in the form of a 3x3 matrix, this function returns the size of the box.
 
dotprod(v, u)
Returns the dot product of two 3-D vectors.
 
crossprod(v, u)
Returns the cross product of two 3-D vectors.
 
norm(v)
Returns the norm of the 3-D vector 'v'.
 
get_boxvolume(box)
 
_aslselect_atom(ct, asl, with_pbc=True)
Given a CT ('Structure' object) and an ASL expression ('str' object), returns a list of atoms selected by the ASL.
 
aslselect_atom(struc, asl, should_mark_fullsystem=True)
Similar as 'aslselect_atom', but the 'struc' must be a list of CTs ('Structure' objects) in the same order as in a .cms file (i.e., the first one must be a "full_system" CT, followed by component CTs).
 
has_ffio(ct)
Returns 1 if 'ct' has an mmffio block, or 0 if it does not.
 
has_fepio(ct)
Returns True if any of the 'ct' have a fepio_fep block, or False if they do not.
 
get_model_system_type(struc)
Returns 1 if the CTs in 'struc' have a fepio_fep block.
 
decomp_rawfep_structure(struc)
 
_sort_posre_helper(r0, r1)
 
sort_posre(restr)
 
merge_relative_restraint(a, b)
The 'a' and 'b' must be a list.
 
combine_vdw(v1, v2, comb_rule="geometric")
Given two homogenous Vdw objects 'v1' and 'v2' and a combination rule 'comb_rule', this function returns a Vdw object as a combination of 'v1' and 'v2'.
 
calc_average_vdw_coeff(struc)
Calculates and returns the average dispersion coefficient.
 
_get_gluepoints_impl_old(model, cutoff)
A grid-based implementation.
 
_get_gluepoints_impl(model, cutoff)
A PBC-aware implementation.
 
get_gluepoints(model, cutoff=3.0)
 
find_prev_residue(ct, residue)
 
find_next_residue(ct, residue)
 
gen_alpha_helix_restraint(model, helix_asl, fc, sigma, ref)
Given a model ('Cms' object) and an optional 'helix_asl' expression, returns a string specifying the restraint settings.
 
test_get_gluepoints()
 
test_get_num_constraint()
 
test_clear_restrain()
 
test_gen_alpha_helix_restraint()
 
test_get_degrees_of_freedom()
Function Details [hide private]

mark_fullsystem_ct(struc)

 

Marks atoms in the "full_system" CT with the "s_ffio_ct_type" and "i_ffio_ct_index" properties, and returns the marked
full_system CT as a 'Structure' object.

@param struc: A list of 'Structure' objects. The first object should be the "full_system" CT, followed by the component
    CTs in the same order as in the .cms file.

Note that the returned 'Structure' object will be a new one, not the same one as in 'struc'.

get_box(ct)

 

Given a CT, extract the following properties' values:
    "r_chorus_box_ax", "r_chorus_box_ay", "r_chorus_box_az",
    "r_chorus_box_bx", "r_chorus_box_by", "r_chorus_box_bz",
    "r_chorus_box_cx", "r_chorus_box_cy", "r_chorus_box_cz",
and returns them as a list of float values. The order of the values in the list is the same as written above.
A 'KeyError' exception will be raised if any property is missing in the CT.

_aslselect_atom(ct, asl, with_pbc=True)

 

Given a CT ('Structure' object) and an ASL expression ('str' object), returns a list of atoms selected by the ASL.
If 'with_pbc' is set to True, the periodic boundary condition will be taken into account in evaluation of the ASL
expression, but in this case, the CT must contain the periodic boundary information as the following CT properties:
    "r_chorus_box_ax", "r_chorus_box_ay", "r_chorus_box_az",
    "r_chorus_box_bx", "r_chorus_box_by", "r_chorus_box_bz",
    "r_chorus_box_cx", "r_chorus_box_cy", "r_chorus_box_cz".

aslselect_atom(struc, asl, should_mark_fullsystem=True)

 

Similar as 'aslselect_atom', but the 'struc' must be a list of CTs ('Structure' objects) in the same order as in a .cms file (i.e., the first one must be a "full_system" CT, followed by component CTs). The periodic boundary condition will be taken into account. The "s_ffio_ct_type" and "i_ffio_ct_index" atom properties are recognized. This function returns a 'dict' object. The keys are CT index ('full_system' CT's index is 0, component CT's index starts from 1), and the values are list of selected atoms of the corresponding component CT.

has_ffio(ct)

 

Returns 1 if 'ct' has an mmffio block, or 0 if it does not. 'ct' should be either a FFIOStructure or a Structure object.

has_fepio(ct)

 

Returns True if any of the 'ct' have a fepio_fep block, or False if they do not.

Parameters:
  • ct - Either a FFIOStructure or a Structure object

get_model_system_type(struc)

 

Returns 1 if the CTs in 'struc' have a fepio_fep block. Returns 2 if the CTs in 'struc' have a non-empty ligand atom group and do not have an fepio_fep block. Returns 0 otherwise.

Parameters:

merge_relative_restraint(a, b)

 

The 'a' and 'b' must be a list. Each element is a list of 'RelativeRestrain' objects for the corresponding component CT.

calc_average_vdw_coeff(struc)

 

Calculates and returns the average dispersion coefficient.

The unit of the coefficient is in the unit of the original ffio block.

Parameters:

_get_gluepoints_impl(model, cutoff)

 

A PBC-aware implementation. WARNING: This algorithm is VERY slow.