schrodinger.application.desmond.restraint module

Restraint generation for cross-CT terms and all terms supported by desmond backend, including alchemical terms.

Either a single term or a generator can be used. For single term, each selection corresponds to a single atom.

Two kinds of generators are implemented now:

product: The product of all selections is used to generate all
the terms. Use case is to keep alchemical ions way from places they may get stuck.
connected: One selection is evaluated to generate terms for bond, angle
and torsion. Use case is the alchemical restraints on protein conformations.

Reference distance, angle and torsion values are computed for generated terms. For alchemical terms, reference coordinates saved previously will be used for these calculations if avaialble.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.desmond.restraint.GeneratorTypes(PRODUCT, CONNECTED)

Bases: tuple

CONNECTED

Alias for field number 1

PRODUCT

Alias for field number 0

__add__

Return self+value.

__class__

alias of builtins.type

__contains__

Return key in self.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__getitem__

Return self[key].

__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__gt__

Return self>value.

__hash__

Return hash(self).

__init__

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__iter__

Implement iter(self).

__le__

Return self<=value.

__len__

Return len(self).

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.restraint'
__mul__

Return self*value.n

__ne__

Return self!=value.

static __new__(_cls, PRODUCT, CONNECTED)

Create new instance of GeneratorTypes(PRODUCT, CONNECTED)

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return a nicely formatted representation string

__rmul__

Return self*value.

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__slots__ = ()
__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

count(value) → integer -- return number of occurrences of value
index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

schrodinger.application.desmond.restraint.is_position_restraint(table_name)
schrodinger.application.desmond.restraint.is_alchemical(table_name)
schrodinger.application.desmond.restraint.get_encoded_restraints(cms_sys)

Get encoded restraints from cms

Return type:str
schrodinger.application.desmond.restraint.set_encoded_restraints(cms_sys, restr)

Store restraints in cms_sys object.

class schrodinger.application.desmond.restraint.RestraintBuilder(res_spec, cms_sys)

Bases: object

__init__(res_spec, cms_sys)
Parameters:
  • res_spec (sea.List) – all restraint terms to be added
  • cms_sys (cms.Cms) – cms object for molecules
addRestraints()

Add all restraint terms to the cms object passed in the constructor. This should be the only function called to process all the restraints specified

getEncoded()
Return type:str
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.restraint', '__init__': <function RestraintBuilder.__init__>, '_addAllPosreTerms': <function RestraintBuilder._addAllPosreTerms>, '_addOneTerm': <function RestraintBuilder._addOneTerm>, '_addTermFromGenerator': <function RestraintBuilder._addTermFromGenerator>, 'addRestraints': <function RestraintBuilder.addRestraints>, 'getEncoded': <function RestraintBuilder.getEncoded>, 'getJson': <function RestraintBuilder.getJson>, '__dict__': <attribute '__dict__' of 'RestraintBuilder' objects>, '__weakref__': <attribute '__weakref__' of 'RestraintBuilder' objects>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.restraint'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

getJson()
Return type:str