Source code for simtk.openmm.openmm

# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.





from sys import version_info
if version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_openmm', [dirname(__file__)])
        except ImportError:
            import _openmm
            return _openmm
        if fp is not None:
            try:
                _mod = imp.load_module('_openmm', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _openmm = swig_import_helper()
    del swig_import_helper
else:
    import _openmm
del version_info
try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.


def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr_nondynamic(self, class_type, name, static=1):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if (not static):
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)

def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object:
        pass
    _newclass = 0


class ios_base(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ios_base, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ios_base, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    erase_event = _openmm.ios_base_erase_event
    imbue_event = _openmm.ios_base_imbue_event
    copyfmt_event = _openmm.ios_base_copyfmt_event

    def register_callback(self, __fn, __index):
        return _openmm.ios_base_register_callback(self, __fn, __index)

    def flags(self, *args):
        return _openmm.ios_base_flags(self, *args)

    def setf(self, *args):
        return _openmm.ios_base_setf(self, *args)

    def unsetf(self, __mask):
        return _openmm.ios_base_unsetf(self, __mask)

    def precision(self, *args):
        return _openmm.ios_base_precision(self, *args)

    def width(self, *args):
        return _openmm.ios_base_width(self, *args)
    __swig_getmethods__["sync_with_stdio"] = lambda x: _openmm.ios_base_sync_with_stdio
    if _newclass:
        sync_with_stdio = staticmethod(_openmm.ios_base_sync_with_stdio)

    def imbue(self, __loc):
        return _openmm.ios_base_imbue(self, __loc)

    def getloc(self):
        return _openmm.ios_base_getloc(self)
    __swig_getmethods__["xalloc"] = lambda x: _openmm.ios_base_xalloc
    if _newclass:
        xalloc = staticmethod(_openmm.ios_base_xalloc)

    def iword(self, __ix):
        return _openmm.ios_base_iword(self, __ix)

    def pword(self, __ix):
        return _openmm.ios_base_pword(self, __ix)
    __swig_destroy__ = _openmm.delete_ios_base
    __del__ = lambda self: None
ios_base_swigregister = _openmm.ios_base_swigregister
ios_base_swigregister(ios_base)
cvar = _openmm.cvar
ios_base.boolalpha = _openmm.cvar.ios_base_boolalpha
ios_base.dec = _openmm.cvar.ios_base_dec
ios_base.fixed = _openmm.cvar.ios_base_fixed
ios_base.hex = _openmm.cvar.ios_base_hex
ios_base.internal = _openmm.cvar.ios_base_internal
ios_base.left = _openmm.cvar.ios_base_left
ios_base.oct = _openmm.cvar.ios_base_oct
ios_base.right = _openmm.cvar.ios_base_right
ios_base.scientific = _openmm.cvar.ios_base_scientific
ios_base.showbase = _openmm.cvar.ios_base_showbase
ios_base.showpoint = _openmm.cvar.ios_base_showpoint
ios_base.showpos = _openmm.cvar.ios_base_showpos
ios_base.skipws = _openmm.cvar.ios_base_skipws
ios_base.unitbuf = _openmm.cvar.ios_base_unitbuf
ios_base.uppercase = _openmm.cvar.ios_base_uppercase
ios_base.adjustfield = _openmm.cvar.ios_base_adjustfield
ios_base.basefield = _openmm.cvar.ios_base_basefield
ios_base.floatfield = _openmm.cvar.ios_base_floatfield
ios_base.badbit = _openmm.cvar.ios_base_badbit
ios_base.eofbit = _openmm.cvar.ios_base_eofbit
ios_base.failbit = _openmm.cvar.ios_base_failbit
ios_base.goodbit = _openmm.cvar.ios_base_goodbit
ios_base.app = _openmm.cvar.ios_base_app
ios_base.ate = _openmm.cvar.ios_base_ate
ios_base.binary = _openmm.cvar.ios_base_binary
ios_base.ios_base_in = _openmm.cvar.ios_base_ios_base_in
ios_base.out = _openmm.cvar.ios_base_out
ios_base.trunc = _openmm.cvar.ios_base_trunc
ios_base.beg = _openmm.cvar.ios_base_beg
ios_base.cur = _openmm.cvar.ios_base_cur
ios_base.end = _openmm.cvar.ios_base_end

def ios_base_sync_with_stdio(__sync=True):
    return _openmm.ios_base_sync_with_stdio(__sync)
ios_base_sync_with_stdio = _openmm.ios_base_sync_with_stdio

def ios_base_xalloc():
    return _openmm.ios_base_xalloc()
ios_base_xalloc = _openmm.ios_base_xalloc

class ios(ios_base):
    __swig_setmethods__ = {}
    for _s in [ios_base]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ios, name, value)
    __swig_getmethods__ = {}
    for _s in [ios_base]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ios, name)
    __repr__ = _swig_repr

    def rdstate(self):
        return _openmm.ios_rdstate(self)

    def clear(self, *args):
        return _openmm.ios_clear(self, *args)

    def setstate(self, __state):
        return _openmm.ios_setstate(self, __state)

    def good(self):
        return _openmm.ios_good(self)

    def eof(self):
        return _openmm.ios_eof(self)

    def fail(self):
        return _openmm.ios_fail(self)

    def bad(self):
        return _openmm.ios_bad(self)

    def exceptions(self, *args):
        return _openmm.ios_exceptions(self, *args)

    def __init__(self, __sb):
        this = _openmm.new_ios(__sb)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_ios
    __del__ = lambda self: None

    def tie(self, *args):
        return _openmm.ios_tie(self, *args)

    def rdbuf(self, *args):
        return _openmm.ios_rdbuf(self, *args)

    def copyfmt(self, __rhs):
        return _openmm.ios_copyfmt(self, __rhs)

    def fill(self, *args):
        return _openmm.ios_fill(self, *args)

    def imbue(self, __loc):
        return _openmm.ios_imbue(self, __loc)

    def narrow(self, __c, __dfault):
        return _openmm.ios_narrow(self, __c, __dfault)

    def widen(self, __c):
        return _openmm.ios_widen(self, __c)
ios_swigregister = _openmm.ios_swigregister
ios_swigregister(ios)

class ostream(ios):
    __swig_setmethods__ = {}
    for _s in [ios]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ostream, name, value)
    __swig_getmethods__ = {}
    for _s in [ios]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ostream, name)
    __repr__ = _swig_repr

    def __init__(self, __sb):
        this = _openmm.new_ostream(__sb)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_ostream
    __del__ = lambda self: None

    def __lshift__(self, *args):
        return _openmm.ostream___lshift__(self, *args)

    def put(self, __c):
        return _openmm.ostream_put(self, __c)

    def write(self, __s, __n):
        return _openmm.ostream_write(self, __s, __n)

    def flush(self):
        return _openmm.ostream_flush(self)

    def tellp(self):
        return _openmm.ostream_tellp(self)

    def seekp(self, *args):
        return _openmm.ostream_seekp(self, *args)
ostream_swigregister = _openmm.ostream_swigregister
ostream_swigregister(ostream)
cin = cvar.cin
cout = cvar.cout
cerr = cvar.cerr
clog = cvar.clog

class istream(ios):
    __swig_setmethods__ = {}
    for _s in [ios]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, istream, name, value)
    __swig_getmethods__ = {}
    for _s in [ios]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, istream, name)
    __repr__ = _swig_repr

    def __init__(self, __sb):
        this = _openmm.new_istream(__sb)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_istream
    __del__ = lambda self: None

    def __rshift__(self, *args):
        return _openmm.istream___rshift__(self, *args)

    def gcount(self):
        return _openmm.istream_gcount(self)

    def get(self, *args):
        return _openmm.istream_get(self, *args)

    def getline(self, *args):
        return _openmm.istream_getline(self, *args)

    def ignore(self, *args):
        return _openmm.istream_ignore(self, *args)

    def peek(self):
        return _openmm.istream_peek(self)

    def read(self, __s, __n):
        return _openmm.istream_read(self, __s, __n)

    def readsome(self, __s, __n):
        return _openmm.istream_readsome(self, __s, __n)

    def putback(self, __c):
        return _openmm.istream_putback(self, __c)

    def unget(self):
        return _openmm.istream_unget(self)

    def sync(self):
        return _openmm.istream_sync(self)

    def tellg(self):
        return _openmm.istream_tellg(self)

    def seekg(self, *args):
        return _openmm.istream_seekg(self, *args)
istream_swigregister = _openmm.istream_swigregister
istream_swigregister(istream)

class iostream(istream, ostream):
    __swig_setmethods__ = {}
    for _s in [istream, ostream]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, iostream, name, value)
    __swig_getmethods__ = {}
    for _s in [istream, ostream]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, iostream, name)
    __repr__ = _swig_repr

    def __init__(self, __sb):
        this = _openmm.new_iostream(__sb)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_iostream
    __del__ = lambda self: None
iostream_swigregister = _openmm.iostream_swigregister
iostream_swigregister(iostream)


_openmm.endl_cb_ptr_swigconstant(_openmm)
endl_cb_ptr = _openmm.endl_cb_ptr

def endl(arg1):
    return _openmm.endl(arg1)
endl = _openmm.endl

_openmm.ends_cb_ptr_swigconstant(_openmm)
ends_cb_ptr = _openmm.ends_cb_ptr

def ends(arg1):
    return _openmm.ends(arg1)
ends = _openmm.ends

_openmm.flush_cb_ptr_swigconstant(_openmm)
flush_cb_ptr = _openmm.flush_cb_ptr

def flush(arg1):
    return _openmm.flush(arg1)
flush = _openmm.flush
class SwigPyIterator(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _openmm.delete_SwigPyIterator
    __del__ = lambda self: None

    def value(self):
        return _openmm.SwigPyIterator_value(self)

    def incr(self, n=1):
        return _openmm.SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        return _openmm.SwigPyIterator_decr(self, n)

    def distance(self, x):
        return _openmm.SwigPyIterator_distance(self, x)

    def equal(self, x):
        return _openmm.SwigPyIterator_equal(self, x)

    def copy(self):
        return _openmm.SwigPyIterator_copy(self)

    def next(self):
        return _openmm.SwigPyIterator_next(self)

    def __next__(self):
        return _openmm.SwigPyIterator___next__(self)

    def previous(self):
        return _openmm.SwigPyIterator_previous(self)

    def advance(self, n):
        return _openmm.SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        return _openmm.SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        return _openmm.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        return _openmm.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        return _openmm.SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        return _openmm.SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        return _openmm.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self
SwigPyIterator_swigregister = _openmm.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

class pairii(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, pairii, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, pairii, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _openmm.new_pairii(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_setmethods__["first"] = _openmm.pairii_first_set
    __swig_getmethods__["first"] = _openmm.pairii_first_get
    if _newclass:
        first = _swig_property(_openmm.pairii_first_get, _openmm.pairii_first_set)
    __swig_setmethods__["second"] = _openmm.pairii_second_set
    __swig_getmethods__["second"] = _openmm.pairii_second_get
    if _newclass:
        second = _swig_property(_openmm.pairii_second_get, _openmm.pairii_second_set)
    def __len__(self):
        return 2
    def __repr__(self):
        return str((self.first, self.second))
    def __getitem__(self, index): 
        if not (index % 2):
            return self.first
        else:
            return self.second
    def __setitem__(self, index, val):
        if not (index % 2):
            self.first = val
        else:
            self.second = val
    __swig_destroy__ = _openmm.delete_pairii
    __del__ = lambda self: None
pairii_swigregister = _openmm.pairii_swigregister
pairii_swigregister(pairii)

class vectord(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vectord, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vectord, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _openmm.vectord_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _openmm.vectord___nonzero__(self)

    def __bool__(self):
        return _openmm.vectord___bool__(self)

    def __len__(self):
        return _openmm.vectord___len__(self)

    def __getslice__(self, i, j):
        return _openmm.vectord___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _openmm.vectord___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _openmm.vectord___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _openmm.vectord___delitem__(self, *args)

    def __getitem__(self, *args):
        return _openmm.vectord___getitem__(self, *args)

    def __setitem__(self, *args):
        return _openmm.vectord___setitem__(self, *args)

    def pop(self):
        return _openmm.vectord_pop(self)

    def append(self, x):
        return _openmm.vectord_append(self, x)

    def empty(self):
        return _openmm.vectord_empty(self)

    def size(self):
        return _openmm.vectord_size(self)

    def swap(self, v):
        return _openmm.vectord_swap(self, v)

    def begin(self):
        return _openmm.vectord_begin(self)

    def end(self):
        return _openmm.vectord_end(self)

    def rbegin(self):
        return _openmm.vectord_rbegin(self)

    def rend(self):
        return _openmm.vectord_rend(self)

    def clear(self):
        return _openmm.vectord_clear(self)

    def get_allocator(self):
        return _openmm.vectord_get_allocator(self)

    def pop_back(self):
        return _openmm.vectord_pop_back(self)

    def erase(self, *args):
        return _openmm.vectord_erase(self, *args)

    def __init__(self, *args):
        this = _openmm.new_vectord(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def push_back(self, x):
        return _openmm.vectord_push_back(self, x)

    def front(self):
        return _openmm.vectord_front(self)

    def back(self):
        return _openmm.vectord_back(self)

    def assign(self, n, x):
        return _openmm.vectord_assign(self, n, x)

    def resize(self, *args):
        return _openmm.vectord_resize(self, *args)

    def insert(self, *args):
        return _openmm.vectord_insert(self, *args)

    def reserve(self, n):
        return _openmm.vectord_reserve(self, n)

    def capacity(self):
        return _openmm.vectord_capacity(self)
    __swig_destroy__ = _openmm.delete_vectord
    __del__ = lambda self: None
vectord_swigregister = _openmm.vectord_swigregister
vectord_swigregister(vectord)

class vectorddd(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vectorddd, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vectorddd, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _openmm.vectorddd_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _openmm.vectorddd___nonzero__(self)

    def __bool__(self):
        return _openmm.vectorddd___bool__(self)

    def __len__(self):
        return _openmm.vectorddd___len__(self)

    def __getslice__(self, i, j):
        return _openmm.vectorddd___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _openmm.vectorddd___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _openmm.vectorddd___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _openmm.vectorddd___delitem__(self, *args)

    def __getitem__(self, *args):
        return _openmm.vectorddd___getitem__(self, *args)

    def __setitem__(self, *args):
        return _openmm.vectorddd___setitem__(self, *args)

    def pop(self):
        return _openmm.vectorddd_pop(self)

    def append(self, x):
        return _openmm.vectorddd_append(self, x)

    def empty(self):
        return _openmm.vectorddd_empty(self)

    def size(self):
        return _openmm.vectorddd_size(self)

    def swap(self, v):
        return _openmm.vectorddd_swap(self, v)

    def begin(self):
        return _openmm.vectorddd_begin(self)

    def end(self):
        return _openmm.vectorddd_end(self)

    def rbegin(self):
        return _openmm.vectorddd_rbegin(self)

    def rend(self):
        return _openmm.vectorddd_rend(self)

    def clear(self):
        return _openmm.vectorddd_clear(self)

    def get_allocator(self):
        return _openmm.vectorddd_get_allocator(self)

    def pop_back(self):
        return _openmm.vectorddd_pop_back(self)

    def erase(self, *args):
        return _openmm.vectorddd_erase(self, *args)

    def __init__(self, *args):
        this = _openmm.new_vectorddd(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def push_back(self, x):
        return _openmm.vectorddd_push_back(self, x)

    def front(self):
        return _openmm.vectorddd_front(self)

    def back(self):
        return _openmm.vectorddd_back(self)

    def assign(self, n, x):
        return _openmm.vectorddd_assign(self, n, x)

    def resize(self, *args):
        return _openmm.vectorddd_resize(self, *args)

    def insert(self, *args):
        return _openmm.vectorddd_insert(self, *args)

    def reserve(self, n):
        return _openmm.vectorddd_reserve(self, n)

    def capacity(self):
        return _openmm.vectorddd_capacity(self)
    __swig_destroy__ = _openmm.delete_vectorddd
    __del__ = lambda self: None
vectorddd_swigregister = _openmm.vectorddd_swigregister
vectorddd_swigregister(vectorddd)

class vectori(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vectori, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vectori, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _openmm.vectori_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _openmm.vectori___nonzero__(self)

    def __bool__(self):
        return _openmm.vectori___bool__(self)

    def __len__(self):
        return _openmm.vectori___len__(self)

    def __getslice__(self, i, j):
        return _openmm.vectori___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _openmm.vectori___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _openmm.vectori___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _openmm.vectori___delitem__(self, *args)

    def __getitem__(self, *args):
        return _openmm.vectori___getitem__(self, *args)

    def __setitem__(self, *args):
        return _openmm.vectori___setitem__(self, *args)

    def pop(self):
        return _openmm.vectori_pop(self)

    def append(self, x):
        return _openmm.vectori_append(self, x)

    def empty(self):
        return _openmm.vectori_empty(self)

    def size(self):
        return _openmm.vectori_size(self)

    def swap(self, v):
        return _openmm.vectori_swap(self, v)

    def begin(self):
        return _openmm.vectori_begin(self)

    def end(self):
        return _openmm.vectori_end(self)

    def rbegin(self):
        return _openmm.vectori_rbegin(self)

    def rend(self):
        return _openmm.vectori_rend(self)

    def clear(self):
        return _openmm.vectori_clear(self)

    def get_allocator(self):
        return _openmm.vectori_get_allocator(self)

    def pop_back(self):
        return _openmm.vectori_pop_back(self)

    def erase(self, *args):
        return _openmm.vectori_erase(self, *args)

    def __init__(self, *args):
        this = _openmm.new_vectori(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def push_back(self, x):
        return _openmm.vectori_push_back(self, x)

    def front(self):
        return _openmm.vectori_front(self)

    def back(self):
        return _openmm.vectori_back(self)

    def assign(self, n, x):
        return _openmm.vectori_assign(self, n, x)

    def resize(self, *args):
        return _openmm.vectori_resize(self, *args)

    def insert(self, *args):
        return _openmm.vectori_insert(self, *args)

    def reserve(self, n):
        return _openmm.vectori_reserve(self, n)

    def capacity(self):
        return _openmm.vectori_capacity(self)
    __swig_destroy__ = _openmm.delete_vectori
    __del__ = lambda self: None
vectori_swigregister = _openmm.vectori_swigregister
vectori_swigregister(vectori)

class vectorii(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vectorii, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vectorii, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _openmm.vectorii_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _openmm.vectorii___nonzero__(self)

    def __bool__(self):
        return _openmm.vectorii___bool__(self)

    def __len__(self):
        return _openmm.vectorii___len__(self)

    def __getslice__(self, i, j):
        return _openmm.vectorii___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _openmm.vectorii___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _openmm.vectorii___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _openmm.vectorii___delitem__(self, *args)

    def __getitem__(self, *args):
        return _openmm.vectorii___getitem__(self, *args)

    def __setitem__(self, *args):
        return _openmm.vectorii___setitem__(self, *args)

    def pop(self):
        return _openmm.vectorii_pop(self)

    def append(self, x):
        return _openmm.vectorii_append(self, x)

    def empty(self):
        return _openmm.vectorii_empty(self)

    def size(self):
        return _openmm.vectorii_size(self)

    def swap(self, v):
        return _openmm.vectorii_swap(self, v)

    def begin(self):
        return _openmm.vectorii_begin(self)

    def end(self):
        return _openmm.vectorii_end(self)

    def rbegin(self):
        return _openmm.vectorii_rbegin(self)

    def rend(self):
        return _openmm.vectorii_rend(self)

    def clear(self):
        return _openmm.vectorii_clear(self)

    def get_allocator(self):
        return _openmm.vectorii_get_allocator(self)

    def pop_back(self):
        return _openmm.vectorii_pop_back(self)

    def erase(self, *args):
        return _openmm.vectorii_erase(self, *args)

    def __init__(self, *args):
        this = _openmm.new_vectorii(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def push_back(self, x):
        return _openmm.vectorii_push_back(self, x)

    def front(self):
        return _openmm.vectorii_front(self)

    def back(self):
        return _openmm.vectorii_back(self)

    def assign(self, n, x):
        return _openmm.vectorii_assign(self, n, x)

    def resize(self, *args):
        return _openmm.vectorii_resize(self, *args)

    def insert(self, *args):
        return _openmm.vectorii_insert(self, *args)

    def reserve(self, n):
        return _openmm.vectorii_reserve(self, n)

    def capacity(self):
        return _openmm.vectorii_capacity(self)
    __swig_destroy__ = _openmm.delete_vectorii
    __del__ = lambda self: None
vectorii_swigregister = _openmm.vectorii_swigregister
vectorii_swigregister(vectorii)

class vectorpairii(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vectorpairii, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vectorpairii, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _openmm.vectorpairii_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _openmm.vectorpairii___nonzero__(self)

    def __bool__(self):
        return _openmm.vectorpairii___bool__(self)

    def __len__(self):
        return _openmm.vectorpairii___len__(self)

    def __getslice__(self, i, j):
        return _openmm.vectorpairii___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _openmm.vectorpairii___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _openmm.vectorpairii___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _openmm.vectorpairii___delitem__(self, *args)

    def __getitem__(self, *args):
        return _openmm.vectorpairii___getitem__(self, *args)

    def __setitem__(self, *args):
        return _openmm.vectorpairii___setitem__(self, *args)

    def pop(self):
        return _openmm.vectorpairii_pop(self)

    def append(self, x):
        return _openmm.vectorpairii_append(self, x)

    def empty(self):
        return _openmm.vectorpairii_empty(self)

    def size(self):
        return _openmm.vectorpairii_size(self)

    def swap(self, v):
        return _openmm.vectorpairii_swap(self, v)

    def begin(self):
        return _openmm.vectorpairii_begin(self)

    def end(self):
        return _openmm.vectorpairii_end(self)

    def rbegin(self):
        return _openmm.vectorpairii_rbegin(self)

    def rend(self):
        return _openmm.vectorpairii_rend(self)

    def clear(self):
        return _openmm.vectorpairii_clear(self)

    def get_allocator(self):
        return _openmm.vectorpairii_get_allocator(self)

    def pop_back(self):
        return _openmm.vectorpairii_pop_back(self)

    def erase(self, *args):
        return _openmm.vectorpairii_erase(self, *args)

    def __init__(self, *args):
        this = _openmm.new_vectorpairii(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def push_back(self, x):
        return _openmm.vectorpairii_push_back(self, x)

    def front(self):
        return _openmm.vectorpairii_front(self)

    def back(self):
        return _openmm.vectorpairii_back(self)

    def assign(self, n, x):
        return _openmm.vectorpairii_assign(self, n, x)

    def resize(self, *args):
        return _openmm.vectorpairii_resize(self, *args)

    def insert(self, *args):
        return _openmm.vectorpairii_insert(self, *args)

    def reserve(self, n):
        return _openmm.vectorpairii_reserve(self, n)

    def capacity(self):
        return _openmm.vectorpairii_capacity(self)
    __swig_destroy__ = _openmm.delete_vectorpairii
    __del__ = lambda self: None
vectorpairii_swigregister = _openmm.vectorpairii_swigregister
vectorpairii_swigregister(vectorpairii)

class vectorstring(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vectorstring, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vectorstring, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _openmm.vectorstring_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _openmm.vectorstring___nonzero__(self)

    def __bool__(self):
        return _openmm.vectorstring___bool__(self)

    def __len__(self):
        return _openmm.vectorstring___len__(self)

    def __getslice__(self, i, j):
        return _openmm.vectorstring___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _openmm.vectorstring___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _openmm.vectorstring___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _openmm.vectorstring___delitem__(self, *args)

    def __getitem__(self, *args):
        return _openmm.vectorstring___getitem__(self, *args)

    def __setitem__(self, *args):
        return _openmm.vectorstring___setitem__(self, *args)

    def pop(self):
        return _openmm.vectorstring_pop(self)

    def append(self, x):
        return _openmm.vectorstring_append(self, x)

    def empty(self):
        return _openmm.vectorstring_empty(self)

    def size(self):
        return _openmm.vectorstring_size(self)

    def swap(self, v):
        return _openmm.vectorstring_swap(self, v)

    def begin(self):
        return _openmm.vectorstring_begin(self)

    def end(self):
        return _openmm.vectorstring_end(self)

    def rbegin(self):
        return _openmm.vectorstring_rbegin(self)

    def rend(self):
        return _openmm.vectorstring_rend(self)

    def clear(self):
        return _openmm.vectorstring_clear(self)

    def get_allocator(self):
        return _openmm.vectorstring_get_allocator(self)

    def pop_back(self):
        return _openmm.vectorstring_pop_back(self)

    def erase(self, *args):
        return _openmm.vectorstring_erase(self, *args)

    def __init__(self, *args):
        this = _openmm.new_vectorstring(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def push_back(self, x):
        return _openmm.vectorstring_push_back(self, x)

    def front(self):
        return _openmm.vectorstring_front(self)

    def back(self):
        return _openmm.vectorstring_back(self)

    def assign(self, n, x):
        return _openmm.vectorstring_assign(self, n, x)

    def resize(self, *args):
        return _openmm.vectorstring_resize(self, *args)

    def insert(self, *args):
        return _openmm.vectorstring_insert(self, *args)

    def reserve(self, n):
        return _openmm.vectorstring_reserve(self, n)

    def capacity(self):
        return _openmm.vectorstring_capacity(self)
    __swig_destroy__ = _openmm.delete_vectorstring
    __del__ = lambda self: None
vectorstring_swigregister = _openmm.vectorstring_swigregister
vectorstring_swigregister(vectorstring)

class mapstringstring(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, mapstringstring, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, mapstringstring, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _openmm.mapstringstring_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _openmm.mapstringstring___nonzero__(self)

    def __bool__(self):
        return _openmm.mapstringstring___bool__(self)

    def __len__(self):
        return _openmm.mapstringstring___len__(self)
    def __iter__(self):
        return self.key_iterator()
    def iterkeys(self):
        return self.key_iterator()
    def itervalues(self):
        return self.value_iterator()
    def iteritems(self):
        return self.iterator()

    def __getitem__(self, key):
        return _openmm.mapstringstring___getitem__(self, key)

    def __delitem__(self, key):
        return _openmm.mapstringstring___delitem__(self, key)

    def has_key(self, key):
        return _openmm.mapstringstring_has_key(self, key)

    def keys(self):
        return _openmm.mapstringstring_keys(self)

    def values(self):
        return _openmm.mapstringstring_values(self)

    def items(self):
        return _openmm.mapstringstring_items(self)

    def __contains__(self, key):
        return _openmm.mapstringstring___contains__(self, key)

    def key_iterator(self):
        return _openmm.mapstringstring_key_iterator(self)

    def value_iterator(self):
        return _openmm.mapstringstring_value_iterator(self)

    def __setitem__(self, *args):
        return _openmm.mapstringstring___setitem__(self, *args)

    def asdict(self):
        return _openmm.mapstringstring_asdict(self)

    def __init__(self, *args):
        this = _openmm.new_mapstringstring(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def empty(self):
        return _openmm.mapstringstring_empty(self)

    def size(self):
        return _openmm.mapstringstring_size(self)

    def swap(self, v):
        return _openmm.mapstringstring_swap(self, v)

    def begin(self):
        return _openmm.mapstringstring_begin(self)

    def end(self):
        return _openmm.mapstringstring_end(self)

    def rbegin(self):
        return _openmm.mapstringstring_rbegin(self)

    def rend(self):
        return _openmm.mapstringstring_rend(self)

    def clear(self):
        return _openmm.mapstringstring_clear(self)

    def get_allocator(self):
        return _openmm.mapstringstring_get_allocator(self)

    def count(self, x):
        return _openmm.mapstringstring_count(self, x)

    def erase(self, *args):
        return _openmm.mapstringstring_erase(self, *args)

    def find(self, x):
        return _openmm.mapstringstring_find(self, x)

    def lower_bound(self, x):
        return _openmm.mapstringstring_lower_bound(self, x)

    def upper_bound(self, x):
        return _openmm.mapstringstring_upper_bound(self, x)
    __swig_destroy__ = _openmm.delete_mapstringstring
    __del__ = lambda self: None
mapstringstring_swigregister = _openmm.mapstringstring_swigregister
mapstringstring_swigregister(mapstringstring)

class mapstringdouble(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, mapstringdouble, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, mapstringdouble, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _openmm.mapstringdouble_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _openmm.mapstringdouble___nonzero__(self)

    def __bool__(self):
        return _openmm.mapstringdouble___bool__(self)

    def __len__(self):
        return _openmm.mapstringdouble___len__(self)
    def __iter__(self):
        return self.key_iterator()
    def iterkeys(self):
        return self.key_iterator()
    def itervalues(self):
        return self.value_iterator()
    def iteritems(self):
        return self.iterator()

    def __getitem__(self, key):
        return _openmm.mapstringdouble___getitem__(self, key)

    def __delitem__(self, key):
        return _openmm.mapstringdouble___delitem__(self, key)

    def has_key(self, key):
        return _openmm.mapstringdouble_has_key(self, key)

    def keys(self):
        return _openmm.mapstringdouble_keys(self)

    def values(self):
        return _openmm.mapstringdouble_values(self)

    def items(self):
        return _openmm.mapstringdouble_items(self)

    def __contains__(self, key):
        return _openmm.mapstringdouble___contains__(self, key)

    def key_iterator(self):
        return _openmm.mapstringdouble_key_iterator(self)

    def value_iterator(self):
        return _openmm.mapstringdouble_value_iterator(self)

    def __setitem__(self, *args):
        return _openmm.mapstringdouble___setitem__(self, *args)

    def asdict(self):
        return _openmm.mapstringdouble_asdict(self)

    def __init__(self, *args):
        this = _openmm.new_mapstringdouble(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def empty(self):
        return _openmm.mapstringdouble_empty(self)

    def size(self):
        return _openmm.mapstringdouble_size(self)

    def swap(self, v):
        return _openmm.mapstringdouble_swap(self, v)

    def begin(self):
        return _openmm.mapstringdouble_begin(self)

    def end(self):
        return _openmm.mapstringdouble_end(self)

    def rbegin(self):
        return _openmm.mapstringdouble_rbegin(self)

    def rend(self):
        return _openmm.mapstringdouble_rend(self)

    def clear(self):
        return _openmm.mapstringdouble_clear(self)

    def get_allocator(self):
        return _openmm.mapstringdouble_get_allocator(self)

    def count(self, x):
        return _openmm.mapstringdouble_count(self, x)

    def erase(self, *args):
        return _openmm.mapstringdouble_erase(self, *args)

    def find(self, x):
        return _openmm.mapstringdouble_find(self, x)

    def lower_bound(self, x):
        return _openmm.mapstringdouble_lower_bound(self, x)

    def upper_bound(self, x):
        return _openmm.mapstringdouble_upper_bound(self, x)
    __swig_destroy__ = _openmm.delete_mapstringdouble
    __del__ = lambda self: None
mapstringdouble_swigregister = _openmm.mapstringdouble_swigregister
mapstringdouble_swigregister(mapstringdouble)

class mapii(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, mapii, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, mapii, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _openmm.mapii_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _openmm.mapii___nonzero__(self)

    def __bool__(self):
        return _openmm.mapii___bool__(self)

    def __len__(self):
        return _openmm.mapii___len__(self)
    def __iter__(self):
        return self.key_iterator()
    def iterkeys(self):
        return self.key_iterator()
    def itervalues(self):
        return self.value_iterator()
    def iteritems(self):
        return self.iterator()

    def __getitem__(self, key):
        return _openmm.mapii___getitem__(self, key)

    def __delitem__(self, key):
        return _openmm.mapii___delitem__(self, key)

    def has_key(self, key):
        return _openmm.mapii_has_key(self, key)

    def keys(self):
        return _openmm.mapii_keys(self)

    def values(self):
        return _openmm.mapii_values(self)

    def items(self):
        return _openmm.mapii_items(self)

    def __contains__(self, key):
        return _openmm.mapii___contains__(self, key)

    def key_iterator(self):
        return _openmm.mapii_key_iterator(self)

    def value_iterator(self):
        return _openmm.mapii_value_iterator(self)

    def __setitem__(self, *args):
        return _openmm.mapii___setitem__(self, *args)

    def asdict(self):
        return _openmm.mapii_asdict(self)

    def __init__(self, *args):
        this = _openmm.new_mapii(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def empty(self):
        return _openmm.mapii_empty(self)

    def size(self):
        return _openmm.mapii_size(self)

    def swap(self, v):
        return _openmm.mapii_swap(self, v)

    def begin(self):
        return _openmm.mapii_begin(self)

    def end(self):
        return _openmm.mapii_end(self)

    def rbegin(self):
        return _openmm.mapii_rbegin(self)

    def rend(self):
        return _openmm.mapii_rend(self)

    def clear(self):
        return _openmm.mapii_clear(self)

    def get_allocator(self):
        return _openmm.mapii_get_allocator(self)

    def count(self, x):
        return _openmm.mapii_count(self, x)

    def erase(self, *args):
        return _openmm.mapii_erase(self, *args)

    def find(self, x):
        return _openmm.mapii_find(self, x)

    def lower_bound(self, x):
        return _openmm.mapii_lower_bound(self, x)

    def upper_bound(self, x):
        return _openmm.mapii_upper_bound(self, x)
    __swig_destroy__ = _openmm.delete_mapii
    __del__ = lambda self: None
mapii_swigregister = _openmm.mapii_swigregister
mapii_swigregister(mapii)

class seti(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, seti, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, seti, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _openmm.seti_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _openmm.seti___nonzero__(self)

    def __bool__(self):
        return _openmm.seti___bool__(self)

    def __len__(self):
        return _openmm.seti___len__(self)

    def append(self, x):
        return _openmm.seti_append(self, x)

    def __contains__(self, x):
        return _openmm.seti___contains__(self, x)

    def __getitem__(self, i):
        return _openmm.seti___getitem__(self, i)

    def add(self, x):
        return _openmm.seti_add(self, x)

    def discard(self, x):
        return _openmm.seti_discard(self, x)

    def __init__(self, *args):
        this = _openmm.new_seti(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def empty(self):
        return _openmm.seti_empty(self)

    def size(self):
        return _openmm.seti_size(self)

    def clear(self):
        return _openmm.seti_clear(self)

    def swap(self, v):
        return _openmm.seti_swap(self, v)

    def count(self, x):
        return _openmm.seti_count(self, x)

    def begin(self):
        return _openmm.seti_begin(self)

    def end(self):
        return _openmm.seti_end(self)

    def rbegin(self):
        return _openmm.seti_rbegin(self)

    def rend(self):
        return _openmm.seti_rend(self)

    def erase(self, *args):
        return _openmm.seti_erase(self, *args)

    def find(self, x):
        return _openmm.seti_find(self, x)

    def lower_bound(self, x):
        return _openmm.seti_lower_bound(self, x)

    def upper_bound(self, x):
        return _openmm.seti_upper_bound(self, x)

    def equal_range(self, x):
        return _openmm.seti_equal_range(self, x)

    def insert(self, __x):
        return _openmm.seti_insert(self, __x)
    __swig_destroy__ = _openmm.delete_seti
    __del__ = lambda self: None
seti_swigregister = _openmm.seti_swigregister
seti_swigregister(seti)



try:
    import numpy
except ImportError:
    numpy = None

import copy
import sys
import math
import functools
import operator
RMIN_PER_SIGMA=math.pow(2, 1/6.0)
RVDW_PER_SIGMA=math.pow(2, 1/6.0)/2.0
if sys.version_info[0] == 2:
    _string_types = (basestring,)
else:
    _string_types = (bytes, str)

import simtk.unit as unit
from simtk.openmm.vec3 import Vec3



class Integrator(_object):
    """
    An Integrator defines a method for simulating a System by integrating the equations of motion. This is an abstract class. Subclasses define particular integration methods.

    Each Integrator object is bound to a particular Context which it integrates. This connection is specified by passing the Integrator as an argument to the constructor of the Context.
    """

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Integrator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Integrator, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _openmm.delete_Integrator
    __del__ = lambda self: None

    def getStepSize(self):
        """
        getStepSize(self) -> double

        Get the size of each time step, in picoseconds. If this integrator uses variable time steps, the size of the most recent step is returned.

        Returns
        -------
        double
            the step size, measured in ps
        """
        val = _openmm.Integrator_getStepSize(self)

        val=unit.Quantity(val, unit.picosecond)


        return val


    def setStepSize(self, size):
        """
        setStepSize(self, size)

        Set the size of each time step, in picoseconds. If this integrator uses variable time steps, the effect of calling this method is undefined, and it may simply be ignored.

        Parameters
        ----------
        size : double
            the step size, measured in ps
        """
        return _openmm.Integrator_setStepSize(self, size)


    def getConstraintTolerance(self):
        """
        getConstraintTolerance(self) -> double

        Get the distance tolerance within which constraints are maintained, as a fraction of the constrained distance.
        """
        return _openmm.Integrator_getConstraintTolerance(self)


    def setConstraintTolerance(self, tol):
        """
        setConstraintTolerance(self, tol)

        Set the distance tolerance within which constraints are maintained, as a fraction of the constrained distance.
        """
        return _openmm.Integrator_setConstraintTolerance(self, tol)


    def step(self, steps):
        """
        step(self, steps)

        Advance a simulation through time by taking a series of time steps.

        Parameters
        ----------
        steps : int
            the number of time steps to take
        """
        return _openmm.Integrator_step(self, steps)


    def __getstate__(self):
        serializationString = XmlSerializer.serialize(self)
        return serializationString

    def __setstate__(self, serializationString):
        system = XmlSerializer.deserialize(serializationString)
        self.this = system.this

    def __deepcopy__(self, memo):
        return self.__copy__()


    def __copy__(self):
        """__copy__(self) -> Integrator"""
        return _openmm.Integrator___copy__(self)

Integrator_swigregister = _openmm.Integrator_swigregister
Integrator_swigregister(Integrator)
NmPerAngstrom = cvar.NmPerAngstrom
AngstromsPerNm = cvar.AngstromsPerNm
PsPerFs = cvar.PsPerFs
FsPerPs = cvar.FsPerPs
KJPerKcal = cvar.KJPerKcal
KcalPerKJ = cvar.KcalPerKJ
RadiansPerDegree = cvar.RadiansPerDegree
DegreesPerRadian = cvar.DegreesPerRadian
SigmaPerVdwRadius = cvar.SigmaPerVdwRadius
VdwRadiusPerSigma = cvar.VdwRadiusPerSigma

class VerletIntegrator(Integrator):
    """This is an Integrator which simulates a System using the leap-frog Verlet algorithm."""

    __swig_setmethods__ = {}
    for _s in [Integrator]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, VerletIntegrator, name, value)
    __swig_getmethods__ = {}
    for _s in [Integrator]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, VerletIntegrator, name)
    __repr__ = _swig_repr

    def step(self, steps):
        """
        step(self, steps)

        Advance a simulation through time by taking a series of time steps.

        Parameters
        ----------
        steps : int
            the number of time steps to take
        """
        return _openmm.VerletIntegrator_step(self, steps)


    def __init__(self, *args):
        """
        __init__(self, stepSize) -> VerletIntegrator
        __init__(self, other) -> VerletIntegrator

        Create a VerletIntegrator.

        Parameters
        ----------
        stepSize : double
            the step size with which to integrate the system (in picoseconds)
        """
        this = _openmm.new_VerletIntegrator(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_VerletIntegrator
    __del__ = lambda self: None
VerletIntegrator_swigregister = _openmm.VerletIntegrator_swigregister
VerletIntegrator_swigregister(VerletIntegrator)

class Force(_object):
    """
    Force objects apply forces to the particles in a System, or alter their behavior in other ways. This is an abstract class. Subclasses define particular forces.

    More specifically, a Force object can do any or all of the following:

     - Add a contribution to the force on each particle
     - Add a contribution to the potential energy of the System
     - Modify the positions and velocities of particles at the start of each time step
     - Define parameters which are stored in the Context and can be modified by the user
     - Change the values of parameters defined by other Force objects at the start of each time step

    Forces may be organized into "force groups". This is used for multiple time step integration, and allows subsets of the Forces in a System to be evaluated at different times. By default, all Forces are in group 0. Call setForceGroup() to change this. Some Force subclasses may provide additional methods to further split their computations into multiple groups. Be aware that particular Platforms may place restrictions on the use of force groups, such as requiring all nonbonded forces to be in the same group.
    """

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Force, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Force, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_destroy__ = _openmm.delete_Force
    __del__ = lambda self: None

    def getForceGroup(self):
        """
        getForceGroup(self) -> int

        Get the force group this Force belongs to.
        """
        return _openmm.Force_getForceGroup(self)


    def setForceGroup(self, group):
        """
        setForceGroup(self, group)

        Set the force group this Force belongs to.

        Parameters
        ----------
        group : int
            the group index. Legal values are between 0 and 31 (inclusive).
        """
        return _openmm.Force_setForceGroup(self, group)


    def usesPeriodicBoundaryConditions(self):
        """
        usesPeriodicBoundaryConditions(self) -> bool

        Returns whether or not this force makes use of periodic boundary conditions. This method should be overridden for all Force subclasses, or a OpenMM::OpenMMException will be thrown

        Returns
        -------
        bool
            true if Force uses periodic boundaries or false if it does not
        """
        return _openmm.Force_usesPeriodicBoundaryConditions(self)


    def __getstate__(self):
        serializationString = XmlSerializer.serialize(self)
        return serializationString

    def __setstate__(self, serializationString):
        system = XmlSerializer.deserialize(serializationString)
        self.this = system.this

    def __deepcopy__(self, memo):
        return self.__copy__()


    def __copy__(self):
        """__copy__(self) -> Force"""
        return _openmm.Force___copy__(self)

Force_swigregister = _openmm.Force_swigregister
Force_swigregister(Force)

class AmoebaGeneralizedKirkwoodForce(Force):
    """
    This class implements an implicit solvation force using the generalized Kirkwood/Grycuk model. 

    To use this class, create an AmoebaGeneralizedKirkwoodForce object, then call addParticle() once for each particle in the System to define its parameters. The number of particles for which you define parameters must be equal to the number of particles in the System, or else an exception will be thrown when you try to create a Context. After a particle has been added, you can modify its force field parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().
    """

    __swig_setmethods__ = {}
    for _s in [Force]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, AmoebaGeneralizedKirkwoodForce, name, value)
    __swig_getmethods__ = {}
    for _s in [Force]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, AmoebaGeneralizedKirkwoodForce, name)
    __repr__ = _swig_repr

    def getNumParticles(self):
        """
        getNumParticles(self) -> int

        Get the number of particles in the system.
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_getNumParticles(self)


    def addParticle(self, charge, radius, scalingFactor):
        """
        addParticle(self, charge, radius, scalingFactor) -> int

        Add the parameters for a particle. This should be called once for each particle in the System. When it is called for the i'th time, it specifies the parameters for the i'th particle.

        Parameters
        ----------
        charge : double
            the charge of the particle, measured in units of the proton charge
        radius : double
            the atomic radius of the particle, measured in nm
        scalingFactor : double
            the scaling factor for the particle

        Returns
        -------
        int
            the index of the particle that was added
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_addParticle(self, charge, radius, scalingFactor)


    def getParticleParameters(self, index):
        """
        getParticleParameters(self, index)

        Get the force field parameters for a particle.

        Parameters
        ----------
        index : int
            the index of the particle for which to get parameters

        Returns
        -------
        charge : double
            the charge of the particle, measured in units of the proton charge
        radius : double
            the atomic radius of the particle, measured in nm
        scalingFactor : double
            the scaling factor for the particle
        """
        val = _openmm.AmoebaGeneralizedKirkwoodForce_getParticleParameters(self, index)

        val[0]=unit.Quantity(val[0], unit.elementary_charge)
        val[1]=unit.Quantity(val[1], unit.nanometer)


        return val


    def setParticleParameters(self, index, charge, radius, scalingFactor):
        """
        setParticleParameters(self, index, charge, radius, scalingFactor)

        Set the force field parameters for a particle.

        Parameters
        ----------
        index : int
            the index of the particle for which to set parameters
        charge : double
            the charge of the particle, measured in units of the proton charge
        radius : double
            the atomic radius of the particle, measured in nm
        scalingFactor : double
            the scaling factor for the particle
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_setParticleParameters(self, index, charge, radius, scalingFactor)


    def getSolventDielectric(self):
        """
        getSolventDielectric(self) -> double

        Get the dielectric constant for the solvent.
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_getSolventDielectric(self)


    def setSolventDielectric(self, dielectric):
        """
        setSolventDielectric(self, dielectric)

        Set the dielectric constant for the solvent.
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_setSolventDielectric(self, dielectric)


    def getSoluteDielectric(self):
        """
        getSoluteDielectric(self) -> double

        Get the dielectric constant for the solute.
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_getSoluteDielectric(self)


    def setSoluteDielectric(self, dielectric):
        """
        setSoluteDielectric(self, dielectric)

        Set the dielectric constant for the solute.
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_setSoluteDielectric(self, dielectric)


    def getIncludeCavityTerm(self):
        """
        getIncludeCavityTerm(self) -> int

        Get the flag signaling whether the cavity term should be included
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_getIncludeCavityTerm(self)


    def setIncludeCavityTerm(self, includeCavityTerm):
        """
        setIncludeCavityTerm(self, includeCavityTerm)

        Set the flag signaling whether the cavity term should be included
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_setIncludeCavityTerm(self, includeCavityTerm)


    def getProbeRadius(self):
        """
        getProbeRadius(self) -> double

        Get the probe radius (nm) used in SASA contribution
        """
        val = _openmm.AmoebaGeneralizedKirkwoodForce_getProbeRadius(self)

        val=unit.Quantity(val, unit.nanometer)


        return val


    def setProbeRadius(self, probeRadius):
        """
        setProbeRadius(self, probeRadius)

        Set the probe radius (nm) used in SASA contribution
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_setProbeRadius(self, probeRadius)


    def getSurfaceAreaFactor(self):
        """
        getSurfaceAreaFactor(self) -> double

        Get the surface area factor kJ/(nm*nm) used in SASA contribution
        """
        val = _openmm.AmoebaGeneralizedKirkwoodForce_getSurfaceAreaFactor(self)

        val=unit.Quantity(val, unit.kilojoule_per_mole/(unit.nanometer*unit.nanometer))


        return val


    def setSurfaceAreaFactor(self, surfaceAreaFactor):
        """
        setSurfaceAreaFactor(self, surfaceAreaFactor)

        Set the surface area factor kJ/(nm*nm) used in SASA contribution
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_setSurfaceAreaFactor(self, surfaceAreaFactor)


    def updateParametersInContext(self, context):
        """
        updateParametersInContext(self, context)

        Update the per-particle parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setParticleParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context.

        The only information this method updates is the values of per-particle parameters. All other aspects of the Force (the probe radius, the surface area factor, etc.) are unaffected and can only be changed by reinitializing the Context.
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_updateParametersInContext(self, context)


    def usesPeriodicBoundaryConditions(self):
        """
        usesPeriodicBoundaryConditions(self) -> bool

        Returns whether or not this force makes use of periodic boundary conditions.

        Returns
        -------
        bool
            true if nonbondedMethod uses PBC and false otherwise
        """
        return _openmm.AmoebaGeneralizedKirkwoodForce_usesPeriodicBoundaryConditions(self)


    def __init__(self, *args):
        """
        __init__(self) -> AmoebaGeneralizedKirkwoodForce
        __init__(self, other) -> AmoebaGeneralizedKirkwoodForce

        This class implements an implicit solvation force using the generalized Kirkwood/Grycuk model. 

        To use this class, create an AmoebaGeneralizedKirkwoodForce object, then call addParticle() once for each particle in the System to define its parameters. The number of particles for which you define parameters must be equal to the number of particles in the System, or else an exception will be thrown when you try to create a Context. After a particle has been added, you can modify its force field parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().
        """
        this = _openmm.new_AmoebaGeneralizedKirkwoodForce(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_AmoebaGeneralizedKirkwoodForce
    __del__ = lambda self: None
AmoebaGeneralizedKirkwoodForce_swigregister = _openmm.AmoebaGeneralizedKirkwoodForce_swigregister
AmoebaGeneralizedKirkwoodForce_swigregister(AmoebaGeneralizedKirkwoodForce)

class RBTorsionForce(Force):
    """This class implements an interaction between groups of four particles that varies with the torsion angle between them according to the Ryckaert-Bellemans potential. To use it, create an RBTorsionForce object then call addTorsion() once for each torsion. After a torsion has been added, you can modify its force field parameters by calling setTorsionParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext()."""

    __swig_setmethods__ = {}
    for _s in [Force]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, RBTorsionForce, name, value)
    __swig_getmethods__ = {}
    for _s in [Force]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, RBTorsionForce, name)
    __repr__ = _swig_repr

    def getNumTorsions(self):
        """
        getNumTorsions(self) -> int

        Get the number of Ryckaert-Bellemans torsion terms in the potential function
        """
        return _openmm.RBTorsionForce_getNumTorsions(self)


    def addTorsion(self, particle1, particle2, particle3, particle4, c0, c1, c2, c3, c4, c5):
        """
        addTorsion(self, particle1, particle2, particle3, particle4, c0, c1, c2, c3, c4, c5) -> int

        Add a Ryckaert-Bellemans torsion term to the force field.

        Parameters
        ----------
        particle1 : int
            the index of the first particle forming the torsion
        particle2 : int
            the index of the second particle forming the torsion
        particle3 : int
            the index of the third particle forming the torsion
        particle4 : int
            the index of the fourth particle forming the torsion
        c0 : double
            the coefficient of the constant term, measured in kJ/mol
        c1 : double
            the coefficient of the 1st order term, measured in kJ/mol
        c2 : double
            the coefficient of the 2nd order term, measured in kJ/mol
        c3 : double
            the coefficient of the 3rd order term, measured in kJ/mol
        c4 : double
            the coefficient of the 4th order term, measured in kJ/mol
        c5 : double
            the coefficient of the 5th order term, measured in kJ/mol

        Returns
        -------
        int
            the index of the torsion that was added
        """
        return _openmm.RBTorsionForce_addTorsion(self, particle1, particle2, particle3, particle4, c0, c1, c2, c3, c4, c5)


    def getTorsionParameters(self, index):
        """
        getTorsionParameters(self, index)

        Get the force field parameters for a Ryckaert-Bellemans torsion term.

        Parameters
        ----------
        index : int
            the index of the torsion for which to get parameters

        Returns
        -------
        particle1 : int
            the index of the first particle forming the torsion
        particle2 : int
            the index of the second particle forming the torsion
        particle3 : int
            the index of the third particle forming the torsion
        particle4 : int
            the index of the fourth particle forming the torsion
        c0 : double
            the coefficient of the constant term, measured in kJ/mol
        c1 : double
            the coefficient of the 1st order term, measured in kJ/mol
        c2 : double
            the coefficient of the 2nd order term, measured in kJ/mol
        c3 : double
            the coefficient of the 3rd order term, measured in kJ/mol
        c4 : double
            the coefficient of the 4th order term, measured in kJ/mol
        c5 : double
            the coefficient of the 5th order term, measured in kJ/mol
        """
        val = _openmm.RBTorsionForce_getTorsionParameters(self, index)

        val[4]=unit.Quantity(val[4], unit.kilojoules_per_mole)
        val[5]=unit.Quantity(val[5], unit.kilojoules_per_mole)
        val[6]=unit.Quantity(val[6], unit.kilojoules_per_mole)
        val[7]=unit.Quantity(val[7], unit.kilojoules_per_mole)
        val[8]=unit.Quantity(val[8], unit.kilojoules_per_mole)
        val[9]=unit.Quantity(val[9], unit.kilojoules_per_mole)


        return val


    def setTorsionParameters(self, index, particle1, particle2, particle3, particle4, c0, c1, c2, c3, c4, c5):
        """
        setTorsionParameters(self, index, particle1, particle2, particle3, particle4, c0, c1, c2, c3, c4, c5)

        Set the force field parameters for a Ryckaert-Bellemans torsion term.

        Parameters
        ----------
        index : int
            the index of the torsion for which to set parameters
        particle1 : int
            the index of the first particle forming the torsion
        particle2 : int
            the index of the second particle forming the torsion
        particle3 : int
            the index of the third particle forming the torsion
        particle4 : int
            the index of the fourth particle forming the torsion
        c0 : double
            the coefficient of the constant term, measured in kJ/mol
        c1 : double
            the coefficient of the 1st order term, measured in kJ/mol
        c2 : double
            the coefficient of the 2nd order term, measured in kJ/mol
        c3 : double
            the coefficient of the 3rd order term, measured in kJ/mol
        c4 : double
            the coefficient of the 4th order term, measured in kJ/mol
        c5 : double
            the coefficient of the 5th order term, measured in kJ/mol
        """
        return _openmm.RBTorsionForce_setTorsionParameters(self, index, particle1, particle2, particle3, particle4, c0, c1, c2, c3, c4, c5)


    def updateParametersInContext(self, context):
        """
        updateParametersInContext(self, context)

        Update the per-torsion parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setTorsionParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context.

        The only information this method updates is the values of per-torsion parameters. The set of particles involved in a torsion cannot be changed, nor can new torsions be added.
        """
        return _openmm.RBTorsionForce_updateParametersInContext(self, context)


    def setUsesPeriodicBoundaryConditions(self, periodic):
        """
        setUsesPeriodicBoundaryConditions(self, periodic)

        Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
        """
        return _openmm.RBTorsionForce_setUsesPeriodicBoundaryConditions(self, periodic)


    def usesPeriodicBoundaryConditions(self):
        """
        usesPeriodicBoundaryConditions(self) -> bool

        Returns whether or not this force makes use of periodic boundary conditions.

        Returns
        -------
        bool
            true if force uses PBC and false otherwise
        """
        return _openmm.RBTorsionForce_usesPeriodicBoundaryConditions(self)


    def __init__(self, *args):
        """
        __init__(self) -> RBTorsionForce
        __init__(self, other) -> RBTorsionForce

        Create a RBTorsionForce.
        """
        this = _openmm.new_RBTorsionForce(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_RBTorsionForce
    __del__ = lambda self: None
RBTorsionForce_swigregister = _openmm.RBTorsionForce_swigregister
RBTorsionForce_swigregister(RBTorsionForce)

class TabulatedFunction(_object):
    """
    A TabulatedFunction uses a set of tabulated values to define a mathematical function. It can be used by various custom forces.

    TabulatedFunction is an abstract class with concrete subclasses for more specific types of functions. There are subclasses for:

     - 1, 2, and 3 dimensional functions. The dimensionality of a function means the number of input arguments it takes.
     - Continuous and discrete functions. A continuous function is interpolated by fitting a natural cubic spline to the tabulated values. A discrete function is only defined for integer values of its arguments (that is, at the tabulated points), and does not try to interpolate between them. Discrete function can be evaluated more quickly than continuous ones.


    """

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, TabulatedFunction, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, TabulatedFunction, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _openmm.delete_TabulatedFunction
    __del__ = lambda self: None

    def Copy(self):
        """
        Copy(self) -> TabulatedFunction

        @deprecated This will be removed in a future release.
        """
        return _openmm.TabulatedFunction_Copy(self)


    def __getstate__(self):
        serializationString = XmlSerializer.serialize(self)
        return serializationString

    def __setstate__(self, serializationString):
        system = XmlSerializer.deserialize(serializationString)
        self.this = system.this

    def __deepcopy__(self, memo):
        return self.__copy__()


    def __copy__(self):
        """__copy__(self) -> TabulatedFunction"""
        return _openmm.TabulatedFunction___copy__(self)

TabulatedFunction_swigregister = _openmm.TabulatedFunction_swigregister
TabulatedFunction_swigregister(TabulatedFunction)

class Continuous1DFunction(TabulatedFunction):
    """This is a TabulatedFunction that computes a continuous one dimensional function."""

    __swig_setmethods__ = {}
    for _s in [TabulatedFunction]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, Continuous1DFunction, name, value)
    __swig_getmethods__ = {}
    for _s in [TabulatedFunction]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, Continuous1DFunction, name)
    __repr__ = _swig_repr

    def __init__(self, values, min, max):
        """
        __init__(self, values, min, max) -> Continuous1DFunction

        This is a TabulatedFunction that computes a continuous one dimensional function.
        """
        this = _openmm.new_Continuous1DFunction(values, min, max)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def getFunctionParameters(self):
        """getFunctionParameters(self)"""
        return _openmm.Continuous1DFunction_getFunctionParameters(self)


    def setFunctionParameters(self, values, min, max):
        """setFunctionParameters(self, values, min, max)"""
        return _openmm.Continuous1DFunction_setFunctionParameters(self, values, min, max)


    def Copy(self):
        """
        Copy(self) -> Continuous1DFunction

        @deprecated This will be removed in a future release.
        """
        return _openmm.Continuous1DFunction_Copy(self)

    __swig_destroy__ = _openmm.delete_Continuous1DFunction
    __del__ = lambda self: None
Continuous1DFunction_swigregister = _openmm.Continuous1DFunction_swigregister
Continuous1DFunction_swigregister(Continuous1DFunction)

class OpenMMException(_object):
    """This class is used for all exceptions thrown by OpenMM."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, OpenMMException, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, OpenMMException, name)
    __repr__ = _swig_repr
    __swig_destroy__ = _openmm.delete_OpenMMException
    __del__ = lambda self: None

    def what(self):
        """what(self) -> char const *"""
        return _openmm.OpenMMException_what(self)


    def __init__(self, *args):
        """
        __init__(self, message) -> OpenMMException
        __init__(self, other) -> OpenMMException

        This class is used for all exceptions thrown by OpenMM.
        """
        this = _openmm.new_OpenMMException(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
OpenMMException_swigregister = _openmm.OpenMMException_swigregister
OpenMMException_swigregister(OpenMMException)

class Continuous2DFunction(TabulatedFunction):
    """This is a TabulatedFunction that computes a continuous two dimensional function."""

    __swig_setmethods__ = {}
    for _s in [TabulatedFunction]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, Continuous2DFunction, name, value)
    __swig_getmethods__ = {}
    for _s in [TabulatedFunction]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, Continuous2DFunction, name)
    __repr__ = _swig_repr

    def __init__(self, xsize, ysize, values, xmin, xmax, ymin, ymax):
        """
        __init__(self, xsize, ysize, values, xmin, xmax, ymin, ymax) -> Continuous2DFunction

        This is a TabulatedFunction that computes a continuous two dimensional function.
        """
        this = _openmm.new_Continuous2DFunction(xsize, ysize, values, xmin, xmax, ymin, ymax)
        try:
            self.this.append(this)
        except Exception:
            self.this = this

    def getFunctionParameters(self):
        """getFunctionParameters(self)"""
        return _openmm.Continuous2DFunction_getFunctionParameters(self)


    def setFunctionParameters(self, xsize, ysize, values, xmin, xmax, ymin, ymax):
        """setFunctionParameters(self, xsize, ysize, values, xmin, xmax, ymin, ymax)"""
        return _openmm.Continuous2DFunction_setFunctionParameters(self, xsize, ysize, values, xmin, xmax, ymin, ymax)


    def Copy(self):
        """
        Copy(self) -> Continuous2DFunction

        @deprecated This will be removed in a future release.
        """
        return _openmm.Continuous2DFunction_Copy(self)

    __swig_destroy__ = _openmm.delete_Continuous2DFunction
    __del__ = lambda self: None
Continuous2DFunction_swigregister = _openmm.Continuous2DFunction_swigregister
Continuous2DFunction_swigregister(Continuous2DFunction)

class VirtualSite(_object):
    """A VirtualSite describes the rules for computing a particle's position based on other particles. This is an abstract class. Subclasses define particular rules. To define a virtual site, create an instance of a VirtualSite subclass and then call setVirtualSite() on the System."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, VirtualSite, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, VirtualSite, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_destroy__ = _openmm.delete_VirtualSite
    __del__ = lambda self: None

    def getNumParticles(self):
        """
        getNumParticles(self) -> int

        Get the number of particles this virtual site depends on.
        """
        return _openmm.VirtualSite_getNumParticles(self)


    def getParticle(self, particle):
        """
        getParticle(self, particle) -> int

        Get the index of a particle this virtual site depends on.

        Parameters
        ----------
        particle : int
            the particle to get (between 0 and getNumParticles())

        Returns
        -------
        int
            the index of the particle in the System
        """
        return _openmm.VirtualSite_getParticle(self, particle)

VirtualSite_swigregister = _openmm.VirtualSite_swigregister
VirtualSite_swigregister(VirtualSite)

class TwoParticleAverageSite(VirtualSite):
    """This is a VirtualSite that computes the particle location as a weighted average of two other particle's locations. Assuming the weights add up to 1, this means the virtual site is on the line passing through the two particles."""

    __swig_setmethods__ = {}
    for _s in [VirtualSite]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, TwoParticleAverageSite, name, value)
    __swig_getmethods__ = {}
    for _s in [VirtualSite]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, TwoParticleAverageSite, name)
    __repr__ = _swig_repr

    def getWeight(self, particle):
        """
        getWeight(self, particle) -> double

        Get the weight factor used for a particle this virtual site depends on.

        Parameters
        ----------
        particle : int
            the particle to get (between 0 and getNumParticles())

        Returns
        -------
        double
            the weight factor used for that particle
        """
        return _openmm.TwoParticleAverageSite_getWeight(self, particle)


    def __init__(self, *args):
        """
        __init__(self, particle1, particle2, weight1, weight2) -> TwoParticleAverageSite
        __init__(self, other) -> TwoParticleAverageSite

        Create a new TwoParticleAverageSite virtual site. Normally weight1 and weight2 should add up to 1, although this is not strictly required.

        Parameters
        ----------
        particle1 : int
            the index of the first particle
        particle2 : int
            the index of the second particle
        weight1 : double
            the weight factor (between 0 and 1) for the first particle
        weight2 : double
            the weight factor (between 0 and 1) for the second particle
        """
        this = _openmm.new_TwoParticleAverageSite(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_TwoParticleAverageSite
    __del__ = lambda self: None
TwoParticleAverageSite_swigregister = _openmm.TwoParticleAverageSite_swigregister
TwoParticleAverageSite_swigregister(TwoParticleAverageSite)

class LocalEnergyMinimizer(_object):
    """Given a Context, this class searches for a new set of particle positions that represent a local minimum of the potential energy. The search is performed with the L-BFGS algorithm. Distance constraints are enforced during minimization by adding a harmonic restraining force to the potential function. The strength of the restraining force is steadily increased until the minimum energy configuration satisfies all constraints to within the tolerance specified by the Context's Integrator."""

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, LocalEnergyMinimizer, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, LocalEnergyMinimizer, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr

    def minimize(context, tolerance=10, maxIterations=0):
        """
        minimize(context, tolerance=10, maxIterations=0)
        minimize(context, tolerance=10)
        minimize(context)

        Search for a new set of particle positions that represent a local potential energy minimum. On exit, the Context will have been updated with the new positions.

        Parameters
        ----------
        context : Context
            a Context specifying the System to minimize and the initial particle positions
        tolerance : double
            this specifies how precisely the energy minimum must be located. Minimization will be halted once the root-mean-square value of all force components reaches this tolerance. The default value is 10.
        maxIterations : int
            the maximum number of iterations to perform. If this is 0, minimation is continued until the results converge without regard to how many iterations it takes. The default value is 0.
        """
        return _openmm.LocalEnergyMinimizer_minimize(context, tolerance, maxIterations)

    if _newclass:
        minimize = staticmethod(minimize)
    __swig_getmethods__["minimize"] = lambda x: minimize
    __swig_destroy__ = _openmm.delete_LocalEnergyMinimizer
    __del__ = lambda self: None
LocalEnergyMinimizer_swigregister = _openmm.LocalEnergyMinimizer_swigregister
LocalEnergyMinimizer_swigregister(LocalEnergyMinimizer)

def LocalEnergyMinimizer_minimize(context, tolerance=10, maxIterations=0):
    """
    minimize(context, tolerance=10, maxIterations=0)
    minimize(context, tolerance=10)
    LocalEnergyMinimizer_minimize(context)

    Search for a new set of particle positions that represent a local potential energy minimum. On exit, the Context will have been updated with the new positions.

    Parameters
    ----------
    context : Context
        a Context specifying the System to minimize and the initial particle positions
    tolerance : double
        this specifies how precisely the energy minimum must be located. Minimization will be halted once the root-mean-square value of all force components reaches this tolerance. The default value is 10.
    maxIterations : int
        the maximum number of iterations to perform. If this is 0, minimation is continued until the results converge without regard to how many iterations it takes. The default value is 0.
    """
    return _openmm.LocalEnergyMinimizer_minimize(context, tolerance, maxIterations)

class VariableVerletIntegrator(Integrator):
    """
    This is an error contolled, variable time step Integrator that simulates a System using the leap-frog Verlet algorithm. It compares the result of the Verlet integrator to that of an explicit Euler integrator, takes the difference between the two as a measure of the integration error in each time step, and continuously adjusts the step size to keep the error below a specified tolerance. This both improves the stability of the integrator and allows it to take larger steps on average, while still maintaining comparable accuracy to a fixed step size integrator.

    It is best not to think of the error tolerance as having any absolute meaning. It is just an adjustable parameter that affects the step size and integration accuracy. You should try different values to find the largest one that produces a trajectory sufficiently accurate for your purposes. 0.001 is often a good starting point.

    Unlike a fixed step size Verlet integrator, variable step size Verlet is not symplectic. This means that at a given accuracy level, energy is not as precisely conserved over long time periods. This makes it most appropriate for constant temperate simulations. In constant energy simulations where precise energy conservation over long time periods is important, a fixed step size Verlet integrator may be more appropriate.
    """

    __swig_setmethods__ = {}
    for _s in [Integrator]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, VariableVerletIntegrator, name, value)
    __swig_getmethods__ = {}
    for _s in [Integrator]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, VariableVerletIntegrator, name)
    __repr__ = _swig_repr

    def getErrorTolerance(self):
        """
        getErrorTolerance(self) -> double

        Get the error tolerance.
        """
        return _openmm.VariableVerletIntegrator_getErrorTolerance(self)


    def setErrorTolerance(self, tol):
        """
        setErrorTolerance(self, tol)

        Set the error tolerance.
        """
        return _openmm.VariableVerletIntegrator_setErrorTolerance(self, tol)


    def step(self, steps):
        """
        step(self, steps)

        Advance a simulation through time by taking a series of time steps.

        Parameters
        ----------
        steps : int
            the number of time steps to take
        """
        return _openmm.VariableVerletIntegrator_step(self, steps)


    def stepTo(self, time):
        """
        stepTo(self, time)

        Advance a simulation through time by taking a series of steps until a specified time is reached. When this method returns, the simulation time will exactly equal the time which was specified. If you call this method and specify a time that is earlier than the current time, it will return without doing anything.

        Parameters
        ----------
        time : double
            the time to which the simulation should be advanced
        """
        return _openmm.VariableVerletIntegrator_stepTo(self, time)


    def __init__(self, *args):
        """
        __init__(self, errorTol) -> VariableVerletIntegrator
        __init__(self, other) -> VariableVerletIntegrator

        Create a VariableVerletIntegrator.

        Parameters
        ----------
        errorTol : double
            the error tolerance
        """
        this = _openmm.new_VariableVerletIntegrator(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_VariableVerletIntegrator
    __del__ = lambda self: None
VariableVerletIntegrator_swigregister = _openmm.VariableVerletIntegrator_swigregister
VariableVerletIntegrator_swigregister(VariableVerletIntegrator)

class CustomAngleForce(Force):
    """
    This class implements interactions between sets of three particles that depend on the angle between them. Unlike HarmonicAngleForce, the functional form of the interaction is completely customizable, and may involve arbitrary algebraic expressions. In addition to the angle formed by the particles, it may depend on arbitrary global and per-angle parameters.

    To use this class, create a CustomAngleForce object, passing an algebraic expression to the constructor that defines the interaction energy between each set of particles. The expression may depend on theta, the angle formed by the particles, as well as on any parameters you choose. Then call addPerAngleParameter() to define per-angle parameters, and addGlobalParameter() to define global parameters. The values of per-angle parameters are specified as part of the system definition, while values of global parameters may be modified during a simulation by calling Context::setParameter(). Finally, call addAngle() once for each angle. After an angle has been added, you can modify its parameters by calling setAngleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().

    As an example, the following code creates a CustomAngleForce that implements a harmonic potential:

    <tt>CustomAngleForce* force = new CustomAngleForce("0.5*k*(theta-theta0)^2");</tt>

    This force depends on two parameters: the spring constant k and equilibrium angle theta0. The following code defines these parameters:

    <tt><pre>
    force->addPerAngleParameter("k");
    force->addPerAngleParameter("theta0");
    </pre></tt>

    This class also has the ability to compute derivatives of the potential energy with respect to global parameters. Call addEnergyParameterDerivative() to request that the derivative with respect to a particular parameter be computed. You can then query its value in a Context by calling getState() on it.

    Expressions may involve the operators + (add), - (subtract), * (multiply), / (divide), and ^ (power), and the following functions: sqrt, exp, log, sin, cos, sec, csc, tan, cot, asin, acos, atan, sinh, cosh, tanh, erf, erfc, min, max, abs, floor, ceil, step, delta, select. All trigonometric functions are defined in radians, and log is the natural logarithm. step(x) = 0 if x is less than 0, 1 otherwise. delta(x) = 1 if x is 0, 0 otherwise. select(x,y,z) = z if x = 0, y otherwise.
    """

    __swig_setmethods__ = {}
    for _s in [Force]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, CustomAngleForce, name, value)
    __swig_getmethods__ = {}
    for _s in [Force]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, CustomAngleForce, name)
    __repr__ = _swig_repr

    def getNumAngles(self):
        """
        getNumAngles(self) -> int

        Get the number of angles for which force field parameters have been defined.
        """
        return _openmm.CustomAngleForce_getNumAngles(self)


    def getNumPerAngleParameters(self):
        """
        getNumPerAngleParameters(self) -> int

        Get the number of per-angle parameters that the interaction depends on.
        """
        return _openmm.CustomAngleForce_getNumPerAngleParameters(self)


    def getNumGlobalParameters(self):
        """
        getNumGlobalParameters(self) -> int

        Get the number of global parameters that the interaction depends on.
        """
        return _openmm.CustomAngleForce_getNumGlobalParameters(self)


    def getNumEnergyParameterDerivatives(self):
        """
        getNumEnergyParameterDerivatives(self) -> int

        Get the number of global parameters with respect to which the derivative of the energy should be computed.
        """
        return _openmm.CustomAngleForce_getNumEnergyParameterDerivatives(self)


    def getEnergyFunction(self):
        """
        getEnergyFunction(self) -> std::string const &

        Get the algebraic expression that gives the interaction energy for each angle
        """
        return _openmm.CustomAngleForce_getEnergyFunction(self)


    def setEnergyFunction(self, energy):
        """
        setEnergyFunction(self, energy)

        Set the algebraic expression that gives the interaction energy for each angle
        """
        return _openmm.CustomAngleForce_setEnergyFunction(self, energy)


    def addPerAngleParameter(self, name):
        """
        addPerAngleParameter(self, name) -> int

        Add a new per-angle parameter that the interaction may depend on.

        Parameters
        ----------
        name : string
            the name of the parameter

        Returns
        -------
        int
            the index of the parameter that was added
        """
        return _openmm.CustomAngleForce_addPerAngleParameter(self, name)


    def getPerAngleParameterName(self, index):
        """
        getPerAngleParameterName(self, index) -> std::string const &

        Get the name of a per-angle parameter.

        Parameters
        ----------
        index : int
            the index of the parameter for which to get the name

        Returns
        -------
        string
            the parameter name
        """
        return _openmm.CustomAngleForce_getPerAngleParameterName(self, index)


    def setPerAngleParameterName(self, index, name):
        """
        setPerAngleParameterName(self, index, name)

        Set the name of a per-angle parameter.

        Parameters
        ----------
        index : int
            the index of the parameter for which to set the name
        name : string
            the name of the parameter
        """
        return _openmm.CustomAngleForce_setPerAngleParameterName(self, index, name)


    def addGlobalParameter(self, name, defaultValue):
        """
        addGlobalParameter(self, name, defaultValue) -> int

        Add a new global parameter that the interaction may depend on. The default value provided to this method is the initial value of the parameter in newly created Contexts. You can change the value at any time by calling setParameter() on the Context.

        Parameters
        ----------
        name : string
            the name of the parameter
        defaultValue : double
            the default value of the parameter

        Returns
        -------
        int
            the index of the parameter that was added
        """
        return _openmm.CustomAngleForce_addGlobalParameter(self, name, defaultValue)


    def getGlobalParameterName(self, index):
        """
        getGlobalParameterName(self, index) -> std::string const &

        Get the name of a global parameter.

        Parameters
        ----------
        index : int
            the index of the parameter for which to get the name

        Returns
        -------
        string
            the parameter name
        """
        return _openmm.CustomAngleForce_getGlobalParameterName(self, index)


    def setGlobalParameterName(self, index, name):
        """
        setGlobalParameterName(self, index, name)

        Set the name of a global parameter.

        Parameters
        ----------
        index : int
            the index of the parameter for which to set the name
        name : string
            the name of the parameter
        """
        return _openmm.CustomAngleForce_setGlobalParameterName(self, index, name)


    def getGlobalParameterDefaultValue(self, index):
        """
        getGlobalParameterDefaultValue(self, index) -> double

        Get the default value of a global parameter.

        Parameters
        ----------
        index : int
            the index of the parameter for which to get the default value

        Returns
        -------
        double
            the parameter default value
        """
        return _openmm.CustomAngleForce_getGlobalParameterDefaultValue(self, index)


    def setGlobalParameterDefaultValue(self, index, defaultValue):
        """
        setGlobalParameterDefaultValue(self, index, defaultValue)

        Set the default value of a global parameter.

        Parameters
        ----------
        index : int
            the index of the parameter for which to set the default value
        defaultValue : double
            the default value of the parameter
        """
        return _openmm.CustomAngleForce_setGlobalParameterDefaultValue(self, index, defaultValue)


    def addEnergyParameterDerivative(self, name):
        """
        addEnergyParameterDerivative(self, name)

        Request that this Force compute the derivative of its energy with respect to a global parameter. The parameter must have already been added with addGlobalParameter().

        Parameters
        ----------
        name : string
            the name of the parameter
        """
        return _openmm.CustomAngleForce_addEnergyParameterDerivative(self, name)


    def getEnergyParameterDerivativeName(self, index):
        """
        getEnergyParameterDerivativeName(self, index) -> std::string const &

        Get the name of a global parameter with respect to which this Force should compute the derivative of the energy.

        Parameters
        ----------
        index : int
            the index of the parameter derivative, between 0 and getNumEnergyParameterDerivatives()

        Returns
        -------
        string
            the parameter name
        """
        return _openmm.CustomAngleForce_getEnergyParameterDerivativeName(self, index)


    def addAngle(self, *args):
        """
        addAngle(self, particle1, particle2, particle3, parameters) -> int
        addAngle(self, particle1, particle2, particle3) -> int

        Add an angle term to the force field.

        Parameters
        ----------
        particle1 : int
            the index of the first particle connected by the angle
        particle2 : int
            the index of the second particle connected by the angle
        particle3 : int
            the index of the third particle connected by the angle
        parameters : vector< double >
            the list of parameters for the new angle

        Returns
        -------
        int
            the index of the angle that was added
        """
        return _openmm.CustomAngleForce_addAngle(self, *args)


    def getAngleParameters(self, index):
        """
        getAngleParameters(self, index)

        Get the force field parameters for an angle term.

        Parameters
        ----------
        index : int
            the index of the angle for which to get parameters

        Returns
        -------
        particle1 : int
            the index of the first particle connected by the angle
        particle2 : int
            the index of the second particle connected by the angle
        particle3 : int
            the index of the third particle connected by the angle
        parameters : vector< double >
            the list of parameters for the angle
        """
        return _openmm.CustomAngleForce_getAngleParameters(self, index)


    def setAngleParameters(self, *args):
        """
        setAngleParameters(self, index, particle1, particle2, particle3, parameters)
        setAngleParameters(self, index, particle1, particle2, particle3)

        Set the force field parameters for an angle term.

        Parameters
        ----------
        index : int
            the index of the angle for which to set parameters
        particle1 : int
            the index of the first particle connected by the angle
        particle2 : int
            the index of the second particle connected by the angle
        particle3 : int
            the index of the third particle connected by the angle
        parameters : vector< double >
            the list of parameters for the angle
        """
        return _openmm.CustomAngleForce_setAngleParameters(self, *args)


    def updateParametersInContext(self, context):
        """
        updateParametersInContext(self, context)

        Update the per-angle parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setAngleParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context.

        This method has several limitations. The only information it updates is the values of per-angle parameters. All other aspects of the Force (such as the energy function) are unaffected and can only be changed by reinitializing the Context. The set of particles involved in a angle cannot be changed, nor can new angles be added.
        """
        return _openmm.CustomAngleForce_updateParametersInContext(self, context)


    def setUsesPeriodicBoundaryConditions(self, periodic):
        """
        setUsesPeriodicBoundaryConditions(self, periodic)

        Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
        """
        return _openmm.CustomAngleForce_setUsesPeriodicBoundaryConditions(self, periodic)


    def usesPeriodicBoundaryConditions(self):
        """
        usesPeriodicBoundaryConditions(self) -> bool

        Returns whether or not this force makes use of periodic boundary conditions.

        Returns
        -------
        bool
            true if force uses PBC and false otherwise
        """
        return _openmm.CustomAngleForce_usesPeriodicBoundaryConditions(self)


    def __init__(self, *args):
        """
        __init__(self, energy) -> CustomAngleForce
        __init__(self, other) -> CustomAngleForce

        Create a CustomAngleForce.

        Parameters
        ----------
        energy : string
            an algebraic expression giving the interaction energy between three particles as a function of theta, the angle between them
        """
        this = _openmm.new_CustomAngleForce(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_CustomAngleForce
    __del__ = lambda self: None
CustomAngleForce_swigregister = _openmm.CustomAngleForce_swigregister
CustomAngleForce_swigregister(CustomAngleForce)

class ThreeParticleAverageSite(VirtualSite):
    """This is a VirtualSite that computes the particle location as a weighted average of three other particle's locations. Assuming the weights add up to 1, this means the virtual site is in the plane of the three particles."""

    __swig_setmethods__ = {}
    for _s in [VirtualSite]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ThreeParticleAverageSite, name, value)
    __swig_getmethods__ = {}
    for _s in [VirtualSite]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ThreeParticleAverageSite, name)
    __repr__ = _swig_repr

    def getWeight(self, particle):
        """
        getWeight(self, particle) -> double

        Get the weight factor used for a particle this virtual site depends on.

        Parameters
        ----------
        particle : int
            the particle to get (between 0 and getNumParticles())

        Returns
        -------
        double
            the weight factor used for that particle
        """
        return _openmm.ThreeParticleAverageSite_getWeight(self, particle)


    def __init__(self, *args):
        """
        __init__(self, particle1, particle2, particle3, weight1, weight2, weight3) -> ThreeParticleAverageSite
        __init__(self, other) -> ThreeParticleAverageSite

        Create a new ThreeParticleAverageSite virtual site. Normally the weights should add up to 1, although this is not strictly required.

        Parameters
        ----------
        particle1 : int
            the index of the first particle
        particle2 : int
            the index of the second particle
        particle3 : int
            the index of the third particle
        weight1 : double
            the weight factor (between 0 and 1) for the first particle
        weight2 : double
            the weight factor (between 0 and 1) for the second particle
        weight2 : double
            the weight factor (between 0 and 1) for the third particle
        """
        this = _openmm.new_ThreeParticleAverageSite(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_ThreeParticleAverageSite
    __del__ = lambda self: None
ThreeParticleAverageSite_swigregister = _openmm.ThreeParticleAverageSite_swigregister
ThreeParticleAverageSite_swigregister(ThreeParticleAverageSite)

class MonteCarloBarostat(Force):
    """
    This class uses a Monte Carlo algorithm to adjust the size of the periodic box, simulating the effect of constant pressure.

    This class assumes the simulation is also being run at constant temperature, and requires you to specify the system temperature (since it affects the acceptance probability for Monte Carlo moves). It does not actually perform temperature regulation, however. You must use another mechanism along with it to maintain the temperature, such as LangevinIntegrator or AndersenThermostat.
    """

    __swig_setmethods__ = {}
    for _s in [Force]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MonteCarloBarostat, name, value)
    __swig_getmethods__ = {}
    for _s in [Force]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MonteCarloBarostat, name)
    __repr__ = _swig_repr

    def Pressure():
        """
        Pressure() -> std::string const &

        This is the name of the parameter which stores the current pressure acting on the system (in bar).
        """
        return _openmm.MonteCarloBarostat_Pressure()

    if _newclass:
        Pressure = staticmethod(Pressure)
    __swig_getmethods__["Pressure"] = lambda x: Pressure

    def Temperature():
        """
        Temperature() -> std::string const &

        This is the name of the parameter which stores the current temperature at which the system is being maintained (in Kelvin)
        """
        return _openmm.MonteCarloBarostat_Temperature()

    if _newclass:
        Temperature = staticmethod(Temperature)
    __swig_getmethods__["Temperature"] = lambda x: Temperature

    def getDefaultPressure(self):
        """
        getDefaultPressure(self) -> double

        Get the default pressure acting on the system (in bar).

        Returns
        -------
        double
            the default pressure acting on the system, measured in bar.
        """
        val = _openmm.MonteCarloBarostat_getDefaultPressure(self)

        val=unit.Quantity(val, unit.bar)


        return val


    def setDefaultPressure(self, pressure):
        """
        setDefaultPressure(self, pressure)

        Set the default pressure acting on the system. This will affect any new Contexts you create, but not ones that already exist.

        Parameters
        ----------
        pressure : double
            the default pressure acting on the system, measured in bar.
        """
        return _openmm.MonteCarloBarostat_setDefaultPressure(self, pressure)


    def getFrequency(self):
        """
        getFrequency(self) -> int

        Get the frequency (in time steps) at which Monte Carlo pressure changes should be attempted. If this is set to 0, the barostat is disabled.
        """
        return _openmm.MonteCarloBarostat_getFrequency(self)


    def setFrequency(self, freq):
        """
        setFrequency(self, freq)

        Set the frequency (in time steps) at which Monte Carlo pressure changes should be attempted. If this is set to 0, the barostat is disabled.
        """
        return _openmm.MonteCarloBarostat_setFrequency(self, freq)


    def getDefaultTemperature(self):
        """
        getDefaultTemperature(self) -> double

        Get the default temperature at which the system is being maintained, measured in Kelvin.
        """
        val = _openmm.MonteCarloBarostat_getDefaultTemperature(self)

        val=unit.Quantity(val, unit.kelvin)


        return val


    def setDefaultTemperature(self, temp):
        """
        setDefaultTemperature(self, temp)

        Set the default temperature at which the system is being maintained. This will affect any new Contexts you create, but not ones that already exist.

        Parameters
        ----------
        temp : double
            the system temperature, measured in Kelvin.
        """
        return _openmm.MonteCarloBarostat_setDefaultTemperature(self, temp)


    def getRandomNumberSeed(self):
        """
        getRandomNumberSeed(self) -> int

        Get the random number seed. See setRandomNumberSeed() for details.
        """
        return _openmm.MonteCarloBarostat_getRandomNumberSeed(self)


    def setRandomNumberSeed(self, seed):
        """
        setRandomNumberSeed(self, seed)

        Set the random number seed. It is guaranteed that if two simulations are run with different random number seeds, the sequence of Monte Carlo steps will be different. On the other hand, no guarantees are made about the behavior of simulations that use the same seed. In particular, Platforms are permitted to use non-deterministic algorithms which produce different results on successive runs, even if those runs were initialized identically.

        If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context is created from this Force. This is done to ensure that each Context receives unique random seeds without you needing to set them explicitly.
        """
        return _openmm.MonteCarloBarostat_setRandomNumberSeed(self, seed)


    def usesPeriodicBoundaryConditions(self):
        """
        usesPeriodicBoundaryConditions(self) -> bool

        Returns whether or not this force makes use of periodic boundary conditions.

        Returns
        -------
        bool
            true if force uses PBC and false otherwise
        """
        return _openmm.MonteCarloBarostat_usesPeriodicBoundaryConditions(self)


    def __init__(self, *args):
        """
        __init__(self, defaultPressure, defaultTemperature, frequency=25) -> MonteCarloBarostat
        __init__(self, defaultPressure, defaultTemperature) -> MonteCarloBarostat
        __init__(self, other) -> MonteCarloBarostat

        Create a MonteCarloBarostat.

        Parameters
        ----------
        defaultPressure : double
            the default pressure acting on the system (in bar)
        defaultTemperature : double
            the default temperature at which the system is being maintained (in Kelvin)
        frequency : int
            the frequency at which Monte Carlo pressure changes should be attempted (in time steps)
        """
        this = _openmm.new_MonteCarloBarostat(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_MonteCarloBarostat
    __del__ = lambda self: None
MonteCarloBarostat_swigregister = _openmm.MonteCarloBarostat_swigregister
MonteCarloBarostat_swigregister(MonteCarloBarostat)

def MonteCarloBarostat_Pressure():
    """
    MonteCarloBarostat_Pressure() -> std::string const &

    This is the name of the parameter which stores the current pressure acting on the system (in bar).
    """
    return _openmm.MonteCarloBarostat_Pressure()

def MonteCarloBarostat_Temperature():
    """
    MonteCarloBarostat_Temperature() -> std::string const &

    This is the name of the parameter which stores the current temperature at which the system is being maintained (in Kelvin)
    """
    return _openmm.MonteCarloBarostat_Temperature()

class GayBerneForce(Force):
    """
    This class implements the Gay-Berne anisotropic potential. This is similar to a Lennard-Jones potential, but it represents the particles as ellipsoids rather than point particles. In addition to the standard sigma and epsilon parameters, each particle has three widths sx, sy, and sz that give the diameter of the ellipsoid along each axis. It also has three scale factors ex, ey, and ez that scale the strength of the interaction along each axis. You can think of this force as a Lennard-Jones interaction computed based on the distance between the nearest points on two ellipsoids. The scale factors act as multipliers for epsilon along each axis, so the strength of the interaction along the ellipsoid's x axis is multiplied by ex, and likewise for the other axes. If two particles each have all their widths set to sigma and all their scale factors set to 1, the interaction simplifies to a standard Lennard-Jones force between point particles.

    The orientation of a particle's ellipsoid is determined based on the positions of two other particles. The vector to the first particle sets the direction of the x axis. The vector to the second particle (after subtracting out any x component) sets the direction of the y axis. If the ellipsoid is axially symmetric (sy=sz and ey=ez), you can omit the second particle and define only an x axis direction. If the ellipsoid is a sphere (all three widths and all three scale factors are equal), both particles can be omitted.

    To determine the values of sigma and epsilon for an interaction, this class uses Lorentz-Berthelot combining rules: it takes the arithmetic mean of the sigmas and the geometric mean of the epsilons for the two interacting particles. You also can specify "exceptions", particular pairs of particles for which different values should be used.

    To use this class, create a GayBerneForce object, then call addParticle() once for each particle in the System to define its parameters. The number of particles for which you define parameters must be exactly equal to the number of particles in the System, or else an exception will be thrown when you try to create a Context. After a particle has been added, you can modify its force field parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().

    When using a cutoff, by default interactions are sharply truncated at the cutoff distance. Optionally you can instead use a switching function to make the interaction smoothly go to zero over a finite distance range. To enable this, call setUseSwitchingFunction(). You must also call setSwitchingDistance() to specify the distance at which the interaction should begin to decrease. The switching distance must be less than the cutoff distance.
    """

    __swig_setmethods__ = {}
    for _s in [Force]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GayBerneForce, name, value)
    __swig_getmethods__ = {}
    for _s in [Force]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GayBerneForce, name)
    __repr__ = _swig_repr
    NoCutoff = _openmm.GayBerneForce_NoCutoff
    CutoffNonPeriodic = _openmm.GayBerneForce_CutoffNonPeriodic
    CutoffPeriodic = _openmm.GayBerneForce_CutoffPeriodic

    def getNumParticles(self):
        """
        getNumParticles(self) -> int

        Get the number of particles for which force field parameters have been defined.
        """
        return _openmm.GayBerneForce_getNumParticles(self)


    def getNumExceptions(self):
        """
        getNumExceptions(self) -> int

        Get the number of special interactions that should be calculated differently from other interactions.
        """
        return _openmm.GayBerneForce_getNumExceptions(self)


    def getNonbondedMethod(self):
        """
        getNonbondedMethod(self) -> OpenMM::GayBerneForce::NonbondedMethod

        Get the method used for handling long range interactions.
        """
        return _openmm.GayBerneForce_getNonbondedMethod(self)


    def setNonbondedMethod(self, method):
        """
        setNonbondedMethod(self, method)

        Set the method used for handling long range interactions.
        """
        return _openmm.GayBerneForce_setNonbondedMethod(self, method)


    def getCutoffDistance(self):
        """
        getCutoffDistance(self) -> double

        Get the cutoff distance (in nm) being used for interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect.

        Returns
        -------
        double
            the cutoff distance, measured in nm
        """
        val = _openmm.GayBerneForce_getCutoffDistance(self)

        val=unit.Quantity(val, unit.nanometers)


        return val


    def setCutoffDistance(self, distance):
        """
        setCutoffDistance(self, distance)

        Set the cutoff distance (in nm) being used for interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect.

        Parameters
        ----------
        distance : double
            the cutoff distance, measured in nm
        """
        return _openmm.GayBerneForce_setCutoffDistance(self, distance)


    def getUseSwitchingFunction(self):
        """
        getUseSwitchingFunction(self) -> bool

        Get whether a switching function is applied to the interaction. If the nonbonded method is set to NoCutoff, this option is ignored.
        """
        return _openmm.GayBerneForce_getUseSwitchingFunction(self)


    def setUseSwitchingFunction(self, use):
        """
        setUseSwitchingFunction(self, use)

        Set whether a switching function is applied to the interaction. If the nonbonded method is set to NoCutoff, this option is ignored.
        """
        return _openmm.GayBerneForce_setUseSwitchingFunction(self, use)


    def getSwitchingDistance(self):
        """
        getSwitchingDistance(self) -> double

        Get the distance at which the switching function begins to reduce the interaction. This must be less than the cutoff distance.
        """
        val = _openmm.GayBerneForce_getSwitchingDistance(self)

        val=unit.Quantity(val, unit.nanometers)


        return val


    def setSwitchingDistance(self, distance):
        """
        setSwitchingDistance(self, distance)

        Set the distance at which the switching function begins to reduce the interaction. This must be less than the cutoff distance.
        """
        return _openmm.GayBerneForce_setSwitchingDistance(self, distance)


    def addParticle(self, sigma, epsilon, xparticle, yparticle, sx, sy, sz, ex, ey, ez):
        """
        addParticle(self, sigma, epsilon, xparticle, yparticle, sx, sy, sz, ex, ey, ez) -> int

        Add the parameters for a particle. This should be called once for each particle in the System. When it is called for the i'th time, it specifies the parameters for the i'th particle.

        Parameters
        ----------
        sigma : double
            the sigma parameter (corresponding to the van der Waals radius of the particle), measured in nm
        epsilon : double
            the epsilon parameter (corresponding to the well depth of the van der Waals interaction), measured in kJ/mol
        xparticle : int
            the index of the particle whose position defines the ellipsoid's x axis, or -1 if the ellipsoid is a sphere
        yparticle : int
            the index of the particle whose position defines the ellipsoid's y axis, or -1 if the ellipsoid is axially symmetric
        sx : double
            the diameter of the ellipsoid along its x axis
        sy : double
            the diameter of the ellipsoid along its y axis
        sz : double
            the diameter of the ellipsoid along its z axis
        ex : double
            the factor by which epsilon is scaled along the ellipsoid's x axis
        ey : double
            the factor by which epsilon is scaled along the ellipsoid's y axis
        ez : double
            the factor by which epsilon is scaled along the ellipsoid's z axis

        Returns
        -------
        int
            the index of the particle that was added
        """
        return _openmm.GayBerneForce_addParticle(self, sigma, epsilon, xparticle, yparticle, sx, sy, sz, ex, ey, ez)


    def getParticleParameters(self, index):
        """
        getParticleParameters(self, index)

        Get the parameters for a particle.

        Parameters
        ----------
        index : int
            the index of the particle for which to get parameters

        Returns
        -------
        sigma : double
            the sigma parameter (corresponding to the van der Waals radius of the particle), measured in nm
        epsilon : double
            the epsilon parameter (corresponding to the well depth of the van der Waals interaction), measured in kJ/mol
        xparticle : int
            the index of the particle whose position defines the ellipsoid's x axis, or -1 if the ellipsoid is a sphere
        yparticle : int
            the index of the particle whose position defines the ellipsoid's y axis, or -1 if the ellipsoid is axially symmetric
        sx : double
            the diameter of the ellipsoid along its x axis
        sy : double
            the diameter of the ellipsoid along its y axis
        sz : double
            the diameter of the ellipsoid along its z axis
        ex : double
            the factor by which epsilon is scaled along the ellipsoid's x axis
        ey : double
            the factor by which epsilon is scaled along the ellipsoid's y axis
        ez : double
            the factor by which epsilon is scaled along the ellipsoid's z axis
        """
        val = _openmm.GayBerneForce_getParticleParameters(self, index)

        val[0]=unit.Quantity(val[0], unit.nanometer)
        val[1]=unit.Quantity(val[1], unit.kilojoule_per_mole)
        val[4]=unit.Quantity(val[4], unit.nanometer)
        val[5]=unit.Quantity(val[5], unit.nanometer)
        val[6]=unit.Quantity(val[6], unit.nanometer)


        return val


    def setParticleParameters(self, index, sigma, epsilon, xparticle, yparticle, sx, sy, sz, ex, ey, ez):
        """
        setParticleParameters(self, index, sigma, epsilon, xparticle, yparticle, sx, sy, sz, ex, ey, ez)

        Set the parameters for a particle.

        Parameters
        ----------
        index : int
            the index of the particle for which to set parameters
        sigma : double
            the sigma parameter (corresponding to the van der Waals radius of the particle), measured in nm
        epsilon : double
            the epsilon parameter (corresponding to the well depth of the van der Waals interaction), measured in kJ/mol
        xparticle : int
            the index of the particle whose position defines the ellipsoid's x axis, or -1 if the ellipsoid is a sphere
        yparticle : int
            the index of the particle whose position defines the ellipsoid's y axis, or -1 if the ellipsoid is axially symmetric
        sx : double
            the diameter of the ellipsoid along its x axis
        sy : double
            the diameter of the ellipsoid along its y axis
        sz : double
            the diameter of the ellipsoid along its z axis
        ex : double
            the factor by which epsilon is scaled along the ellipsoid's x axis
        ey : double
            the factor by which epsilon is scaled along the ellipsoid's y axis
        ez : double
            the factor by which epsilon is scaled along the ellipsoid's z axis
        """
        return _openmm.GayBerneForce_setParticleParameters(self, index, sigma, epsilon, xparticle, yparticle, sx, sy, sz, ex, ey, ez)


    def addException(self, particle1, particle2, sigma, epsilon, replace=False):
        """
        addException(self, particle1, particle2, sigma, epsilon, replace=False) -> int
        addException(self, particle1, particle2, sigma, epsilon) -> int

        Add an interaction to the list of exceptions that should be calculated differently from other interactions. If epsilon is equal to 0, this will cause the interaction to be completely omitted from force and energy calculations.

        Parameters
        ----------
        particle1 : int
            the index of the first particle involved in the interaction
        particle2 : int
            the index of the second particle involved in the interaction
        sigma : double
            the sigma parameter (corresponding to the van der Waals radius of the particle), measured in nm
        epsilon : double
            the epsilon parameter (corresponding to the well depth of the van der Waals interaction), measured in kJ/mol
        replace : bool
            determines the behavior if there is already an exception for the same two particles. If true, the existing one is replaced. If false, an exception is thrown.

        Returns
        -------
        int
            the index of the exception that was added
        """
        return _openmm.GayBerneForce_addException(self, particle1, particle2, sigma, epsilon, replace)


    def getExceptionParameters(self, index):
        """
        getExceptionParameters(self, index)

        Get the force field parameters for an interaction that should be calculated differently from others.

        Parameters
        ----------
        index : int
            the index of the interaction for which to get parameters

        Returns
        -------
        particle1 : int
            the index of the first particle involved in the interaction
        particle2 : int
            the index of the second particle involved in the interaction
        sigma : double
            the sigma parameter (corresponding to the van der Waals radius of the particle), measured in nm
        epsilon : double
            the epsilon parameter (corresponding to the well depth of the van der Waals interaction), measured in kJ/mol
        """
        return _openmm.GayBerneForce_getExceptionParameters(self, index)


    def setExceptionParameters(self, index, particle1, particle2, sigma, epsilon):
        """
        setExceptionParameters(self, index, particle1, particle2, sigma, epsilon)

        Set the force field parameters for an interaction that should be calculated differently from others. If epsilon is equal to 0, this will cause the interaction to be completely omitted from force and energy calculations.

        Parameters
        ----------
        index : int
            the index of the interaction for which to get parameters
        particle1 : int
            the index of the first particle involved in the interaction
        particle2 : int
            the index of the second particle involved in the interaction
        sigma : double
            the sigma parameter (corresponding to the van der Waals radius of the particle), measured in nm
        epsilon : double
            the epsilon parameter (corresponding to the well depth of the van der Waals interaction), measured in kJ/mol
        """
        return _openmm.GayBerneForce_setExceptionParameters(self, index, particle1, particle2, sigma, epsilon)


    def updateParametersInContext(self, context):
        """
        updateParametersInContext(self, context)

        Update the particle and exception parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setParticleParameters() and setExceptionParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context.

        This method has several limitations. The only information it updates is the parameters of particles and exceptions. All other aspects of the Force (the nonbonded method, the cutoff distance, etc.) are unaffected and can only be changed by reinitializing the Context. Furthermore, only the sigma and epsilon values of an exception can be changed; the pair of particles involved in the exception cannot change. Likewise, the xparticle and yparticle defining the orientation of an ellipse cannot be changed. Finally, this method cannot be used to add new particles or exceptions, only to change the parameters of existing ones.
        """
        return _openmm.GayBerneForce_updateParametersInContext(self, context)


    def usesPeriodicBoundaryConditions(self):
        """
        usesPeriodicBoundaryConditions(self) -> bool

        Returns whether or not this force makes use of periodic boundary conditions.

        Returns
        -------
        bool
            true if force uses PBC and false otherwise
        """
        return _openmm.GayBerneForce_usesPeriodicBoundaryConditions(self)


    def __init__(self, *args):
        """
        __init__(self) -> GayBerneForce
        __init__(self, other) -> GayBerneForce

        Create a GayBerneForce.
        """
        this = _openmm.new_GayBerneForce(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_GayBerneForce
    __del__ = lambda self: None
GayBerneForce_swigregister = _openmm.GayBerneForce_swigregister
GayBerneForce_swigregister(GayBerneForce)

class AmoebaInPlaneAngleForce(Force):
    """
    This class implements an interaction at trigonal centers corresponding to the projected in-plane angle bend energy between four particles. The interaction is defined by a 6th order polynomial in the angle between them. Only the quadratic term is set per-angle. The coefficients of the higher order terms each have a single value that is set globally.

    To use it, create an AmoebaInPlaneAngleForce object then call addAngle() once for each angle. After an angle has been added, you can modify its force field parameters by calling setAngleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().
    """

    __swig_setmethods__ = {}
    for _s in [Force]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, AmoebaInPlaneAngleForce, name, value)
    __swig_getmethods__ = {}
    for _s in [Force]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, AmoebaInPlaneAngleForce, name)
    __repr__ = _swig_repr

    def getNumAngles(self):
        """
        getNumAngles(self) -> int

        Get the number of in-plane angle terms in the potential function
        """
        return _openmm.AmoebaInPlaneAngleForce_getNumAngles(self)


    def setAmoebaGlobalInPlaneAngleCubic(self, cubicK):
        """
        setAmoebaGlobalInPlaneAngleCubic(self, cubicK)

        Set the global cubic term

        Parameters
        ----------
        cubicK : double
            the cubic force constant for the angle
        """
        return _openmm.AmoebaInPlaneAngleForce_setAmoebaGlobalInPlaneAngleCubic(self, cubicK)


    def getAmoebaGlobalInPlaneAngleCubic(self):
        """
        getAmoebaGlobalInPlaneAngleCubic(self) -> double

        Get the global cubic term

        Returns
        -------
        double
            global cubicK term
        """
        val = _openmm.AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAngleCubic(self)

        val=unit.Quantity(val, 1/unit.radian)


        return val


    def setAmoebaGlobalInPlaneAngleQuartic(self, quarticK):
        """
        setAmoebaGlobalInPlaneAngleQuartic(self, quarticK)

        Set the global quartic term

        Parameters
        ----------
        quarticK : double
            the quartic force constant for the angle
        """
        return _openmm.AmoebaInPlaneAngleForce_setAmoebaGlobalInPlaneAngleQuartic(self, quarticK)


    def getAmoebaGlobalInPlaneAngleQuartic(self):
        """
        getAmoebaGlobalInPlaneAngleQuartic(self) -> double

        Get the global quartic term

        Returns
        -------
        double
            global quartic term
        """
        val = _openmm.AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAngleQuartic(self)

        val=unit.Quantity(val, 1/unit.radian**2)


        return val


    def setAmoebaGlobalInPlaneAnglePentic(self, penticK):
        """
        setAmoebaGlobalInPlaneAnglePentic(self, penticK)

        Set the global pentic term

        Parameters
        ----------
        penticK : double
            the pentic force constant for the angle
        """
        return _openmm.AmoebaInPlaneAngleForce_setAmoebaGlobalInPlaneAnglePentic(self, penticK)


    def getAmoebaGlobalInPlaneAnglePentic(self):
        """
        getAmoebaGlobalInPlaneAnglePentic(self) -> double

        Get the global pentic term

        Returns
        -------
        double
            global penticK term
        """
        val = _openmm.AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAnglePentic(self)

        val=unit.Quantity(val, 1/unit.radian**3)


        return val


    def setAmoebaGlobalInPlaneAngleSextic(self, sexticK):
        """
        setAmoebaGlobalInPlaneAngleSextic(self, sexticK)

        Set the global sextic term

        Parameters
        ----------
        sexticK : double
            the sextic force constant for the angle
        """
        return _openmm.AmoebaInPlaneAngleForce_setAmoebaGlobalInPlaneAngleSextic(self, sexticK)


    def getAmoebaGlobalInPlaneAngleSextic(self):
        """
        getAmoebaGlobalInPlaneAngleSextic(self) -> double

        Get the global sextic term

        Returns
        -------
        double
            global sextic term
        """
        val = _openmm.AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAngleSextic(self)

        val=unit.Quantity(val, 1/unit.radian**4)


        return val


    def addAngle(self, particle1, particle2, particle3, particle4, length, quadraticK):
        """
        addAngle(self, particle1, particle2, particle3, particle4, length, quadraticK) -> int

        Add an angle term to the force field.

        Parameters
        ----------
        particle1 : int
            the index of the first particle connected by the angle
        particle2 : int
            the index of the second particle connected by the angle
        particle3 : int
            the index of the third particle connected by the angle
        particle4 : int
            the index of the fourth particle connected by the angle
        length : double
            the equilibrium angle, measured in radians
        quadraticK : double
            the quadratic force constant for the angle measured in kJ/mol/radian^2

        Returns
        -------
        int
            the index of the angle that was added
        """
        return _openmm.AmoebaInPlaneAngleForce_addAngle(self, particle1, particle2, particle3, particle4, length, quadraticK)


    def getAngleParameters(self, index):
        """
        getAngleParameters(self, index)

        Get the force field parameters for an angle term.

        Parameters
        ----------
        index : int
            the index of the angle for which to get parameters

        Returns
        -------
        particle1 : int
            the index of the first particle connected by the angle
        particle2 : int
            the index of the second particle connected by the angle
        particle3 : int
            the index of the third particle connected by the angle
        particle4 : int
            the index of the fourth particle connected by the angle
        length : double
            the equilibrium angle, measured in radians
        quadraticK : double
            the quadratic force constant for the angle measured in kJ/mol/radian^2
        """
        val = _openmm.AmoebaInPlaneAngleForce_getAngleParameters(self, index)

        val[4]=unit.Quantity(val[4], unit.radian)
        val[5]=unit.Quantity(val[5], unit.kilojoule_per_mole/(unit.radian*unit.radian))


        return val


    def setAngleParameters(self, index, particle1, particle2, particle3, particle4, length, quadraticK):
        """
        setAngleParameters(self, index, particle1, particle2, particle3, particle4, length, quadraticK)

        Set the force field parameters for an angle term.

        Parameters
        ----------
        index : int
            the index of the angle for which to set parameters
        particle1 : int
            the index of the first particle connected by the angle
        particle2 : int
            the index of the second particle connected by the angle
        particle3 : int
            the index of the third particle connected by the angle
        particle4 : int
            the index of the fourth particle connected by the angle
        length : double
            the equilibrium angle, measured in radians
        quadraticK : double
            the quadratic force constant for the angle, measured in kJ/mol/radian^2
        """
        return _openmm.AmoebaInPlaneAngleForce_setAngleParameters(self, index, particle1, particle2, particle3, particle4, length, quadraticK)


    def updateParametersInContext(self, context):
        """
        updateParametersInContext(self, context)

        Update the per-angle parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setAngleParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context.

        The only information this method updates is the values of per-angle parameters. The set of particles involved in an angle cannot be changed, nor can new angles be added.
        """
        return _openmm.AmoebaInPlaneAngleForce_updateParametersInContext(self, context)


    def setUsesPeriodicBoundaryConditions(self, periodic):
        """
        setUsesPeriodicBoundaryConditions(self, periodic)

        Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful.
        """
        return _openmm.AmoebaInPlaneAngleForce_setUsesPeriodicBoundaryConditions(self, periodic)


    def usesPeriodicBoundaryConditions(self):
        """
        usesPeriodicBoundaryConditions(self) -> bool

        Returns whether or not this force makes use of periodic boundary conditions.

        Returns
        -------
        bool
            true if force uses PBC and false otherwise
        """
        return _openmm.AmoebaInPlaneAngleForce_usesPeriodicBoundaryConditions(self)


    def __init__(self, *args):
        """
        __init__(self) -> AmoebaInPlaneAngleForce
        __init__(self, other) -> AmoebaInPlaneAngleForce

        Create an AmoebaAngleForce.
        """
        this = _openmm.new_AmoebaInPlaneAngleForce(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_AmoebaInPlaneAngleForce
    __del__ = lambda self: None
AmoebaInPlaneAngleForce_swigregister = _openmm.AmoebaInPlaneAngleForce_swigregister
AmoebaInPlaneAngleForce_swigregister(AmoebaInPlaneAngleForce)

class GBSAOBCForce(Force):
    """
    This class implements an implicit solvation force using the GBSA-OBC model.

    To use this class, create a GBSAOBCForce object, then call addParticle() once for each particle in the System to define its parameters. The number of particles for which you define GBSA parameters must be exactly equal to the number of particles in the System, or else an exception will be thrown when you try to create a Context. After a particle has been added, you can modify its force field parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().

    When using this Force, the System should also include a NonbondedForce, and both objects must specify identical charges for all particles. Otherwise, the results will not be correct. Furthermore, if the nonbonded method is set to CutoffNonPeriodic or CutoffPeriodic, you should call setReactionFieldDielectric(1.0) on the NonbondedForce to turn off the reaction field approximation, which does not produce correct results when combined with GBSA.
    """

    __swig_setmethods__ = {}
    for _s in [Force]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GBSAOBCForce, name, value)
    __swig_getmethods__ = {}
    for _s in [Force]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GBSAOBCForce, name)
    __repr__ = _swig_repr
    NoCutoff = _openmm.GBSAOBCForce_NoCutoff
    CutoffNonPeriodic = _openmm.GBSAOBCForce_CutoffNonPeriodic
    CutoffPeriodic = _openmm.GBSAOBCForce_CutoffPeriodic

    def getNumParticles(self):
        """
        getNumParticles(self) -> int

        Get the number of particles in the system.
        """
        return _openmm.GBSAOBCForce_getNumParticles(self)


    def addParticle(self, charge, radius, scalingFactor):
        """
        addParticle(self, charge, radius, scalingFactor) -> int

        Add the GBSA parameters for a particle. This should be called once for each particle in the System. When it is called for the i'th time, it specifies the parameters for the i'th particle.

        Parameters
        ----------
        charge : double
            the charge of the particle, measured in units of the proton charge
        radius : double
            the GBSA radius of the particle, measured in nm
        scalingFactor : double
            the OBC scaling factor for the particle

        Returns
        -------
        int
            the index of the particle that was added
        """
        return _openmm.GBSAOBCForce_addParticle(self, charge, radius, scalingFactor)


    def getParticleParameters(self, index):
        """
        getParticleParameters(self, index)

        Get the force field parameters for a particle.

        Parameters
        ----------
        index : int
            the index of the particle for which to get parameters

        Returns
        -------
        charge : double
            the charge of the particle, measured in units of the proton charge
        radius : double
            the GBSA radius of the particle, measured in nm
        scalingFactor : double
            the OBC scaling factor for the particle
        """
        val = _openmm.GBSAOBCForce_getParticleParameters(self, index)

        val[0]=unit.Quantity(val[0], unit.elementary_charge)
        val[1]=unit.Quantity(val[1], unit.nanometer)


        return val


    def setParticleParameters(self, index, charge, radius, scalingFactor):
        """
        setParticleParameters(self, index, charge, radius, scalingFactor)

        Set the force field parameters for a particle.

        Parameters
        ----------
        index : int
            the index of the particle for which to set parameters
        charge : double
            the charge of the particle, measured in units of the proton charge
        radius : double
            the GBSA radius of the particle, measured in nm
        scalingFactor : double
            the OBC scaling factor for the particle
        """
        return _openmm.GBSAOBCForce_setParticleParameters(self, index, charge, radius, scalingFactor)


    def getSolventDielectric(self):
        """
        getSolventDielectric(self) -> double

        Get the dielectric constant for the solvent.
        """
        return _openmm.GBSAOBCForce_getSolventDielectric(self)


    def setSolventDielectric(self, dielectric):
        """
        setSolventDielectric(self, dielectric)

        Set the dielectric constant for the solvent.
        """
        return _openmm.GBSAOBCForce_setSolventDielectric(self, dielectric)


    def getSoluteDielectric(self):
        """
        getSoluteDielectric(self) -> double

        Get the dielectric constant for the solute.
        """
        return _openmm.GBSAOBCForce_getSoluteDielectric(self)


    def setSoluteDielectric(self, dielectric):
        """
        setSoluteDielectric(self, dielectric)

        Set the dielectric constant for the solute.
        """
        return _openmm.GBSAOBCForce_setSoluteDielectric(self, dielectric)


    def getSurfaceAreaEnergy(self):
        """
        getSurfaceAreaEnergy(self) -> double

        Get the energy scale for the surface energy term, measured in kJ/mol/nm^2.
        """
        val = _openmm.GBSAOBCForce_getSurfaceAreaEnergy(self)

        val=unit.Quantity(val, unit.kilojoule_per_mole/unit.nanometer/unit.nanometer)


        return val


    def setSurfaceAreaEnergy(self, energy):
        """
        setSurfaceAreaEnergy(self, energy)

        Set the energy scale for the surface energy term, measured in kJ/mol/nm^2.
        """
        return _openmm.GBSAOBCForce_setSurfaceAreaEnergy(self, energy)


    def getNonbondedMethod(self):
        """
        getNonbondedMethod(self) -> OpenMM::GBSAOBCForce::NonbondedMethod

        Get the method used for handling long range nonbonded interactions.
        """
        return _openmm.GBSAOBCForce_getNonbondedMethod(self)


    def setNonbondedMethod(self, method):
        """
        setNonbondedMethod(self, method)

        Set the method used for handling long range nonbonded interactions.
        """
        return _openmm.GBSAOBCForce_setNonbondedMethod(self, method)


    def getCutoffDistance(self):
        """
        getCutoffDistance(self) -> double

        Get the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect.

        Returns
        -------
        double
            the cutoff distance, measured in nm
        """
        val = _openmm.GBSAOBCForce_getCutoffDistance(self)

        val=unit.Quantity(val, unit.nanometers)


        return val


    def setCutoffDistance(self, distance):
        """
        setCutoffDistance(self, distance)

        Set the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect.

        Parameters
        ----------
        distance : double
            the cutoff distance, measured in nm
        """
        return _openmm.GBSAOBCForce_setCutoffDistance(self, distance)


    def updateParametersInContext(self, context):
        """
        updateParametersInContext(self, context)

        Update the particle parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setParticleParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context.

        The only information this method updates is the values of per-particle parameters. All other aspects of the Force (the nonbonded method, the cutoff distance, etc.) are unaffected and can only be changed by reinitializing the Context. Furthermore, this method cannot be used to add new particles, only to change the parameters of existing ones.
        """
        return _openmm.GBSAOBCForce_updateParametersInContext(self, context)


    def usesPeriodicBoundaryConditions(self):
        """
        usesPeriodicBoundaryConditions(self) -> bool

        Returns whether or not this force makes use of periodic boundary conditions.

        Returns
        -------
        bool
            true if force uses PBC and false otherwise
        """
        return _openmm.GBSAOBCForce_usesPeriodicBoundaryConditions(self)


    def __init__(self, *args):
        """
        __init__(self) -> GBSAOBCForce
        __init__(self, other) -> GBSAOBCForce

        Create a GBSAOBCForce.
        """
        this = _openmm.new_GBSAOBCForce(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _openmm.delete_GBSAOBCForce
    __del__ = lambda self: None
GBSAOBCForce_swigregister = _openmm.GBSAOBCForce_swigregister
GBSAOBCForce_swigregister(GBSAOBCForce)

class LangevinIntegrator(Integrator):
    """This is an Integrator which simulates a System using Langevin dynamics."""

    __swig_setmethods__ = {}
    for _s in [Integrator]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, LangevinIntegrator, name, value)
    __swig_getmethods__ = {}
    for _s in [Integrator]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, LangevinIntegrator, name)
    __repr__ = _swig_repr

    def getTemperature(self):
        """
        getTemperature(self) -> double

        Get the temperature of the heat bath (in Kelvin).

        Returns
        -------
        double
            the temperature of the heat bath, measured in Kelvin
        """
        val = _openmm.LangevinIntegrator_getTemperature(self)

        val=unit.Quantity(val, unit.kelvin)


        return val


    def setTemperature(self, temp):
        """
        setTemperature(self, temp)

        Set the temperature of the heat bath (in Kelvin).

        Parameters
        ----------
        temp : double
            the temperature of the heat bath, measured in Kelvin
        """
        return _openmm.LangevinIntegrator_setTemperature(self, temp)


    def getFriction(self):
        """
        getFriction(self) -> double

        Get the friction coefficient which determines how strongly the system is coupled to the heat bath (in inverse ps).

        Returns
        -------
        double
            the friction coefficient, measured in 1/ps
        """
        val = _openmm.LangevinIntegrator_getFriction(self)

        val=unit.Quantity(val, 1/unit.picosecond)


        return val


    def setFriction(self, coeff):
        """
        setFriction(self, coeff)

        Set the friction coefficient which determines how strongly the system is coupled to the heat bath (in inverse ps).

        Parameters
        ----------
        coeff : double
            the friction coefficient, measured in 1/ps
        """
        return _openmm.LangevinIntegrator_setFriction(self, coeff)


[docs] def getRandomNumberSeed(self): """ getRandomNumberSeed(self) -> int Get the random number seed. See setRandomNumberSeed() for details. """ return _openmm.LangevinIntegrator_getRandomNumberSeed(self)
[docs] def setRandomNumberSeed(self, seed): """ setRandomNumberSeed(self, seed) Set the random number seed. The precise meaning of this parameter is undefined, and is left up to each Platform to interpret in an appropriate way. It is guaranteed that if two simulations are run with different random number seeds, the sequence of random forces will be different. On the other hand, no guarantees are made about the behavior of simulations that use the same seed. In particular, Platforms are permitted to use non-deterministic algorithms which produce different results on successive runs, even if those runs were initialized identically. If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context is created from this Force. This is done to ensure that each Context receives unique random seeds without you needing to set them explicitly. """ return _openmm.LangevinIntegrator_setRandomNumberSeed(self, seed)
[docs] def step(self, steps): """ step(self, steps) Advance a simulation through time by taking a series of time steps. Parameters ---------- steps : int the number of time steps to take """ return _openmm.LangevinIntegrator_step(self, steps)
def __init__(self, *args): """ __init__(self, temperature, frictionCoeff, stepSize) -> LangevinIntegrator __init__(self, other) -> LangevinIntegrator Create a LangevinIntegrator. Parameters ---------- temperature : double the temperature of the heat bath (in Kelvin) frictionCoeff : double the friction coefficient which couples the system to the heat bath (in inverse picoseconds) stepSize : double the step size with which to integrate the system (in picoseconds) """ this = _openmm.new_LangevinIntegrator(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_LangevinIntegrator __del__ = lambda self: None LangevinIntegrator_swigregister = _openmm.LangevinIntegrator_swigregister LangevinIntegrator_swigregister(LangevinIntegrator) class CustomNonbondedForce(Force): """ This class implements nonbonded interactions between particles. Unlike NonbondedForce, the functional form of the interaction is completely customizable, and may involve arbitrary algebraic expressions and tabulated functions. It may depend on the distance between particles, as well as on arbitrary global and per-particle parameters. It also optionally supports periodic boundary conditions and cutoffs for long range interactions. To use this class, create a CustomNonbondedForce object, passing an algebraic expression to the constructor that defines the interaction energy between each pair of particles. The expression may depend on r, the distance between the particles, as well as on any parameters you choose. Then call addPerParticleParameter() to define per-particle parameters, and addGlobalParameter() to define global parameters. The values of per-particle parameters are specified as part of the system definition, while values of global parameters may be modified during a simulation by calling Context::setParameter(). Next, call addParticle() once for each particle in the System to set the values of its per-particle parameters. The number of particles for which you set parameters must be exactly equal to the number of particles in the System, or else an exception will be thrown when you try to create a Context. After a particle has been added, you can modify its parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext(). CustomNonbondedForce also lets you specify "exclusions", particular pairs of particles whose interactions should be omitted from force and energy calculations. This is most often used for particles that are bonded to each other. As an example, the following code creates a CustomNonbondedForce that implements a 12-6 Lennard-Jones potential: <tt>CustomNonbondedForce* force = new CustomNonbondedForce("4*epsilon*((sigma/r)^12-(sigma/r)^6); sigma=0.5*(sigma1+sigma2); epsilon=sqrt(epsilon1*epsilon2)");</tt> This force depends on two parameters: sigma and epsilon. The following code defines these as per-particle parameters: <tt><pre> force->addPerParticleParameter("sigma"); force->addPerParticleParameter("epsilon"); </pre></tt> The expression _must_ be symmetric with respect to the two particles. It typically will only be evaluated once for each pair of particles, and no guarantee is made about which particle will be identified as "particle 1". In the above example, the energy only depends on the products sigma1*sigma2 and epsilon1*epsilon2, both of which are unchanged if the labels 1 and 2 are reversed. In contrast, if it depended on the difference sigma1-sigma2, the results would be undefined, because reversing the labels 1 and 2 would change the energy. CustomNonbondedForce can operate in two modes. By default, it computes the interaction of every particle in the System with every other particle. Alternatively, you can restrict it to only a subset of particle pairs. To do this, specify one or more "interaction groups". An interaction group consists of two sets of particles that should interact with each other. Every particle in the first set interacts with every particle in the second set. For example, you might use this feature to compute a solute-solvent interaction energy, while omitting all interactions between two solute atoms or two solvent atoms. To create an interaction group, call addInteractionGroup(). You may add as many interaction groups as you want. Be aware of the following: - Exclusions are still taken into account, so the interactions between excluded pairs are omitted. - Likewise, a particle will never interact with itself, even if it appears in both sets of an interaction group. - If a particle pair appears in two different interaction groups, its interaction will be computed twice. This is sometimes useful, but be aware of it so you do not accidentally create unwanted duplicate interactions. - If you do not add any interaction groups to a CustomNonbondedForce, it operates in the default mode where every particle interacts with every other particle. When using a cutoff, by default the interaction is sharply truncated at the cutoff distance. Optionally you can instead use a switching function to make the interaction smoothly go to zero over a finite distance range. To enable this, call setUseSwitchingFunction(). You must also call setSwitchingDistance() to specify the distance at which the interaction should begin to decrease. The switching distance must be less than the cutoff distance. Of course, you could also incorporate the switching function directly into your energy expression, but there are several advantages to keeping it separate. It makes your energy expression simpler to write and understand. It allows you to use the same energy expression with or without a cutoff. Also, when using a long range correction (see below), separating out the switching function allows the correction to be calculated more accurately. Another optional feature of this class is to add a contribution to the energy which approximates the effect of all interactions beyond the cutoff in a periodic system. When running a simulation at constant pressure, this can improve the quality of the result. Call setUseLongRangeCorrection() to enable it. Computing the long range correction takes negligible work in each time step, but it does require an expensive precomputation at the start of the simulation. Furthermore, that precomputation must be repeated every time a global parameter changes (or when you modify per-particle parameters by calling updateParametersInContext()). This means that if parameters change frequently, the long range correction can be very slow. For this reason, it is disabled by default. This class also has the ability to compute derivatives of the potential energy with respect to global parameters. Call addEnergyParameterDerivative() to request that the derivative with respect to a particular parameter be computed. You can then query its value in a Context by calling getState() on it. Expressions may involve the operators + (add), - (subtract), * (multiply), / (divide), and ^ (power), and the following functions: sqrt, exp, log, sin, cos, sec, csc, tan, cot, asin, acos, atan, sinh, cosh, tanh, erf, erfc, min, max, abs, floor, ceil, step, delta, select. All trigonometric functions are defined in radians, and log is the natural logarithm. step(x) = 0 if x is less than 0, 1 otherwise. delta(x) = 1 if x is 0, 0 otherwise. select(x,y,z) = z if x = 0, y otherwise. The names of per-particle parameters have the suffix "1" or "2" appended to them to indicate the values for the two interacting particles. As seen in the above example, the expression may also involve intermediate quantities that are defined following the main expression, using ";" as a separator. In addition, you can call addTabulatedFunction() to define a new function based on tabulated values. You specify the function by creating a TabulatedFunction object. That function can then appear in the expression. """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, CustomNonbondedForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, CustomNonbondedForce, name) __repr__ = _swig_repr NoCutoff = _openmm.CustomNonbondedForce_NoCutoff CutoffNonPeriodic = _openmm.CustomNonbondedForce_CutoffNonPeriodic CutoffPeriodic = _openmm.CustomNonbondedForce_CutoffPeriodic def __init__(self, *args): """ __init__(self, energy) -> CustomNonbondedForce __init__(self, rhs) -> CustomNonbondedForce Create a CustomNonbondedForce. Parameters ---------- energy : string an algebraic expression giving the interaction energy between two particles as a function of r, the distance between them, as well as any global and per-particle parameters """ this = _openmm.new_CustomNonbondedForce(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_CustomNonbondedForce __del__ = lambda self: None def getNumParticles(self): """ getNumParticles(self) -> int Get the number of particles for which force field parameters have been defined. """ return _openmm.CustomNonbondedForce_getNumParticles(self) def getNumExclusions(self): """ getNumExclusions(self) -> int Get the number of particle pairs whose interactions should be excluded. """ return _openmm.CustomNonbondedForce_getNumExclusions(self) def getNumPerParticleParameters(self): """ getNumPerParticleParameters(self) -> int Get the number of per-particle parameters that the interaction depends on. """ return _openmm.CustomNonbondedForce_getNumPerParticleParameters(self) def getNumGlobalParameters(self): """ getNumGlobalParameters(self) -> int Get the number of global parameters that the interaction depends on. """ return _openmm.CustomNonbondedForce_getNumGlobalParameters(self) def getNumTabulatedFunctions(self): """ getNumTabulatedFunctions(self) -> int Get the number of tabulated functions that have been defined. """ return _openmm.CustomNonbondedForce_getNumTabulatedFunctions(self) def getNumFunctions(self): """ getNumFunctions(self) -> int Get the number of tabulated functions that have been defined. @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead. """ return _openmm.CustomNonbondedForce_getNumFunctions(self) def getNumInteractionGroups(self): """ getNumInteractionGroups(self) -> int Get the number of interaction groups that have been defined. """ return _openmm.CustomNonbondedForce_getNumInteractionGroups(self) def getNumEnergyParameterDerivatives(self): """ getNumEnergyParameterDerivatives(self) -> int Get the number of global parameters with respect to which the derivative of the energy should be computed. """ return _openmm.CustomNonbondedForce_getNumEnergyParameterDerivatives(self) def getEnergyFunction(self): """ getEnergyFunction(self) -> std::string const & Get the algebraic expression that gives the interaction energy between two particles """ return _openmm.CustomNonbondedForce_getEnergyFunction(self) def setEnergyFunction(self, energy): """ setEnergyFunction(self, energy) Set the algebraic expression that gives the interaction energy between two particles """ return _openmm.CustomNonbondedForce_setEnergyFunction(self, energy) def getNonbondedMethod(self): """ getNonbondedMethod(self) -> OpenMM::CustomNonbondedForce::NonbondedMethod Get the method used for handling long range nonbonded interactions. """ return _openmm.CustomNonbondedForce_getNonbondedMethod(self) def setNonbondedMethod(self, method): """ setNonbondedMethod(self, method) Set the method used for handling long range nonbonded interactions. """ return _openmm.CustomNonbondedForce_setNonbondedMethod(self, method) def getCutoffDistance(self): """ getCutoffDistance(self) -> double Get the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect. Returns ------- double the cutoff distance, measured in nm """ val = _openmm.CustomNonbondedForce_getCutoffDistance(self) val=unit.Quantity(val, unit.nanometers) return val def setCutoffDistance(self, distance): """ setCutoffDistance(self, distance) Set the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect. Parameters ---------- distance : double the cutoff distance, measured in nm """ return _openmm.CustomNonbondedForce_setCutoffDistance(self, distance) def getUseSwitchingFunction(self): """ getUseSwitchingFunction(self) -> bool Get whether a switching function is applied to the interaction. If the nonbonded method is set to NoCutoff, this option is ignored. """ return _openmm.CustomNonbondedForce_getUseSwitchingFunction(self) def setUseSwitchingFunction(self, use): """ setUseSwitchingFunction(self, use) Set whether a switching function is applied to the interaction. If the nonbonded method is set to NoCutoff, this option is ignored. """ return _openmm.CustomNonbondedForce_setUseSwitchingFunction(self, use) def getSwitchingDistance(self): """ getSwitchingDistance(self) -> double Get the distance at which the switching function begins to reduce the interaction. This must be less than the cutoff distance. """ val = _openmm.CustomNonbondedForce_getSwitchingDistance(self) val=unit.Quantity(val, unit.nanometers) return val def setSwitchingDistance(self, distance): """ setSwitchingDistance(self, distance) Set the distance at which the switching function begins to reduce the interaction. This must be less than the cutoff distance. """ return _openmm.CustomNonbondedForce_setSwitchingDistance(self, distance) def getUseLongRangeCorrection(self): """ getUseLongRangeCorrection(self) -> bool Get whether to add a correction to the energy to compensate for the cutoff and switching function. This has no effect if periodic boundary conditions are not used. """ return _openmm.CustomNonbondedForce_getUseLongRangeCorrection(self) def setUseLongRangeCorrection(self, use): """ setUseLongRangeCorrection(self, use) Set whether to add a correction to the energy to compensate for the cutoff and switching function. This has no effect if periodic boundary conditions are not used. """ return _openmm.CustomNonbondedForce_setUseLongRangeCorrection(self, use) def addPerParticleParameter(self, name): """ addPerParticleParameter(self, name) -> int Add a new per-particle parameter that the interaction may depend on. Parameters ---------- name : string the name of the parameter Returns ------- int the index of the parameter that was added """ return _openmm.CustomNonbondedForce_addPerParticleParameter(self, name) def getPerParticleParameterName(self, index): """ getPerParticleParameterName(self, index) -> std::string const & Get the name of a per-particle parameter. Parameters ---------- index : int the index of the parameter for which to get the name Returns ------- string the parameter name """ return _openmm.CustomNonbondedForce_getPerParticleParameterName(self, index) def setPerParticleParameterName(self, index, name): """ setPerParticleParameterName(self, index, name) Set the name of a per-particle parameter. Parameters ---------- index : int the index of the parameter for which to set the name name : string the name of the parameter """ return _openmm.CustomNonbondedForce_setPerParticleParameterName(self, index, name) def addGlobalParameter(self, name, defaultValue): """ addGlobalParameter(self, name, defaultValue) -> int Add a new global parameter that the interaction may depend on. The default value provided to this method is the initial value of the parameter in newly created Contexts. You can change the value at any time by calling setParameter() on the Context. Parameters ---------- name : string the name of the parameter defaultValue : double the default value of the parameter Returns ------- int the index of the parameter that was added """ return _openmm.CustomNonbondedForce_addGlobalParameter(self, name, defaultValue) def getGlobalParameterName(self, index): """ getGlobalParameterName(self, index) -> std::string const & Get the name of a global parameter. Parameters ---------- index : int the index of the parameter for which to get the name Returns ------- string the parameter name """ return _openmm.CustomNonbondedForce_getGlobalParameterName(self, index) def setGlobalParameterName(self, index, name): """ setGlobalParameterName(self, index, name) Set the name of a global parameter. Parameters ---------- index : int the index of the parameter for which to set the name name : string the name of the parameter """ return _openmm.CustomNonbondedForce_setGlobalParameterName(self, index, name) def getGlobalParameterDefaultValue(self, index): """ getGlobalParameterDefaultValue(self, index) -> double Get the default value of a global parameter. Parameters ---------- index : int the index of the parameter for which to get the default value Returns ------- double the parameter default value """ return _openmm.CustomNonbondedForce_getGlobalParameterDefaultValue(self, index) def setGlobalParameterDefaultValue(self, index, defaultValue): """ setGlobalParameterDefaultValue(self, index, defaultValue) Set the default value of a global parameter. Parameters ---------- index : int the index of the parameter for which to set the default value defaultValue : double the default value of the parameter """ return _openmm.CustomNonbondedForce_setGlobalParameterDefaultValue(self, index, defaultValue) def addEnergyParameterDerivative(self, name): """ addEnergyParameterDerivative(self, name) Request that this Force compute the derivative of its energy with respect to a global parameter. The parameter must have already been added with addGlobalParameter(). Parameters ---------- name : string the name of the parameter """ return _openmm.CustomNonbondedForce_addEnergyParameterDerivative(self, name) def getEnergyParameterDerivativeName(self, index): """ getEnergyParameterDerivativeName(self, index) -> std::string const & Get the name of a global parameter with respect to which this Force should compute the derivative of the energy. Parameters ---------- index : int the index of the parameter derivative, between 0 and getNumEnergyParameterDerivatives() Returns ------- string the parameter name """ return _openmm.CustomNonbondedForce_getEnergyParameterDerivativeName(self, index) def addParticle(self, *args): """ addParticle(self, parameters) -> int addParticle(self) -> int Add the nonbonded force parameters for a particle. This should be called once for each particle in the System. When it is called for the i'th time, it specifies the parameters for the i'th particle. Parameters ---------- parameters : vector< double > the list of parameters for the new particle Returns ------- int the index of the particle that was added """ return _openmm.CustomNonbondedForce_addParticle(self, *args) def getParticleParameters(self, index): """ getParticleParameters(self, index) Get the nonbonded force parameters for a particle. Parameters ---------- index : int the index of the particle for which to get parameters Returns ------- parameters : vector< double > the list of parameters for the specified particle """ return _openmm.CustomNonbondedForce_getParticleParameters(self, index) def setParticleParameters(self, index, parameters): """ setParticleParameters(self, index, parameters) Set the nonbonded force parameters for a particle. Parameters ---------- index : int the index of the particle for which to set parameters parameters : vector< double > the list of parameters for the specified particle """ return _openmm.CustomNonbondedForce_setParticleParameters(self, index, parameters) def addExclusion(self, particle1, particle2): """ addExclusion(self, particle1, particle2) -> int Add a particle pair to the list of interactions that should be excluded. In many cases, you can use createExclusionsFromBonds() rather than adding each exclusion explicitly. Parameters ---------- particle1 : int the index of the first particle in the pair particle2 : int the index of the second particle in the pair Returns ------- int the index of the exclusion that was added """ return _openmm.CustomNonbondedForce_addExclusion(self, particle1, particle2) def getExclusionParticles(self, index): """ getExclusionParticles(self, index) Get the particles in a pair whose interaction should be excluded. Parameters ---------- index : int the index of the exclusion for which to get particle indices Returns ------- particle1 : int the index of the first particle in the pair particle2 : int the index of the second particle in the pair """ return _openmm.CustomNonbondedForce_getExclusionParticles(self, index) def setExclusionParticles(self, index, particle1, particle2): """ setExclusionParticles(self, index, particle1, particle2) Set the particles in a pair whose interaction should be excluded. Parameters ---------- index : int the index of the exclusion for which to set particle indices particle1 : int the index of the first particle in the pair particle2 : int the index of the second particle in the pair """ return _openmm.CustomNonbondedForce_setExclusionParticles(self, index, particle1, particle2) def createExclusionsFromBonds(self, bonds, bondCutoff): """ createExclusionsFromBonds(self, bonds, bondCutoff) Identify exclusions based on the molecular topology. Particles which are separated by up to a specified number of bonds are added as exclusions. Parameters ---------- bonds : vector< std::pair< int, int > > the set of bonds based on which to construct exclusions. Each element specifies the indices of two particles that are bonded to each other. bondCutoff : int pairs of particles that are separated by this many bonds or fewer are added to the list of exclusions """ return _openmm.CustomNonbondedForce_createExclusionsFromBonds(self, bonds, bondCutoff) def addTabulatedFunction(self, name, function): """ addTabulatedFunction(self, name, function) -> int Add a tabulated function that may appear in the energy expression. Parameters ---------- name : string the name of the function as it appears in expressions function : TabulatedFunction * a TabulatedFunction object defining the function. The TabulatedFunction should have been created on the heap with the "new" operator. The Force takes over ownership of it, and deletes it when the Force itself is deleted. Returns ------- int the index of the function that was added """ if not function.thisown: s = ("the %s object does not own its corresponding OpenMM object" % self.__class__.__name__) raise Exception(s) val = _openmm.CustomNonbondedForce_addTabulatedFunction(self, name, function) function.thisown=0 return val def getTabulatedFunction(self, *args): """ getTabulatedFunction(self, index) -> TabulatedFunction getTabulatedFunction(self, index) -> TabulatedFunction Get a reference to a tabulated function that may appear in the energy expression. Parameters ---------- index : int the index of the function to get Returns ------- TabulatedFunction the TabulatedFunction object defining the function """ return _openmm.CustomNonbondedForce_getTabulatedFunction(self, *args) def getTabulatedFunctionName(self, index): """ getTabulatedFunctionName(self, index) -> std::string const & Get the name of a tabulated function that may appear in the energy expression. Parameters ---------- index : int the index of the function to get Returns ------- string the name of the function as it appears in expressions """ return _openmm.CustomNonbondedForce_getTabulatedFunctionName(self, index) def addFunction(self, name, values, min, max): """ addFunction(self, name, values, min, max) -> int Add a tabulated function that may appear in the energy expression. @deprecated This method exists only for backward compatibility. Use addTabulatedFunction() instead. """ return _openmm.CustomNonbondedForce_addFunction(self, name, values, min, max) def getFunctionParameters(self, index): """ getFunctionParameters(self, index) Get the parameters for a tabulated function that may appear in the energy expression. @deprecated This method exists only for backward compatibility. Use getTabulatedFunctionParameters() instead. If the specified function is not a Continuous1DFunction, this throws an exception. """ return _openmm.CustomNonbondedForce_getFunctionParameters(self, index) def setFunctionParameters(self, index, name, values, min, max): """ setFunctionParameters(self, index, name, values, min, max) Set the parameters for a tabulated function that may appear in the energy expression. @deprecated This method exists only for backward compatibility. Use setTabulatedFunctionParameters() instead. If the specified function is not a Continuous1DFunction, this throws an exception. """ return _openmm.CustomNonbondedForce_setFunctionParameters(self, index, name, values, min, max) def addInteractionGroup(self, set1, set2): """ addInteractionGroup(self, set1, set2) -> int Add an interaction group. An interaction will be computed between every particle in set1 and every particle in set2. Parameters ---------- set1 : set< int > the first set of particles forming the interaction group set2 : set< int > the second set of particles forming the interaction group Returns ------- int the index of the interaction group that was added """ set1 = list(set1) set2 = list(set2) return _openmm.CustomNonbondedForce_addInteractionGroup(self, set1, set2) def getInteractionGroupParameters(self, index): """ getInteractionGroupParameters(self, index) Get the parameters for an interaction group. Parameters ---------- index : int the index of the interaction group for which to get parameters Returns ------- set1 : set< int > the first set of particles forming the interaction group set2 : set< int > the second set of particles forming the interaction group """ return _openmm.CustomNonbondedForce_getInteractionGroupParameters(self, index) def setInteractionGroupParameters(self, index, set1, set2): """ setInteractionGroupParameters(self, index, set1, set2) Set the parameters for an interaction group. Parameters ---------- index : int the index of the interaction group for which to set parameters set1 : set< int > the first set of particles forming the interaction group set2 : set< int > the second set of particles forming the interaction group """ set1 = list(set1) set2 = list(set2) return _openmm.CustomNonbondedForce_setInteractionGroupParameters(self, index, set1, set2) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the per-particle parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setParticleParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. This method has several limitations. The only information it updates is the values of per-particle parameters. All other aspects of the Force (the energy function, nonbonded method, cutoff distance, etc.) are unaffected and can only be changed by reinitializing the Context. Also, this method cannot be used to add new particles, only to change the parameters of existing ones. """ return _openmm.CustomNonbondedForce_updateParametersInContext(self, context) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if force uses PBC and false otherwise """ return _openmm.CustomNonbondedForce_usesPeriodicBoundaryConditions(self) CustomNonbondedForce_swigregister = _openmm.CustomNonbondedForce_swigregister CustomNonbondedForce_swigregister(CustomNonbondedForce) class AmoebaTorsionTorsionForce(Force): """ This class implements the Amoeba torsion-torsion interaction. To use it, create an AmoebaTorsionTorsionForce object then call addTorsionTorsion() once for each torsion-torsion. After a torsion-torsion has been added, you can modify its force field parameters by calling setTorsionTorsionParameters(). """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, AmoebaTorsionTorsionForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, AmoebaTorsionTorsionForce, name) __repr__ = _swig_repr def getNumTorsionTorsions(self): """ getNumTorsionTorsions(self) -> int Get the number of torsion-torsion terms in the potential function """ return _openmm.AmoebaTorsionTorsionForce_getNumTorsionTorsions(self) def getNumTorsionTorsionGrids(self): """ getNumTorsionTorsionGrids(self) -> int Get the number of torsion-torsion grids """ return _openmm.AmoebaTorsionTorsionForce_getNumTorsionTorsionGrids(self) def addTorsionTorsion(self, particle1, particle2, particle3, particle4, particle5, chiralCheckAtomIndex, gridIndex): """ addTorsionTorsion(self, particle1, particle2, particle3, particle4, particle5, chiralCheckAtomIndex, gridIndex) -> int Add a torsion-torsion term to the force field. Parameters ---------- particle1 : int the index of the first particle connected by the torsion-torsion particle2 : int the index of the second particle connected by the torsion-torsion particle3 : int the index of the third particle connected by the torsion-torsion particle4 : int the index of the fourth particle connected by the torsion-torsion particle5 : int the index of the fifth particle connected by the torsion-torsion chiralCheckAtomIndex : int the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check gridIndex : int the index to the grid to be used Returns ------- int the index of the torsion-torsion that was added """ return _openmm.AmoebaTorsionTorsionForce_addTorsionTorsion(self, particle1, particle2, particle3, particle4, particle5, chiralCheckAtomIndex, gridIndex) def getTorsionTorsionParameters(self, index): """ getTorsionTorsionParameters(self, index) Get the force field parameters for a torsion-torsion term. Parameters ---------- index : int the index of the torsion-torsion for which to get parameters Returns ------- particle1 : int the index of the first particle connected by the torsion-torsion particle2 : int the index of the second particle connected by the torsion-torsion particle3 : int the index of the third particle connected by the torsion-torsion particle4 : int the index of the fourth particle connected by the torsion-torsion particle5 : int the index of the fifth particle connected by the torsion-torsion chiralCheckAtomIndex : int the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check gridIndex : int the grid index """ return _openmm.AmoebaTorsionTorsionForce_getTorsionTorsionParameters(self, index) def setTorsionTorsionParameters(self, index, particle1, particle2, particle3, particle4, particle5, chiralCheckAtomIndex, gridIndex): """ setTorsionTorsionParameters(self, index, particle1, particle2, particle3, particle4, particle5, chiralCheckAtomIndex, gridIndex) Set the force field parameters for a torsion-torsion term. Parameters ---------- index : int the index of the torsion-torsion for which to set parameters particle1 : int the index of the first particle connected by the torsion-torsion particle2 : int the index of the second particle connected by the torsion-torsion particle3 : int the index of the third particle connected by the torsion-torsion particle4 : int the index of the fourth particle connected by the torsion-torsion particle5 : int the index of the fifth particle connected by the torsion-torsion chiralCheckAtomIndex : int the index of the particle connected to particle3, but not particle2 or particle4 to be used in chirality check gridIndex : int the grid index """ return _openmm.AmoebaTorsionTorsionForce_setTorsionTorsionParameters(self, index, particle1, particle2, particle3, particle4, particle5, chiralCheckAtomIndex, gridIndex) def getTorsionTorsionGrid(self, index): """ getTorsionTorsionGrid(self, index) -> vectorddd Get the torsion-torsion grid at the specified index Parameters ---------- index : int the grid index Returns ------- vector< std::vector< std::vector< double > > > grid return grid reference """ return _openmm.AmoebaTorsionTorsionForce_getTorsionTorsionGrid(self, index) def setTorsionTorsionGrid(self, index, grid): """ setTorsionTorsionGrid(self, index, grid) Set the torsion-torsion grid at the specified index Parameters ---------- index : int the index of the torsion-torsion for which to get parameters grid : vector< std::vector< std::vector< double > > > either 3 or 6 values may be specified per grid point. If the derivatives are omitted, they are calculated automatically by fitting a 2D spline to the energies. grid[x][y][0] = x value grid[x][y][1] = y value grid[x][y][2] = energy grid[x][y][3] = dEdx value grid[x][y][4] = dEdy value grid[x][y][5] = dEd(xy) value """ def deunitize_grid(grid): if isinstance(grid, tuple): grid = list(grid) for i, row in enumerate(grid): if isinstance(row, tuple): row = list(row) grid[i] = row for i, column in enumerate(row): if isinstance(column, tuple): column = list(column) row[i] = column # Data is angle, angle, energy, de/dang1, de/dang2, d^2e/dang1dang2 if unit.is_quantity(column[0]): column[0] = column[0].value_in_unit(unit.degree) if unit.is_quantity(column[1]): column[1] = column[1].value_in_unit(unit.degree) if unit.is_quantity(column[2]): column[2] = column[2].value_in_unit(unit.kilojoule_per_mole) if len(column) > 3 and unit.is_quantity(column[3]): column[3] = column[3].value_in_unit(unit.kilojoule_per_mole/unit.radians) if len(column) > 4 and unit.is_quantity(column[4]): column[4] = column[4].value_in_unit(unit.kilojoule_per_mole/unit.radians) if len(column) > 5 and unit.is_quantity(column[5]): column[5] = column[5].value_in_unit(unit.kilojoule_per_mole/unit.radians**2) return grid try: grid = copy.deepcopy(args[1]) if isinstance(args, tuple): args = list(args) except (NameError, UnboundLocalError): try: # Support numpy arrays grid = grid.tolist() except AttributeError: grid = copy.deepcopy(grid) grid = deunitize_grid(grid) else: args[1] = deunitize_grid(grid) return _openmm.AmoebaTorsionTorsionForce_setTorsionTorsionGrid(self, index, grid) def setUsesPeriodicBoundaryConditions(self, periodic): """ setUsesPeriodicBoundaryConditions(self, periodic) Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful. """ return _openmm.AmoebaTorsionTorsionForce_setUsesPeriodicBoundaryConditions(self, periodic) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if force uses PBC and false otherwise """ return _openmm.AmoebaTorsionTorsionForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self) -> AmoebaTorsionTorsionForce __init__(self, other) -> AmoebaTorsionTorsionForce Create an AmoebaTorsionTorsionForce. """ this = _openmm.new_AmoebaTorsionTorsionForce(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_AmoebaTorsionTorsionForce __del__ = lambda self: None AmoebaTorsionTorsionForce_swigregister = _openmm.AmoebaTorsionTorsionForce_swigregister AmoebaTorsionTorsionForce_swigregister(AmoebaTorsionTorsionForce) class AmoebaMultipoleForce(Force): """ This class implements the Amoeba multipole interaction. To use it, create an AmoebaMultipoleForce object then call addMultipole() once for each atom. After an entry has been added, you can modify its force field parameters by calling setMultipoleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext(). """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, AmoebaMultipoleForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, AmoebaMultipoleForce, name) __repr__ = _swig_repr NoCutoff = _openmm.AmoebaMultipoleForce_NoCutoff PME = _openmm.AmoebaMultipoleForce_PME Mutual = _openmm.AmoebaMultipoleForce_Mutual Direct = _openmm.AmoebaMultipoleForce_Direct Extrapolated = _openmm.AmoebaMultipoleForce_Extrapolated ZThenX = _openmm.AmoebaMultipoleForce_ZThenX Bisector = _openmm.AmoebaMultipoleForce_Bisector ZBisect = _openmm.AmoebaMultipoleForce_ZBisect ThreeFold = _openmm.AmoebaMultipoleForce_ThreeFold ZOnly = _openmm.AmoebaMultipoleForce_ZOnly NoAxisType = _openmm.AmoebaMultipoleForce_NoAxisType LastAxisTypeIndex = _openmm.AmoebaMultipoleForce_LastAxisTypeIndex Covalent12 = _openmm.AmoebaMultipoleForce_Covalent12 Covalent13 = _openmm.AmoebaMultipoleForce_Covalent13 Covalent14 = _openmm.AmoebaMultipoleForce_Covalent14 Covalent15 = _openmm.AmoebaMultipoleForce_Covalent15 PolarizationCovalent11 = _openmm.AmoebaMultipoleForce_PolarizationCovalent11 PolarizationCovalent12 = _openmm.AmoebaMultipoleForce_PolarizationCovalent12 PolarizationCovalent13 = _openmm.AmoebaMultipoleForce_PolarizationCovalent13 PolarizationCovalent14 = _openmm.AmoebaMultipoleForce_PolarizationCovalent14 CovalentEnd = _openmm.AmoebaMultipoleForce_CovalentEnd def getNumMultipoles(self): """ getNumMultipoles(self) -> int Get the number of particles in the potential function """ return _openmm.AmoebaMultipoleForce_getNumMultipoles(self) def getNonbondedMethod(self): """ getNonbondedMethod(self) -> OpenMM::AmoebaMultipoleForce::NonbondedMethod Get the method used for handling long-range nonbonded interactions. """ return _openmm.AmoebaMultipoleForce_getNonbondedMethod(self) def setNonbondedMethod(self, method): """ setNonbondedMethod(self, method) Set the method used for handling long-range nonbonded interactions. """ return _openmm.AmoebaMultipoleForce_setNonbondedMethod(self, method) def getPolarizationType(self): """ getPolarizationType(self) -> OpenMM::AmoebaMultipoleForce::PolarizationType Get polarization type """ return _openmm.AmoebaMultipoleForce_getPolarizationType(self) def setPolarizationType(self, type): """ setPolarizationType(self, type) Set the polarization type """ return _openmm.AmoebaMultipoleForce_setPolarizationType(self, type) def getCutoffDistance(self): """ getCutoffDistance(self) -> double Get the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect. Returns ------- double the cutoff distance, measured in nm """ val = _openmm.AmoebaMultipoleForce_getCutoffDistance(self) val=unit.Quantity(val, unit.nanometer) return val def setCutoffDistance(self, distance): """ setCutoffDistance(self, distance) Set the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect. Parameters ---------- distance : double the cutoff distance, measured in nm """ return _openmm.AmoebaMultipoleForce_setCutoffDistance(self, distance) def getPMEParameters(self): """ getPMEParameters(self) Get the parameters to use for PME calculations. If alpha is 0 (the default), these parameters are ignored and instead their values are chosen based on the Ewald error tolerance. Returns ------- alpha : double the separation parameter nx : int the number of grid points along the X axis ny : int the number of grid points along the Y axis nz : int the number of grid points along the Z axis """ return _openmm.AmoebaMultipoleForce_getPMEParameters(self) def setPMEParameters(self, alpha, nx, ny, nz): """ setPMEParameters(self, alpha, nx, ny, nz) Set the parameters to use for PME calculations. If alpha is 0 (the default), these parameters are ignored and instead their values are chosen based on the Ewald error tolerance. Parameters ---------- alpha : double the separation parameter nx : int the number of grid points along the X axis ny : int the number of grid points along the Y axis nz : int the number of grid points along the Z axis """ return _openmm.AmoebaMultipoleForce_setPMEParameters(self, alpha, nx, ny, nz) def getAEwald(self): """ getAEwald(self) -> double Get the Ewald alpha parameter. If this is 0 (the default), a value is chosen automatically based on the Ewald error tolerance. @deprecated This method exists only for backward compatibility. Use getPMEParameters() instead. Returns ------- double the Ewald alpha parameter """ val = _openmm.AmoebaMultipoleForce_getAEwald(self) val=unit.Quantity(val, 1/unit.nanometer) return val def setAEwald(self, aewald): """ setAEwald(self, aewald) Set the Ewald alpha parameter. If this is 0 (the default), a value is chosen automatically based on the Ewald error tolerance. @deprecated This method exists only for backward compatibility. Use setPMEParameters() instead. Parameters ---------- aewald : double alpha parameter """ return _openmm.AmoebaMultipoleForce_setAEwald(self, aewald) def getPmeBSplineOrder(self): """ getPmeBSplineOrder(self) -> int Get the B-spline order to use for PME charge spreading Returns ------- int the B-spline order """ return _openmm.AmoebaMultipoleForce_getPmeBSplineOrder(self) def getPmeGridDimensions(self): """ getPmeGridDimensions(self) Get the PME grid dimensions. If Ewald alpha is 0 (the default), this is ignored and grid dimensions are chosen automatically based on the Ewald error tolerance. @deprecated This method exists only for backward compatibility. Use getPMEParameters() instead. Returns ------- void the PME grid dimensions """ return _openmm.AmoebaMultipoleForce_getPmeGridDimensions(self) def setPmeGridDimensions(self, gridDimension): """ setPmeGridDimensions(self, gridDimension) Set the PME grid dimensions. If Ewald alpha is 0 (the default), this is ignored and grid dimensions are chosen automatically based on the Ewald error tolerance. @deprecated This method exists only for backward compatibility. Use setPMEParameters() instead. Parameters ---------- gridDimension : vector< int > the PME grid dimensions """ return _openmm.AmoebaMultipoleForce_setPmeGridDimensions(self, gridDimension) def getPMEParametersInContext(self, context): """ getPMEParametersInContext(self, context) Get the parameters being used for PME in a particular Context. Because some platforms have restrictions on the allowed grid sizes, the values that are actually used may be slightly different from those specified with setPmeGridDimensions(), or the standard values calculated based on the Ewald error tolerance. See the manual for details. Parameters ---------- context : Context the Context for which to get the parameters Returns ------- alpha : double the separation parameter nx : int the number of grid points along the X axis ny : int the number of grid points along the Y axis nz : int the number of grid points along the Z axis """ return _openmm.AmoebaMultipoleForce_getPMEParametersInContext(self, context) def addMultipole(self, charge, molecularDipole, molecularQuadrupole, axisType, multipoleAtomZ, multipoleAtomX, multipoleAtomY, thole, dampingFactor, polarity): """ addMultipole(self, charge, molecularDipole, molecularQuadrupole, axisType, multipoleAtomZ, multipoleAtomX, multipoleAtomY, thole, dampingFactor, polarity) -> int Add multipole-related info for a particle Parameters ---------- charge : double the particle's charge molecularDipole : vector< double > the particle's molecular dipole (vector of size 3) molecularQuadrupole : vector< double > the particle's molecular quadrupole (vector of size 9) axisType : int the particle's axis type multipoleAtomZ : int index of first atom used in constructing lab<->molecular frames multipoleAtomX : int index of second atom used in constructing lab<->molecular frames multipoleAtomY : int index of second atom used in constructing lab<->molecular frames thole : double Thole parameter dampingFactor : double dampingFactor parameter polarity : double polarity parameter Returns ------- int the index of the particle that was added """ return _openmm.AmoebaMultipoleForce_addMultipole(self, charge, molecularDipole, molecularQuadrupole, axisType, multipoleAtomZ, multipoleAtomX, multipoleAtomY, thole, dampingFactor, polarity) def getMultipoleParameters(self, index): """ getMultipoleParameters(self, index) Get the multipole parameters for a particle. Parameters ---------- index : int the index of the atom for which to get parameters Returns ------- charge : double the particle's charge molecularDipole : vector< double > the particle's molecular dipole (vector of size 3) molecularQuadrupole : vector< double > the particle's molecular quadrupole (vector of size 9) axisType : int the particle's axis type multipoleAtomZ : int index of first atom used in constructing lab<->molecular frames multipoleAtomX : int index of second atom used in constructing lab<->molecular frames multipoleAtomY : int index of second atom used in constructing lab<->molecular frames thole : double Thole parameter dampingFactor : double dampingFactor parameter polarity : double polarity parameter """ val = _openmm.AmoebaMultipoleForce_getMultipoleParameters(self, index) val[0]=unit.Quantity(val[0], unit.elementary_charge) val[1]=unit.Quantity(val[1], unit.elementary_charge*unit.nanometer) val[2]=unit.Quantity(val[2], unit.elementary_charge*unit.nanometer**2) val[9]=unit.Quantity(val[9], unit.nanometer**3) return val def setMultipoleParameters(self, index, charge, molecularDipole, molecularQuadrupole, axisType, multipoleAtomZ, multipoleAtomX, multipoleAtomY, thole, dampingFactor, polarity): """ setMultipoleParameters(self, index, charge, molecularDipole, molecularQuadrupole, axisType, multipoleAtomZ, multipoleAtomX, multipoleAtomY, thole, dampingFactor, polarity) Set the multipole parameters for a particle. Parameters ---------- index : int the index of the atom for which to set parameters charge : double the particle's charge molecularDipole : vector< double > the particle's molecular dipole (vector of size 3) molecularQuadrupole : vector< double > the particle's molecular quadrupole (vector of size 9) axisType : int the particle's axis type multipoleAtomZ : int index of first atom used in constructing lab<->molecular frames multipoleAtomX : int index of second atom used in constructing lab<->molecular frames multipoleAtomY : int index of second atom used in constructing lab<->molecular frames thole : double thole parameter dampingFactor : double damping factor parameter polarity : double polarity parameter """ return _openmm.AmoebaMultipoleForce_setMultipoleParameters(self, index, charge, molecularDipole, molecularQuadrupole, axisType, multipoleAtomZ, multipoleAtomX, multipoleAtomY, thole, dampingFactor, polarity) def setCovalentMap(self, index, typeId, covalentAtoms): """ setCovalentMap(self, index, typeId, covalentAtoms) Set the CovalentMap for an atom Parameters ---------- index : int the index of the atom for which to set parameters typeId : CovalentType CovalentTypes type covalentAtoms : vector< int > vector of covalent atoms associated w/ the specfied CovalentType """ return _openmm.AmoebaMultipoleForce_setCovalentMap(self, index, typeId, covalentAtoms) def getCovalentMap(self, index, typeId): """ getCovalentMap(self, index, typeId) Get the CovalentMap for an atom Parameters ---------- index : int the index of the atom for which to set parameters typeId : CovalentType CovalentTypes type Returns ------- covalentAtoms : vector< int > output vector of covalent atoms associated w/ the specfied CovalentType """ return _openmm.AmoebaMultipoleForce_getCovalentMap(self, index, typeId) def getCovalentMaps(self, index): """ getCovalentMaps(self, index) Get the CovalentMap for an atom Parameters ---------- index : int the index of the atom for which to set parameters Returns ------- covalentLists : vector< std::vector< int > > output vector of covalent lists of atoms """ return _openmm.AmoebaMultipoleForce_getCovalentMaps(self, index) def getMutualInducedMaxIterations(self): """ getMutualInducedMaxIterations(self) -> int Get the max number of iterations to be used in calculating the mutual induced dipoles Returns ------- int max number of iterations """ return _openmm.AmoebaMultipoleForce_getMutualInducedMaxIterations(self) def setMutualInducedMaxIterations(self, inputMutualInducedMaxIterations): """ setMutualInducedMaxIterations(self, inputMutualInducedMaxIterations) Set the max number of iterations to be used in calculating the mutual induced dipoles Parameters ---------- inputMutualInducedMaxIterations : int number of iterations """ return _openmm.AmoebaMultipoleForce_setMutualInducedMaxIterations(self, inputMutualInducedMaxIterations) def getMutualInducedTargetEpsilon(self): """ getMutualInducedTargetEpsilon(self) -> double Get the target epsilon to be used to test for convergence of iterative method used in calculating the mutual induced dipoles Returns ------- double target epsilon """ return _openmm.AmoebaMultipoleForce_getMutualInducedTargetEpsilon(self) def setMutualInducedTargetEpsilon(self, inputMutualInducedTargetEpsilon): """ setMutualInducedTargetEpsilon(self, inputMutualInducedTargetEpsilon) Set the target epsilon to be used to test for convergence of iterative method used in calculating the mutual induced dipoles Parameters ---------- inputMutualInducedTargetEpsilon : double target epsilon """ return _openmm.AmoebaMultipoleForce_setMutualInducedTargetEpsilon(self, inputMutualInducedTargetEpsilon) def setExtrapolationCoefficients(self, coefficients): """ setExtrapolationCoefficients(self, coefficients) Set the coefficients for the mu_0, mu_1, mu_2, ..., mu_n terms in the extrapolation algorithm for induced dipoles. Parameters ---------- coefficients : vector< double > a vector whose mth entry specifies the coefficient for mu_m. The length of this vector determines how many iterations are performed. """ return _openmm.AmoebaMultipoleForce_setExtrapolationCoefficients(self, coefficients) def getExtrapolationCoefficients(self): """ getExtrapolationCoefficients(self) -> vectord Get the coefficients for the mu_0, mu_1, mu_2, ..., mu_n terms in the extrapolation algorithm for induced dipoles. In this release, the default values for the coefficients are [-0.154, 0.017, 0.658, 0.474], but be aware that those may change in a future release. """ return _openmm.AmoebaMultipoleForce_getExtrapolationCoefficients(self) def getEwaldErrorTolerance(self): """ getEwaldErrorTolerance(self) -> double Get the error tolerance for Ewald summation. This corresponds to the fractional error in the forces which is acceptable. This value is used to select the grid dimensions and separation (alpha) parameter so that the average error level will be less than the tolerance. There is not a rigorous guarantee that all forces on all atoms will be less than the tolerance, however. This can be overridden by explicitly setting an alpha parameter and grid dimensions to use. """ return _openmm.AmoebaMultipoleForce_getEwaldErrorTolerance(self) def setEwaldErrorTolerance(self, tol): """ setEwaldErrorTolerance(self, tol) Get the error tolerance for Ewald summation. This corresponds to the fractional error in the forces which is acceptable. This value is used to select the grid dimensions and separation (alpha) parameter so that the average error level will be less than the tolerance. There is not a rigorous guarantee that all forces on all atoms will be less than the tolerance, however. This can be overridden by explicitly setting an alpha parameter and grid dimensions to use. """ return _openmm.AmoebaMultipoleForce_setEwaldErrorTolerance(self, tol) def getLabFramePermanentDipoles(self, context): """ getLabFramePermanentDipoles(self, context) Get the fixed dipole moments of all particles in the global reference frame. Parameters ---------- context : Context the Context for which to get the fixed dipoles Returns ------- dipoles : vector< Vec3 > the fixed dipole moment of particle i is stored into the i'th element """ return _openmm.AmoebaMultipoleForce_getLabFramePermanentDipoles(self, context) def getInducedDipoles(self, context): """ getInducedDipoles(self, context) Get the induced dipole moments of all particles. Parameters ---------- context : Context the Context for which to get the induced dipoles Returns ------- dipoles : vector< Vec3 > the induced dipole moment of particle i is stored into the i'th element """ return _openmm.AmoebaMultipoleForce_getInducedDipoles(self, context) def getTotalDipoles(self, context): """ getTotalDipoles(self, context) Get the total dipole moments (fixed plus induced) of all particles. Parameters ---------- context : Context the Context for which to get the total dipoles Returns ------- dipoles : vector< Vec3 > the total dipole moment of particle i is stored into the i'th element """ return _openmm.AmoebaMultipoleForce_getTotalDipoles(self, context) def getElectrostaticPotential(self, inputGrid, context): """ getElectrostaticPotential(self, inputGrid, context) Get the electrostatic potential. Parameters ---------- inputGrid : vector< Vec3 > input grid points over which the potential is to be evaluated context : Context context Returns ------- outputElectrostaticPotential : vector< double > output potential """ return _openmm.AmoebaMultipoleForce_getElectrostaticPotential(self, inputGrid, context) def getSystemMultipoleMoments(self, context): """ getSystemMultipoleMoments(self, context) Get the system multipole moments. This method is most useful for non-periodic systems. When called for a periodic system, only the <i>lowest nonvanishing moment</i> has a well defined value. This means that if the system has a net nonzero charge, the dipole and quadrupole moments are not well defined and should be ignored. If the net charge is zero, the dipole moment is well defined (and really represents a dipole density), but the quadrupole moment is still undefined and should be ignored. Parameters ---------- context : Context context Returns ------- outputMultipoleMoments : vector< double > (charge, dipole_x, dipole_y, dipole_z, quadrupole_xx, quadrupole_xy, quadrupole_xz, quadrupole_yx, quadrupole_yy, quadrupole_yz, quadrupole_zx, quadrupole_zy, quadrupole_zz) """ return _openmm.AmoebaMultipoleForce_getSystemMultipoleMoments(self, context) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the multipole parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setMultipoleParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. This method has several limitations. The only information it updates is the parameters of multipoles. All other aspects of the Force (the nonbonded method, the cutoff distance, etc.) are unaffected and can only be changed by reinitializing the Context. Furthermore, this method cannot be used to add new multipoles, only to change the parameters of existing ones. """ return _openmm.AmoebaMultipoleForce_updateParametersInContext(self, context) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if nonbondedMethod uses PBC and false otherwise """ return _openmm.AmoebaMultipoleForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self) -> AmoebaMultipoleForce __init__(self, other) -> AmoebaMultipoleForce Create an AmoebaMultipoleForce. """ this = _openmm.new_AmoebaMultipoleForce(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_AmoebaMultipoleForce __del__ = lambda self: None AmoebaMultipoleForce_swigregister = _openmm.AmoebaMultipoleForce_swigregister AmoebaMultipoleForce_swigregister(AmoebaMultipoleForce) class AmoebaPiTorsionForce(Force): """ This class implements the Amoeba pi-torsion interaction. To use it, create an AmoebaPiTorsionForce object then call addPiTorsion() once for each torsion. After a torsion has been added, you can modify its force field parameters by calling setPiTorsionParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext(). """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, AmoebaPiTorsionForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, AmoebaPiTorsionForce, name) __repr__ = _swig_repr def getNumPiTorsions(self): """ getNumPiTorsions(self) -> int Get the number of pi torsion terms in the potential function """ return _openmm.AmoebaPiTorsionForce_getNumPiTorsions(self) def addPiTorsion(self, particle1, particle2, particle3, particle4, particle5, particle6, k): """ addPiTorsion(self, particle1, particle2, particle3, particle4, particle5, particle6, k) -> int Add a torsion term to the force field. Parameters ---------- particle1 : int the index of the first particle connected by the torsion particle2 : int the index of the second particle connected by the torsion particle3 : int the index of the third particle connected by the torsion particle4 : int the index of the fourth particle connected by the torsion particle5 : int the index of the fifth particle connected by the torsion particle6 : int the index of the sixth particle connected by the torsion k : double the force constant for the torsion Returns ------- int the index of the torsion that was added """ return _openmm.AmoebaPiTorsionForce_addPiTorsion(self, particle1, particle2, particle3, particle4, particle5, particle6, k) def getPiTorsionParameters(self, index): """ getPiTorsionParameters(self, index) Get the force field parameters for a torsion term. Parameters ---------- index : int the index of the torsion for which to get parameters Returns ------- particle1 : int the index of the first particle connected by the torsion particle2 : int the index of the second particle connected by the torsion particle3 : int the index of the third particle connected by the torsion particle4 : int the index of the fourth particle connected by the torsion particle5 : int the index of the fifth particle connected by the torsion particle6 : int the index of the sixth particle connected by the torsion k : double the force constant for the torsion """ val = _openmm.AmoebaPiTorsionForce_getPiTorsionParameters(self, index) val[6]=unit.Quantity(val[6], unit.kilojoule_per_mole) return val def setPiTorsionParameters(self, index, particle1, particle2, particle3, particle4, particle5, particle6, k): """ setPiTorsionParameters(self, index, particle1, particle2, particle3, particle4, particle5, particle6, k) Set the force field parameters for a pi torsion term. Parameters ---------- index : int the index of the torsion for which to set parameters particle1 : int the index of the first particle connected by the torsion particle2 : int the index of the second particle connected by the torsion particle3 : int the index of the third particle connected by the torsion particle4 : int the index of the fourth particle connected by the torsion particle5 : int the index of the fifth particle connected by the torsion particle6 : int the index of the sixth particle connected by the torsion k : double the force constant for the torsion """ return _openmm.AmoebaPiTorsionForce_setPiTorsionParameters(self, index, particle1, particle2, particle3, particle4, particle5, particle6, k) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the per-torsion parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setPiTorsionParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. The only information this method updates is the values of per-torsion parameters. The set of particles involved in a torsion cannot be changed, nor can new torsions be added. """ return _openmm.AmoebaPiTorsionForce_updateParametersInContext(self, context) def setUsesPeriodicBoundaryConditions(self, periodic): """ setUsesPeriodicBoundaryConditions(self, periodic) Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful. """ return _openmm.AmoebaPiTorsionForce_setUsesPeriodicBoundaryConditions(self, periodic) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if force uses PBC and false otherwise """ return _openmm.AmoebaPiTorsionForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self) -> AmoebaPiTorsionForce __init__(self, other) -> AmoebaPiTorsionForce Create an AmoebaPiTorsionForce. """ this = _openmm.new_AmoebaPiTorsionForce(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_AmoebaPiTorsionForce __del__ = lambda self: None AmoebaPiTorsionForce_swigregister = _openmm.AmoebaPiTorsionForce_swigregister AmoebaPiTorsionForce_swigregister(AmoebaPiTorsionForce) class CustomCompoundBondForce(Force): """ This class supports a wide variety of bonded interactions. It defines a "bond" as a single energy term that depends on the positions of a fixed set of particles. The number of particles involved in a bond, and how the energy depends on their positions, is configurable. It may depend on the positions of individual particles, the distances between pairs of particles, the angles formed by sets of three particles, and the dihedral angles formed by sets of four particles. We refer to the particles in a bond as p1, p2, p3, etc. For each bond, CustomCompoundBondForce evaluates a user supplied algebraic expression to determine the interaction energy. The expression may depend on the following variables and functions: - x1, y1, z1, x2, y2, z2, etc.: The x, y, and z coordinates of the particle positions. For example, x1 is the x coordinate of particle p1, and y3 is the y coordinate of particle p3. - distance(p1, p2): the distance between particles p1 and p2 (where "p1" and "p2" may be replaced by the names of whichever particles you want to calculate the distance between). - angle(p1, p2, p3): the angle formed by the three specified particles. - dihedral(p1, p2, p3, p4): the dihedral angle formed by the four specified particles, guaranteed to be in the range [-pi,+pi]. The expression also may involve tabulated functions, and may depend on arbitrary global and per-bond parameters. To use this class, create a CustomCompoundBondForce object, passing an algebraic expression to the constructor that defines the interaction energy of each bond. Then call addPerBondParameter() to define per-bond parameters and addGlobalParameter() to define global parameters. The values of per-bond parameters are specified as part of the system definition, while values of global parameters may be modified during a simulation by calling Context::setParameter(). Next, call addBond() to define bonds and specify their parameter values. After a bond has been added, you can modify its parameters by calling setBondParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext(). As an example, the following code creates a CustomCompoundBondForce that implements a Urey-Bradley potential. This is an interaction between three particles that depends on the angle formed by p1-p2-p3, and on the distance between p1 and p3. <tt>CustomCompoundBondForce* force = new CustomCompoundBondForce(3, "0.5*(kangle*(angle(p1,p2,p3)-theta0)^2+kbond*(distance(p1,p3)-r0)^2)");</tt> This force depends on four parameters: kangle, kbond, theta0, and r0. The following code defines these as per-bond parameters: <tt><pre> force->addPerBondParameter("kangle"); force->addPerBondParameter("kbond"); force->addPerBondParameter("theta0"); force->addPerBondParameter("r0"); </pre></tt> This class also has the ability to compute derivatives of the potential energy with respect to global parameters. Call addEnergyParameterDerivative() to request that the derivative with respect to a particular parameter be computed. You can then query its value in a Context by calling getState() on it. Expressions may involve the operators + (add), - (subtract), * (multiply), / (divide), and ^ (power), and the following functions: sqrt, exp, log, sin, cos, sec, csc, tan, cot, asin, acos, atan, sinh, cosh, tanh, erf, erfc, min, max, abs, floor, ceil, step, delta, select. All trigonometric functions are defined in radians, and log is the natural logarithm. step(x) = 0 if x is less than 0, 1 otherwise. delta(x) = 1 if x is 0, 0 otherwise. select(x,y,z) = z if x = 0, y otherwise. In addition, you can call addTabulatedFunction() to define a new function based on tabulated values. You specify the function by creating a TabulatedFunction object. That function can then appear in the expression. """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, CustomCompoundBondForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, CustomCompoundBondForce, name) __repr__ = _swig_repr __swig_destroy__ = _openmm.delete_CustomCompoundBondForce __del__ = lambda self: None def getNumParticlesPerBond(self): """ getNumParticlesPerBond(self) -> int Get the number of particles used to define each bond. """ return _openmm.CustomCompoundBondForce_getNumParticlesPerBond(self) def getNumBonds(self): """ getNumBonds(self) -> int Get the number of bonds for which force field parameters have been defined. """ return _openmm.CustomCompoundBondForce_getNumBonds(self) def getNumPerBondParameters(self): """ getNumPerBondParameters(self) -> int Get the number of per-bond parameters that the interaction depends on. """ return _openmm.CustomCompoundBondForce_getNumPerBondParameters(self) def getNumGlobalParameters(self): """ getNumGlobalParameters(self) -> int Get the number of global parameters that the interaction depends on. """ return _openmm.CustomCompoundBondForce_getNumGlobalParameters(self) def getNumEnergyParameterDerivatives(self): """ getNumEnergyParameterDerivatives(self) -> int Get the number of global parameters with respect to which the derivative of the energy should be computed. """ return _openmm.CustomCompoundBondForce_getNumEnergyParameterDerivatives(self) def getNumTabulatedFunctions(self): """ getNumTabulatedFunctions(self) -> int Get the number of tabulated functions that have been defined. """ return _openmm.CustomCompoundBondForce_getNumTabulatedFunctions(self) def getNumFunctions(self): """ getNumFunctions(self) -> int Get the number of tabulated functions that have been defined. @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead. """ return _openmm.CustomCompoundBondForce_getNumFunctions(self) def getEnergyFunction(self): """ getEnergyFunction(self) -> std::string const & Get the algebraic expression that gives the interaction energy of each bond """ return _openmm.CustomCompoundBondForce_getEnergyFunction(self) def setEnergyFunction(self, energy): """ setEnergyFunction(self, energy) Set the algebraic expression that gives the interaction energy of each bond """ return _openmm.CustomCompoundBondForce_setEnergyFunction(self, energy) def addPerBondParameter(self, name): """ addPerBondParameter(self, name) -> int Add a new per-bond parameter that the interaction may depend on. Parameters ---------- name : string the name of the parameter Returns ------- int the index of the parameter that was added """ return _openmm.CustomCompoundBondForce_addPerBondParameter(self, name) def getPerBondParameterName(self, index): """ getPerBondParameterName(self, index) -> std::string const & Get the name of a per-bond parameter. Parameters ---------- index : int the index of the parameter for which to get the name Returns ------- string the parameter name """ return _openmm.CustomCompoundBondForce_getPerBondParameterName(self, index) def setPerBondParameterName(self, index, name): """ setPerBondParameterName(self, index, name) Set the name of a per-bond parameter. Parameters ---------- index : int the index of the parameter for which to set the name name : string the name of the parameter """ return _openmm.CustomCompoundBondForce_setPerBondParameterName(self, index, name) def addGlobalParameter(self, name, defaultValue): """ addGlobalParameter(self, name, defaultValue) -> int Add a new global parameter that the interaction may depend on. The default value provided to this method is the initial value of the parameter in newly created Contexts. You can change the value at any time by calling setParameter() on the Context. Parameters ---------- name : string the name of the parameter defaultValue : double the default value of the parameter Returns ------- int the index of the parameter that was added """ return _openmm.CustomCompoundBondForce_addGlobalParameter(self, name, defaultValue) def getGlobalParameterName(self, index): """ getGlobalParameterName(self, index) -> std::string const & Get the name of a global parameter. Parameters ---------- index : int the index of the parameter for which to get the name Returns ------- string the parameter name """ return _openmm.CustomCompoundBondForce_getGlobalParameterName(self, index) def setGlobalParameterName(self, index, name): """ setGlobalParameterName(self, index, name) Set the name of a global parameter. Parameters ---------- index : int the index of the parameter for which to set the name name : string the name of the parameter """ return _openmm.CustomCompoundBondForce_setGlobalParameterName(self, index, name) def getGlobalParameterDefaultValue(self, index): """ getGlobalParameterDefaultValue(self, index) -> double Get the default value of a global parameter. Parameters ---------- index : int the index of the parameter for which to get the default value Returns ------- double the parameter default value """ return _openmm.CustomCompoundBondForce_getGlobalParameterDefaultValue(self, index) def setGlobalParameterDefaultValue(self, index, defaultValue): """ setGlobalParameterDefaultValue(self, index, defaultValue) Set the default value of a global parameter. Parameters ---------- index : int the index of the parameter for which to set the default value defaultValue : double the default value of the parameter """ return _openmm.CustomCompoundBondForce_setGlobalParameterDefaultValue(self, index, defaultValue) def addEnergyParameterDerivative(self, name): """ addEnergyParameterDerivative(self, name) Request that this Force compute the derivative of its energy with respect to a global parameter. The parameter must have already been added with addGlobalParameter(). Parameters ---------- name : string the name of the parameter """ return _openmm.CustomCompoundBondForce_addEnergyParameterDerivative(self, name) def getEnergyParameterDerivativeName(self, index): """ getEnergyParameterDerivativeName(self, index) -> std::string const & Get the name of a global parameter with respect to which this Force should compute the derivative of the energy. Parameters ---------- index : int the index of the parameter derivative, between 0 and getNumEnergyParameterDerivatives() Returns ------- string the parameter name """ return _openmm.CustomCompoundBondForce_getEnergyParameterDerivativeName(self, index) def addBond(self, *args): """ addBond(self, particles, parameters) -> int addBond(self, particles) -> int Add a bond to the force Parameters ---------- particles : vector< int > the indices of the particles the bond depends on parameters : vector< double > the list of per-bond parameter values for the new bond Returns ------- int the index of the bond that was added """ return _openmm.CustomCompoundBondForce_addBond(self, *args) def getBondParameters(self, index): """ getBondParameters(self, index) Get the properties of a bond. Parameters ---------- index : int the index of the bond to get Returns ------- particles : vector< int > the indices of the particles in the bond parameters : vector< double > the list of per-bond parameter values for the bond """ return _openmm.CustomCompoundBondForce_getBondParameters(self, index) def setBondParameters(self, *args): """ setBondParameters(self, index, particles, parameters) setBondParameters(self, index, particles) Set the properties of a bond. Parameters ---------- index : int the index of the bond to set particles : vector< int > the indices of the particles in the bond parameters : vector< double > the list of per-bond parameter values for the bond """ return _openmm.CustomCompoundBondForce_setBondParameters(self, *args) def addTabulatedFunction(self, name, function): """ addTabulatedFunction(self, name, function) -> int Add a tabulated function that may appear in the energy expression. Parameters ---------- name : string the name of the function as it appears in expressions function : TabulatedFunction * a TabulatedFunction object defining the function. The TabulatedFunction should have been created on the heap with the "new" operator. The Force takes over ownership of it, and deletes it when the Force itself is deleted. Returns ------- int the index of the function that was added """ if not function.thisown: s = ("the %s object does not own its corresponding OpenMM object" % self.__class__.__name__) raise Exception(s) val = _openmm.CustomCompoundBondForce_addTabulatedFunction(self, name, function) function.thisown=0 return val def getTabulatedFunction(self, *args): """ getTabulatedFunction(self, index) -> TabulatedFunction getTabulatedFunction(self, index) -> TabulatedFunction Get a reference to a tabulated function that may appear in the energy expression. Parameters ---------- index : int the index of the function to get Returns ------- TabulatedFunction the TabulatedFunction object defining the function """ return _openmm.CustomCompoundBondForce_getTabulatedFunction(self, *args) def getTabulatedFunctionName(self, index): """ getTabulatedFunctionName(self, index) -> std::string const & Get the name of a tabulated function that may appear in the energy expression. Parameters ---------- index : int the index of the function to get Returns ------- string the name of the function as it appears in expressions """ return _openmm.CustomCompoundBondForce_getTabulatedFunctionName(self, index) def addFunction(self, name, values, min, max): """ addFunction(self, name, values, min, max) -> int Add a tabulated function that may appear in the energy expression. @deprecated This method exists only for backward compatibility. Use addTabulatedFunction() instead. """ return _openmm.CustomCompoundBondForce_addFunction(self, name, values, min, max) def getFunctionParameters(self, index): """ getFunctionParameters(self, index) Get the parameters for a tabulated function that may appear in the energy expression. @deprecated This method exists only for backward compatibility. Use getTabulatedFunctionParameters() instead. If the specified function is not a Continuous1DFunction, this throws an exception. """ return _openmm.CustomCompoundBondForce_getFunctionParameters(self, index) def setFunctionParameters(self, index, name, values, min, max): """ setFunctionParameters(self, index, name, values, min, max) Set the parameters for a tabulated function that may appear in the energy expression. @deprecated This method exists only for backward compatibility. Use setTabulatedFunctionParameters() instead. If the specified function is not a Continuous1DFunction, this throws an exception. """ return _openmm.CustomCompoundBondForce_setFunctionParameters(self, index, name, values, min, max) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the per-bond parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setBondParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. This method has several limitations. The only information it updates is the values of per-bond parameters. All other aspects of the Force (such as the energy function) are unaffected and can only be changed by reinitializing the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added. """ return _openmm.CustomCompoundBondForce_updateParametersInContext(self, context) def setUsesPeriodicBoundaryConditions(self, periodic): """ setUsesPeriodicBoundaryConditions(self, periodic) Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful. """ return _openmm.CustomCompoundBondForce_setUsesPeriodicBoundaryConditions(self, periodic) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if force uses PBC and false otherwise """ return _openmm.CustomCompoundBondForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self, numParticles, energy) -> CustomCompoundBondForce __init__(self, other) -> CustomCompoundBondForce Create a CustomCompoundBondForce. Parameters ---------- numParticles : int the number of particles used to define each bond energy : string an algebraic expression giving the interaction energy of each bond as a function of particle positions, inter-particle distances, angles, and dihedrals, and any global and per-bond parameters """ this = _openmm.new_CustomCompoundBondForce(*args) try: self.this.append(this) except Exception: self.this = this CustomCompoundBondForce_swigregister = _openmm.CustomCompoundBondForce_swigregister CustomCompoundBondForce_swigregister(CustomCompoundBondForce) class Discrete3DFunction(TabulatedFunction): """This is a TabulatedFunction that computes a discrete three dimensional function f(x,y,z). To evaluate it, x, y, and z are each rounded to the nearest integer and the table element with those indices is returned. If any index is outside the range [0, size), the result is undefined.""" __swig_setmethods__ = {} for _s in [TabulatedFunction]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, Discrete3DFunction, name, value) __swig_getmethods__ = {} for _s in [TabulatedFunction]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, Discrete3DFunction, name) __repr__ = _swig_repr def __init__(self, xsize, ysize, zsize, values): """ __init__(self, xsize, ysize, zsize, values) -> Discrete3DFunction This is a TabulatedFunction that computes a discrete three dimensional function f(x,y,z). To evaluate it, x, y, and z are each rounded to the nearest integer and the table element with those indices is returned. If any index is outside the range [0, size), the result is undefined. """ this = _openmm.new_Discrete3DFunction(xsize, ysize, zsize, values) try: self.this.append(this) except Exception: self.this = this def getFunctionParameters(self): """getFunctionParameters(self)""" return _openmm.Discrete3DFunction_getFunctionParameters(self) def setFunctionParameters(self, xsize, ysize, zsize, values): """setFunctionParameters(self, xsize, ysize, zsize, values)""" return _openmm.Discrete3DFunction_setFunctionParameters(self, xsize, ysize, zsize, values) def Copy(self): """ Copy(self) -> Discrete3DFunction @deprecated This will be removed in a future release. """ return _openmm.Discrete3DFunction_Copy(self) __swig_destroy__ = _openmm.delete_Discrete3DFunction __del__ = lambda self: None Discrete3DFunction_swigregister = _openmm.Discrete3DFunction_swigregister Discrete3DFunction_swigregister(Discrete3DFunction) class AmoebaOutOfPlaneBendForce(Force): """ This class implements the Amoeba out-of-plane bend interaction. To use it, create an OutOfPlaneBendForce object then call addOutOfPlaneBend() once for each outOfPlaneBend. After an out-of-plane bend has been added, you can modify its force field parameters by calling setOutOfPlaneBendParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext(). """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, AmoebaOutOfPlaneBendForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, AmoebaOutOfPlaneBendForce, name) __repr__ = _swig_repr def getNumOutOfPlaneBends(self): """ getNumOutOfPlaneBends(self) -> int Get the number of out-of-plane bend terms in the potential function """ return _openmm.AmoebaOutOfPlaneBendForce_getNumOutOfPlaneBends(self) def setAmoebaGlobalOutOfPlaneBendCubic(self, cubicK): """ setAmoebaGlobalOutOfPlaneBendCubic(self, cubicK) Set the global cubic term Parameters ---------- cubicK : double the cubic force constant for the angle """ return _openmm.AmoebaOutOfPlaneBendForce_setAmoebaGlobalOutOfPlaneBendCubic(self, cubicK) def getAmoebaGlobalOutOfPlaneBendCubic(self): """ getAmoebaGlobalOutOfPlaneBendCubic(self) -> double Get the global cubic term Returns ------- double global cubicK term """ val = _openmm.AmoebaOutOfPlaneBendForce_getAmoebaGlobalOutOfPlaneBendCubic(self) val=unit.Quantity(val, 1/unit.radian) return val def setAmoebaGlobalOutOfPlaneBendQuartic(self, quarticK): """ setAmoebaGlobalOutOfPlaneBendQuartic(self, quarticK) Set the global cubic term Parameters ---------- quarticK : double the quartic force constant for the angle """ return _openmm.AmoebaOutOfPlaneBendForce_setAmoebaGlobalOutOfPlaneBendQuartic(self, quarticK) def getAmoebaGlobalOutOfPlaneBendQuartic(self): """ getAmoebaGlobalOutOfPlaneBendQuartic(self) -> double Get the global quartic term Returns ------- double global quartic term """ val = _openmm.AmoebaOutOfPlaneBendForce_getAmoebaGlobalOutOfPlaneBendQuartic(self) val=unit.Quantity(val, 1/unit.radian**2) return val def setAmoebaGlobalOutOfPlaneBendPentic(self, penticK): """ setAmoebaGlobalOutOfPlaneBendPentic(self, penticK) Set the global pentic term Parameters ---------- penticK : double the pentic force constant for the angle """ return _openmm.AmoebaOutOfPlaneBendForce_setAmoebaGlobalOutOfPlaneBendPentic(self, penticK) def getAmoebaGlobalOutOfPlaneBendPentic(self): """ getAmoebaGlobalOutOfPlaneBendPentic(self) -> double Get the global pentic term Returns ------- double global penticK term """ val = _openmm.AmoebaOutOfPlaneBendForce_getAmoebaGlobalOutOfPlaneBendPentic(self) val=unit.Quantity(val, 1/unit.radian**3) return val def setAmoebaGlobalOutOfPlaneBendSextic(self, sexticK): """ setAmoebaGlobalOutOfPlaneBendSextic(self, sexticK) Set the global sextic term Parameters ---------- sexticK : double the sextic force constant for the angle """ return _openmm.AmoebaOutOfPlaneBendForce_setAmoebaGlobalOutOfPlaneBendSextic(self, sexticK) def getAmoebaGlobalOutOfPlaneBendSextic(self): """ getAmoebaGlobalOutOfPlaneBendSextic(self) -> double Get the global sextic term Returns ------- double global sexticK term """ val = _openmm.AmoebaOutOfPlaneBendForce_getAmoebaGlobalOutOfPlaneBendSextic(self) val=unit.Quantity(val, 1/unit.radian**4) return val def addOutOfPlaneBend(self, particle1, particle2, particle3, particle4, k): """ addOutOfPlaneBend(self, particle1, particle2, particle3, particle4, k) -> int Add an out-of-plane bend term to the force field. Parameters ---------- particle1 : int the index of the first particle connected by the outOfPlaneBend particle2 : int the index of the second particle connected by the outOfPlaneBend particle3 : int the index of the third particle connected by the outOfPlaneBend particle4 : int the index of the fourth particle connected by the outOfPlaneBend k : double the force constant for the out-of-plane bend Returns ------- int the index of the out-of-plane bend that was added """ return _openmm.AmoebaOutOfPlaneBendForce_addOutOfPlaneBend(self, particle1, particle2, particle3, particle4, k) def getOutOfPlaneBendParameters(self, index): """ getOutOfPlaneBendParameters(self, index) Get the force field parameters for an out-of-plane bend term. Parameters ---------- index : int the index of the outOfPlaneBend for which to get parameters Returns ------- particle1 : int the index of the first particle connected by the outOfPlaneBend particle2 : int the index of the second particle connected by the outOfPlaneBend particle3 : int the index of the third particle connected by the outOfPlaneBend particle4 : int the index of the fourth particle connected by the outOfPlaneBend k : double the force constant for the out-of-plane bend """ val = _openmm.AmoebaOutOfPlaneBendForce_getOutOfPlaneBendParameters(self, index) val[4]=unit.Quantity(val[4], unit.kilojoule_per_mole/unit.radians**2) return val def setOutOfPlaneBendParameters(self, index, particle1, particle2, particle3, particle4, k): """ setOutOfPlaneBendParameters(self, index, particle1, particle2, particle3, particle4, k) Set the force field parameters for an out-of-plane bend term. Parameters ---------- index : int the index of the outOfPlaneBend for which to set parameters particle1 : int the index of the first particle connected by the outOfPlaneBend particle2 : int the index of the second particle connected by the outOfPlaneBend particle3 : int the index of the third particle connected by the outOfPlaneBend particle4 : int the index of the fourth particle connected by the outOfPlaneBend k : double the force constant for the out-of-plane bend """ return _openmm.AmoebaOutOfPlaneBendForce_setOutOfPlaneBendParameters(self, index, particle1, particle2, particle3, particle4, k) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the per-bend term parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setOutOfPlaneBendParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. The only information this method updates is the values of per-bend term parameters. The set of particles involved in a term cannot be changed, nor can new terms be added. """ return _openmm.AmoebaOutOfPlaneBendForce_updateParametersInContext(self, context) def setUsesPeriodicBoundaryConditions(self, periodic): """ setUsesPeriodicBoundaryConditions(self, periodic) Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful. """ return _openmm.AmoebaOutOfPlaneBendForce_setUsesPeriodicBoundaryConditions(self, periodic) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if force uses PBC and false otherwise """ return _openmm.AmoebaOutOfPlaneBendForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self) -> AmoebaOutOfPlaneBendForce __init__(self, other) -> AmoebaOutOfPlaneBendForce Create an AmoebaOutOfPlaneBendForce. """ this = _openmm.new_AmoebaOutOfPlaneBendForce(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_AmoebaOutOfPlaneBendForce __del__ = lambda self: None AmoebaOutOfPlaneBendForce_swigregister = _openmm.AmoebaOutOfPlaneBendForce_swigregister AmoebaOutOfPlaneBendForce_swigregister(AmoebaOutOfPlaneBendForce) class CustomCVForce(Force): """ This class supports energy functions that depend on collective variables. To use it, you define a set of collective variables (scalar valued functions that depend on the particle positions), and an algebraic expression for the energy as a function of the collective variables. The expression also may involve tabulated functions, and may depend on arbitrary global parameters. Each collective variable is defined by a Force object. The Force's potential energy is computed, and that becomes the value of the variable. This provides enormous flexibility in defining collective variables, especially by using custom forces. Anything that can be computed as a potential function can also be used as a collective variable. To use this class, create a CustomCVForce object, passing an algebraic expression to the constructor that defines the potential energy. Then call addCollectiveVariable() to define collective variables and addGlobalParameter() to define global parameters. The values of global parameters may be modified during a simulation by calling Context::setParameter(). This class also has the ability to compute derivatives of the potential energy with respect to global parameters. Call addEnergyParameterDerivative() to request that the derivative with respect to a particular parameter be computed. You can then query its value in a Context by calling getState() on it. Expressions may involve the operators + (add), - (subtract), * (multiply), / (divide), and ^ (power), and the following functions: sqrt, exp, log, sin, cos, sec, csc, tan, cot, asin, acos, atan, sinh, cosh, tanh, erf, erfc, min, max, abs, floor, ceil, step, delta, select. All trigonometric functions are defined in radians, and log is the natural logarithm. step(x) = 0 if x is less than 0, 1 otherwise. delta(x) = 1 if x is 0, 0 otherwise. select(x,y,z) = z if x = 0, y otherwise. In addition, you can call addTabulatedFunction() to define a new function based on tabulated values. You specify the function by creating a TabulatedFunction object. That function can then appear in the expression. """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, CustomCVForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, CustomCVForce, name) __repr__ = _swig_repr __swig_destroy__ = _openmm.delete_CustomCVForce __del__ = lambda self: None def getNumCollectiveVariables(self): """ getNumCollectiveVariables(self) -> int Get the number of collective variables that the interaction depends on. """ return _openmm.CustomCVForce_getNumCollectiveVariables(self) def getNumGlobalParameters(self): """ getNumGlobalParameters(self) -> int Get the number of global parameters that the interaction depends on. """ return _openmm.CustomCVForce_getNumGlobalParameters(self) def getNumEnergyParameterDerivatives(self): """ getNumEnergyParameterDerivatives(self) -> int Get the number of global parameters with respect to which the derivative of the energy should be computed. """ return _openmm.CustomCVForce_getNumEnergyParameterDerivatives(self) def getNumTabulatedFunctions(self): """ getNumTabulatedFunctions(self) -> int Get the number of tabulated functions that have been defined. """ return _openmm.CustomCVForce_getNumTabulatedFunctions(self) def getEnergyFunction(self): """ getEnergyFunction(self) -> std::string const & Get the algebraic expression that gives the energy of the system """ return _openmm.CustomCVForce_getEnergyFunction(self) def setEnergyFunction(self, energy): """ setEnergyFunction(self, energy) Set the algebraic expression that gives the energy of the system """ return _openmm.CustomCVForce_setEnergyFunction(self, energy) def addCollectiveVariable(self, name, variable): """ addCollectiveVariable(self, name, variable) -> int Add a collective variable that the force may depend on. The collective variable is represented by a Force object, which should have been created on the heap with the "new" operator. The CustomCVForce takes over ownership of it, and deletes the Force when the CustomCVForce itself is deleted. Parameters ---------- name : string the name of the collective variable, as it will appear in the energy expression variable : Force * the collective variable, represented by a Force object. The value of the variable is the energy computed by the Force. Returns ------- int the index within the Force of the variable that was added """ if not variable.thisown: s = ("the %s object does not own its corresponding OpenMM object" % self.__class__.__name__) raise Exception(s) val = _openmm.CustomCVForce_addCollectiveVariable(self, name, variable) variable.thisown=0 return val def getCollectiveVariableName(self, index): """ getCollectiveVariableName(self, index) -> std::string const & Get the name of a collective variable. Parameters ---------- index : int the index of the collective variable for which to get the name Returns ------- string the variable name """ return _openmm.CustomCVForce_getCollectiveVariableName(self, index) def getCollectiveVariable(self, *args): """ getCollectiveVariable(self, index) -> Force getCollectiveVariable(self, index) -> Force Get a const reference to the Force object that computes a collective variable. Parameters ---------- index : int the index of the collective variable to get Returns ------- Force the Force object """ return _openmm.CustomCVForce_getCollectiveVariable(self, *args) def addGlobalParameter(self, name, defaultValue): """ addGlobalParameter(self, name, defaultValue) -> int Add a new global parameter that the interaction may depend on. The default value provided to this method is the initial value of the parameter in newly created Contexts. You can change the value at any time by calling setParameter() on the Context. Parameters ---------- name : string the name of the parameter defaultValue : double the default value of the parameter Returns ------- int the index of the parameter that was added """ return _openmm.CustomCVForce_addGlobalParameter(self, name, defaultValue) def getGlobalParameterName(self, index): """ getGlobalParameterName(self, index) -> std::string const & Get the name of a global parameter. Parameters ---------- index : int the index of the parameter for which to get the name Returns ------- string the parameter name """ return _openmm.CustomCVForce_getGlobalParameterName(self, index) def setGlobalParameterName(self, index, name): """ setGlobalParameterName(self, index, name) Set the name of a global parameter. Parameters ---------- index : int the index of the parameter for which to set the name name : string the name of the parameter """ return _openmm.CustomCVForce_setGlobalParameterName(self, index, name) def getGlobalParameterDefaultValue(self, index): """ getGlobalParameterDefaultValue(self, index) -> double Get the default value of a global parameter. Parameters ---------- index : int the index of the parameter for which to get the default value Returns ------- double the parameter default value """ return _openmm.CustomCVForce_getGlobalParameterDefaultValue(self, index) def setGlobalParameterDefaultValue(self, index, defaultValue): """ setGlobalParameterDefaultValue(self, index, defaultValue) Set the default value of a global parameter. Parameters ---------- index : int the index of the parameter for which to set the default value defaultValue : double the default value of the parameter """ return _openmm.CustomCVForce_setGlobalParameterDefaultValue(self, index, defaultValue) def addEnergyParameterDerivative(self, name): """ addEnergyParameterDerivative(self, name) Request that this Force compute the derivative of its energy with respect to a global parameter. The parameter must have already been added with addGlobalParameter(). Parameters ---------- name : string the name of the parameter """ return _openmm.CustomCVForce_addEnergyParameterDerivative(self, name) def getEnergyParameterDerivativeName(self, index): """ getEnergyParameterDerivativeName(self, index) -> std::string const & Get the name of a global parameter with respect to which this Force should compute the derivative of the energy. Parameters ---------- index : int the index of the parameter derivative, between 0 and getNumEnergyParameterDerivatives() Returns ------- string the parameter name """ return _openmm.CustomCVForce_getEnergyParameterDerivativeName(self, index) def addTabulatedFunction(self, name, function): """ addTabulatedFunction(self, name, function) -> int Add a tabulated function that may appear in the energy expression. Parameters ---------- name : string the name of the function as it appears in expressions function : TabulatedFunction * a TabulatedFunction object defining the function. The TabulatedFunction should have been created on the heap with the "new" operator. The Force takes over ownership of it, and deletes it when the Force itself is deleted. Returns ------- int the index of the function that was added """ if not function.thisown: s = ("the %s object does not own its corresponding OpenMM object" % self.__class__.__name__) raise Exception(s) val = _openmm.CustomCVForce_addTabulatedFunction(self, name, function) function.thisown=0 return val def getTabulatedFunction(self, *args): """ getTabulatedFunction(self, index) -> TabulatedFunction getTabulatedFunction(self, index) -> TabulatedFunction Get a reference to a tabulated function that may appear in the energy expression. Parameters ---------- index : int the index of the function to get Returns ------- TabulatedFunction the TabulatedFunction object defining the function """ return _openmm.CustomCVForce_getTabulatedFunction(self, *args) def getTabulatedFunctionName(self, index): """ getTabulatedFunctionName(self, index) -> std::string const & Get the name of a tabulated function that may appear in the energy expression. Parameters ---------- index : int the index of the function to get Returns ------- string the name of the function as it appears in expressions """ return _openmm.CustomCVForce_getTabulatedFunctionName(self, index) def getCollectiveVariableValues(self, context): """ getCollectiveVariableValues(self, context) Get the current values of the collective variables in a Context. Parameters ---------- context : Context the Context for which to get the values Returns ------- values : vector< double > the values of the collective variables are computed and stored into this """ return _openmm.CustomCVForce_getCollectiveVariableValues(self, context) def getInnerContext(self, context): """ getInnerContext(self, context) -> Context Get the inner Context used for evaluating collective variables. When you create a Context for a System that contains a CustomCVForce, internally it creates a new System, adds the Forces that define the CVs to it, creates a new Context for that System, and uses it to evaluate the variables. In most cases you can ignore all of this. It is just an implementation detail. However, there are a few cases where you need to directly access that internal Context. For example, if you want to modify one of the Forces that defines a collective variable and call updateParametersInContext() on it, you need to pass that inner Context to it. This method returns a reference to it. Parameters ---------- context : Context the Context containing the CustomCVForce Returns ------- Context the inner Context used to evaluate the collective variables """ return _openmm.CustomCVForce_getInnerContext(self, context) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the tabulated function parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call getTabulatedFunction(index).setFunctionParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. This method is very limited. The only information it updates is the parameters of tabulated functions. All other aspects of the Force (the energy expression, the set of collective variables, etc.) are unaffected and can only be changed by reinitializing the Context. """ return _openmm.CustomCVForce_updateParametersInContext(self, context) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if force uses PBC and false otherwise """ return _openmm.CustomCVForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self, energy) -> CustomCVForce __init__(self, other) -> CustomCVForce Create a CustomCVForce. Parameters ---------- energy : string an algebraic expression giving the energy of the system as a function of the collective variables and global parameters """ this = _openmm.new_CustomCVForce(*args) try: self.this.append(this) except Exception: self.this = this CustomCVForce_swigregister = _openmm.CustomCVForce_swigregister CustomCVForce_swigregister(CustomCVForce) class CustomBondForce(Force): """ This class implements bonded interactions between pairs of particles. Unlike HarmonicBondForce, the functional form of the interaction is completely customizable, and may involve arbitrary algebraic expressions. It may depend on the distance between particles, as well as on arbitrary global and per-bond parameters. To use this class, create a CustomBondForce object, passing an algebraic expression to the constructor that defines the interaction energy between each pair of bonded particles. The expression may depend on r, the distance between the particles, as well as on any parameters you choose. Then call addPerBondParameter() to define per-bond parameters, and addGlobalParameter() to define global parameters. The values of per-bond parameters are specified as part of the system definition, while values of global parameters may be modified during a simulation by calling Context::setParameter(). Finally, call addBond() once for each bond. After a bond has been added, you can modify its parameters by calling setBondParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext(). As an example, the following code creates a CustomBondForce that implements a harmonic potential: <tt>CustomBondForce* force = new CustomBondForce("0.5*k*(r-r0)^2");</tt> This force depends on two parameters: the spring constant k and equilibrium distance r0. The following code defines these parameters: <tt><pre> force->addPerBondParameter("k"); force->addPerBondParameter("r0"); </pre></tt> This class also has the ability to compute derivatives of the potential energy with respect to global parameters. Call addEnergyParameterDerivative() to request that the derivative with respect to a particular parameter be computed. You can then query its value in a Context by calling getState() on it. Expressions may involve the operators + (add), - (subtract), * (multiply), / (divide), and ^ (power), and the following functions: sqrt, exp, log, sin, cos, sec, csc, tan, cot, asin, acos, atan, sinh, cosh, tanh, erf, erfc, min, max, abs, floor, ceil, step, delta, select. All trigonometric functions are defined in radians, and log is the natural logarithm. step(x) = 0 if x is less than 0, 1 otherwise. delta(x) = 1 if x is 0, 0 otherwise. select(x,y,z) = z if x = 0, y otherwise. """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, CustomBondForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, CustomBondForce, name) __repr__ = _swig_repr def getNumBonds(self): """ getNumBonds(self) -> int Get the number of bonds for which force field parameters have been defined. """ return _openmm.CustomBondForce_getNumBonds(self) def getNumPerBondParameters(self): """ getNumPerBondParameters(self) -> int Get the number of per-bond parameters that the interaction depends on. """ return _openmm.CustomBondForce_getNumPerBondParameters(self) def getNumGlobalParameters(self): """ getNumGlobalParameters(self) -> int Get the number of global parameters that the interaction depends on. """ return _openmm.CustomBondForce_getNumGlobalParameters(self) def getNumEnergyParameterDerivatives(self): """ getNumEnergyParameterDerivatives(self) -> int Get the number of global parameters with respect to which the derivative of the energy should be computed. """ return _openmm.CustomBondForce_getNumEnergyParameterDerivatives(self) def getEnergyFunction(self): """ getEnergyFunction(self) -> std::string const & Get the algebraic expression that gives the interaction energy for each bond """ return _openmm.CustomBondForce_getEnergyFunction(self) def setEnergyFunction(self, energy): """ setEnergyFunction(self, energy) Set the algebraic expression that gives the interaction energy for each bond """ return _openmm.CustomBondForce_setEnergyFunction(self, energy) def addPerBondParameter(self, name): """ addPerBondParameter(self, name) -> int Add a new per-bond parameter that the interaction may depend on. Parameters ---------- name : string the name of the parameter Returns ------- int the index of the parameter that was added """ return _openmm.CustomBondForce_addPerBondParameter(self, name) def getPerBondParameterName(self, index): """ getPerBondParameterName(self, index) -> std::string const & Get the name of a per-bond parameter. Parameters ---------- index : int the index of the parameter for which to get the name Returns ------- string the parameter name """ return _openmm.CustomBondForce_getPerBondParameterName(self, index) def setPerBondParameterName(self, index, name): """ setPerBondParameterName(self, index, name) Set the name of a per-bond parameter. Parameters ---------- index : int the index of the parameter for which to set the name name : string the name of the parameter """ return _openmm.CustomBondForce_setPerBondParameterName(self, index, name) def addGlobalParameter(self, name, defaultValue): """ addGlobalParameter(self, name, defaultValue) -> int Add a new global parameter that the interaction may depend on. The default value provided to this method is the initial value of the parameter in newly created Contexts. You can change the value at any time by calling setParameter() on the Context. Parameters ---------- name : string the name of the parameter defaultValue : double the default value of the parameter Returns ------- int the index of the parameter that was added """ return _openmm.CustomBondForce_addGlobalParameter(self, name, defaultValue) def getGlobalParameterName(self, index): """ getGlobalParameterName(self, index) -> std::string const & Get the name of a global parameter. Parameters ---------- index : int the index of the parameter for which to get the name Returns ------- string the parameter name """ return _openmm.CustomBondForce_getGlobalParameterName(self, index) def setGlobalParameterName(self, index, name): """ setGlobalParameterName(self, index, name) Set the name of a global parameter. Parameters ---------- index : int the index of the parameter for which to set the name name : string the name of the parameter """ return _openmm.CustomBondForce_setGlobalParameterName(self, index, name) def getGlobalParameterDefaultValue(self, index): """ getGlobalParameterDefaultValue(self, index) -> double Get the default value of a global parameter. Parameters ---------- index : int the index of the parameter for which to get the default value Returns ------- double the parameter default value """ return _openmm.CustomBondForce_getGlobalParameterDefaultValue(self, index) def setGlobalParameterDefaultValue(self, index, defaultValue): """ setGlobalParameterDefaultValue(self, index, defaultValue) Set the default value of a global parameter. Parameters ---------- index : int the index of the parameter for which to set the default value defaultValue : double the default value of the parameter """ return _openmm.CustomBondForce_setGlobalParameterDefaultValue(self, index, defaultValue) def addEnergyParameterDerivative(self, name): """ addEnergyParameterDerivative(self, name) Request that this Force compute the derivative of its energy with respect to a global parameter. The parameter must have already been added with addGlobalParameter(). Parameters ---------- name : string the name of the parameter """ return _openmm.CustomBondForce_addEnergyParameterDerivative(self, name) def getEnergyParameterDerivativeName(self, index): """ getEnergyParameterDerivativeName(self, index) -> std::string const & Get the name of a global parameter with respect to which this Force should compute the derivative of the energy. Parameters ---------- index : int the index of the parameter derivative, between 0 and getNumEnergyParameterDerivatives() Returns ------- string the parameter name """ return _openmm.CustomBondForce_getEnergyParameterDerivativeName(self, index) def addBond(self, *args): """ addBond(self, particle1, particle2, parameters) -> int addBond(self, particle1, particle2) -> int Add a bond term to the force field. Parameters ---------- particle1 : int the index of the first particle connected by the bond particle2 : int the index of the second particle connected by the bond parameters : vector< double > the list of parameters for the new bond Returns ------- int the index of the bond that was added """ return _openmm.CustomBondForce_addBond(self, *args) def getBondParameters(self, index): """ getBondParameters(self, index) Get the force field parameters for a bond term. Parameters ---------- index : int the index of the bond for which to get parameters Returns ------- particle1 : int the index of the first particle connected by the bond particle2 : int the index of the second particle connected by the bond parameters : vector< double > the list of parameters for the bond """ return _openmm.CustomBondForce_getBondParameters(self, index) def setBondParameters(self, *args): """ setBondParameters(self, index, particle1, particle2, parameters) setBondParameters(self, index, particle1, particle2) Set the force field parameters for a bond term. Parameters ---------- index : int the index of the bond for which to set parameters particle1 : int the index of the first particle connected by the bond particle2 : int the index of the second particle connected by the bond parameters : vector< double > the list of parameters for the bond """ return _openmm.CustomBondForce_setBondParameters(self, *args) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the per-bond parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setBondParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. This method has several limitations. The only information it updates is the values of per-bond parameters. All other aspects of the Force (such as the energy function) are unaffected and can only be changed by reinitializing the Context. The set of particles involved in a bond cannot be changed, nor can new bonds be added. """ return _openmm.CustomBondForce_updateParametersInContext(self, context) def setUsesPeriodicBoundaryConditions(self, periodic): """ setUsesPeriodicBoundaryConditions(self, periodic) Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful. """ return _openmm.CustomBondForce_setUsesPeriodicBoundaryConditions(self, periodic) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if force uses PBC and false otherwise """ return _openmm.CustomBondForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self, energy) -> CustomBondForce __init__(self, other) -> CustomBondForce Create a CustomBondForce. Parameters ---------- energy : string an algebraic expression giving the interaction energy between two bonded particles as a function of r, the distance between them """ this = _openmm.new_CustomBondForce(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_CustomBondForce __del__ = lambda self: None CustomBondForce_swigregister = _openmm.CustomBondForce_swigregister CustomBondForce_swigregister(CustomBondForce) class SerializationProxy(_object): """ A SerializationProxy is an object that knows how to serialize and deserialize objects of a particular type. This is an abstract class. Subclasses implement the logic for serializing particular types of logic. A global registry maintains the list of what SerializationProxy to use for each type of object. Call registerProxy() to register the proxy for a particular type. This is typically done at application startup or by a dynamic library's initialization code. """ __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SerializationProxy, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SerializationProxy, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _openmm.delete_SerializationProxy __del__ = lambda self: None def registerProxy(type, proxy): """ registerProxy(type, proxy) Register a SerializationProxy to be used for objects of a particular type. Parameters ---------- type : type_info the type_info for the object type proxy : SerializationProxy * the proxy to use for objects of the specified type """ return _openmm.SerializationProxy_registerProxy(type, proxy) if _newclass: registerProxy = staticmethod(registerProxy) __swig_getmethods__["registerProxy"] = lambda x: registerProxy def getProxy(*args): """ getProxy(typeName) -> SerializationProxy getProxy(type) -> SerializationProxy Get the SerializationProxy to use for objects of a particular type, specified by type_info. Parameters ---------- type : type_info the type_info of the object type to get a proxy for """ return _openmm.SerializationProxy_getProxy(*args) if _newclass: getProxy = staticmethod(getProxy) __swig_getmethods__["getProxy"] = lambda x: getProxy def getTypeName(self): """ getTypeName(self) -> std::string const & Get the name of the object type this proxy manipulates, as passed to the constructor. """ return _openmm.SerializationProxy_getTypeName(self) def serialize(self, object, node): """ serialize(self, object, node) Subclasses implement this method to record information about an object being serialized. Parameters ---------- object : void * a pointer to the object being serialized node : SerializationNode all data to be serialized should be stored into this node, either directly as properties or indirectly by adding child nodes to it """ return _openmm.SerializationProxy_serialize(self, object, node) def deserialize(self, node): """ deserialize(self, node) -> void * Reconstruct an object from its serialized data. Parameters ---------- node : SerializationNode a SerializationNode containing the object's description Returns ------- void * a pointer to a new object created from the data. The caller assumes ownership of the object. """ return _openmm.SerializationProxy_deserialize(self, node) SerializationProxy_swigregister = _openmm.SerializationProxy_swigregister SerializationProxy_swigregister(SerializationProxy) def SerializationProxy_registerProxy(type, proxy): """ SerializationProxy_registerProxy(type, proxy) Register a SerializationProxy to be used for objects of a particular type. Parameters ---------- type : type_info the type_info for the object type proxy : SerializationProxy * the proxy to use for objects of the specified type """ return _openmm.SerializationProxy_registerProxy(type, proxy) def SerializationProxy_getProxy(*args): """ getProxy(typeName) -> SerializationProxy SerializationProxy_getProxy(type) -> SerializationProxy Get the SerializationProxy to use for objects of a particular type, specified by type_info. Parameters ---------- type : type_info the type_info of the object type to get a proxy for """ return _openmm.SerializationProxy_getProxy(*args) class AmoebaVdwForce(Force): """ This class implements a buffered 14-7 potential used to model van der Waals forces. To use it, create an AmoebaVdwForce object then call addParticle() once for each particle. After a particle has been added, you can modify its force field parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext(). A unique feature of this class is that the interaction site for a particle does not need to be exactly at the particle's location. Instead, it can be placed a fraction of the distance from that particle to another one. This is typically done for hydrogens to place the interaction site slightly closer to the parent atom. The fraction is known as the "reduction factor", since it reduces the distance from the parent atom to the interaction site. """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, AmoebaVdwForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, AmoebaVdwForce, name) __repr__ = _swig_repr NoCutoff = _openmm.AmoebaVdwForce_NoCutoff CutoffPeriodic = _openmm.AmoebaVdwForce_CutoffPeriodic def getNumParticles(self): """ getNumParticles(self) -> int Get the number of particles """ return _openmm.AmoebaVdwForce_getNumParticles(self) def setParticleParameters(self, particleIndex, parentIndex, sigma, epsilon, reductionFactor): """ setParticleParameters(self, particleIndex, parentIndex, sigma, epsilon, reductionFactor) Set the force field parameters for a vdw particle. Parameters ---------- particleIndex : int the particle index parentIndex : int the index of the parent particle sigma : double vdw sigma epsilon : double vdw epsilon reductionFactor : double the fraction of the distance along the line from the parent particle to this particle at which the interaction site should be placed """ return _openmm.AmoebaVdwForce_setParticleParameters(self, particleIndex, parentIndex, sigma, epsilon, reductionFactor) def getParticleParameters(self, particleIndex): """ getParticleParameters(self, particleIndex) Get the force field parameters for a vdw particle. Parameters ---------- particleIndex : int the particle index Returns ------- parentIndex : int the index of the parent particle sigma : double vdw sigma epsilon : double vdw epsilon reductionFactor : double the fraction of the distance along the line from the parent particle to this particle at which the interaction site should be placed """ val = _openmm.AmoebaVdwForce_getParticleParameters(self, particleIndex) val[1]=unit.Quantity(val[1], unit.nanometer) val[2]=unit.Quantity(val[2], unit.kilojoule_per_mole) return val def addParticle(self, parentIndex, sigma, epsilon, reductionFactor): """ addParticle(self, parentIndex, sigma, epsilon, reductionFactor) -> int Add the force field parameters for a vdw particle. Parameters ---------- parentIndex : int the index of the parent particle sigma : double vdw sigma epsilon : double vdw epsilon reductionFactor : double the fraction of the distance along the line from the parent particle to this particle at which the interaction site should be placed Returns ------- int index of added particle """ return _openmm.AmoebaVdwForce_addParticle(self, parentIndex, sigma, epsilon, reductionFactor) def setSigmaCombiningRule(self, sigmaCombiningRule): """ setSigmaCombiningRule(self, sigmaCombiningRule) Set sigma combining rule Parameters ---------- sigmaCombiningRule : string sigma combining rule: 'ARITHMETIC', 'GEOMETRIC'. 'CUBIC-MEAN' """ return _openmm.AmoebaVdwForce_setSigmaCombiningRule(self, sigmaCombiningRule) def getSigmaCombiningRule(self): """ getSigmaCombiningRule(self) -> std::string const & Get sigma combining rule Returns ------- string sigmaCombiningRule sigma combining rule: 'ARITHMETIC', 'GEOMETRIC'. 'CUBIC-MEAN' """ return _openmm.AmoebaVdwForce_getSigmaCombiningRule(self) def setEpsilonCombiningRule(self, epsilonCombiningRule): """ setEpsilonCombiningRule(self, epsilonCombiningRule) Set epsilon combining rule Parameters ---------- epsilonCombiningRule : string epsilon combining rule: 'ARITHMETIC', 'GEOMETRIC'. 'HARMONIC', 'HHG' """ return _openmm.AmoebaVdwForce_setEpsilonCombiningRule(self, epsilonCombiningRule) def getEpsilonCombiningRule(self): """ getEpsilonCombiningRule(self) -> std::string const & Get epsilon combining rule Returns ------- string epsilonCombiningRule epsilon combining rule: 'ARITHMETIC', 'GEOMETRIC'. 'HARMONIC', 'HHG' """ return _openmm.AmoebaVdwForce_getEpsilonCombiningRule(self) def getUseDispersionCorrection(self): """ getUseDispersionCorrection(self) -> bool Get whether to add a contribution to the energy that approximately represents the effect of VdW interactions beyond the cutoff distance. The energy depends on the volume of the periodic box, and is only applicable when periodic boundary conditions are used. When running simulations at constant pressure, adding this contribution can improve the quality of results. """ return _openmm.AmoebaVdwForce_getUseDispersionCorrection(self) def setUseDispersionCorrection(self, useCorrection): """ setUseDispersionCorrection(self, useCorrection) Set whether to add a contribution to the energy that approximately represents the effect of VdW interactions beyond the cutoff distance. The energy depends on the volume of the periodic box, and is only applicable when periodic boundary conditions are used. When running simulations at constant pressure, adding this contribution can improve the quality of results. """ return _openmm.AmoebaVdwForce_setUseDispersionCorrection(self, useCorrection) def setParticleExclusions(self, particleIndex, exclusions): """ setParticleExclusions(self, particleIndex, exclusions) Set exclusions for specified particle Parameters ---------- particleIndex : int particle index exclusions : vector< int > vector of exclusions """ return _openmm.AmoebaVdwForce_setParticleExclusions(self, particleIndex, exclusions) def getParticleExclusions(self, particleIndex): """ getParticleExclusions(self, particleIndex) Get exclusions for specified particle Parameters ---------- particleIndex : int particle index Returns ------- exclusions : vector< int > vector of exclusions """ return _openmm.AmoebaVdwForce_getParticleExclusions(self, particleIndex) def getCutoffDistance(self): """ getCutoffDistance(self) -> double Get the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect. Returns ------- double the cutoff distance, measured in nm """ val = _openmm.AmoebaVdwForce_getCutoffDistance(self) val=unit.Quantity(val, unit.nanometers) return val def setCutoffDistance(self, distance): """ setCutoffDistance(self, distance) Set the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect. Parameters ---------- distance : double the cutoff distance, measured in nm """ return _openmm.AmoebaVdwForce_setCutoffDistance(self, distance) def setCutoff(self, cutoff): """ setCutoff(self, cutoff) Set the cutoff distance. @deprecated This method exists only for backward compatibility. Use setCutoffDistance() instead. """ return _openmm.AmoebaVdwForce_setCutoff(self, cutoff) def getCutoff(self): """ getCutoff(self) -> double Get the cutoff distance. @deprecated This method exists only for backward compatibility. Use getCutoffDistance() instead. """ val = _openmm.AmoebaVdwForce_getCutoff(self) val=unit.Quantity(val, unit.nanometer) return val def getNonbondedMethod(self): """ getNonbondedMethod(self) -> OpenMM::AmoebaVdwForce::NonbondedMethod Get the method used for handling long range nonbonded interactions. """ return _openmm.AmoebaVdwForce_getNonbondedMethod(self) def setNonbondedMethod(self, method): """ setNonbondedMethod(self, method) Set the method used for handling long range nonbonded interactions. """ return _openmm.AmoebaVdwForce_setNonbondedMethod(self, method) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the per-particle parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setParticleParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. The only information this method updates is the values of per-particle parameters. All other aspects of the Force (the nonbonded method, the cutoff distance, etc.) are unaffected and can only be changed by reinitializing the Context. """ return _openmm.AmoebaVdwForce_updateParametersInContext(self, context) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if nonbondedMethod uses PBC and false otherwise """ return _openmm.AmoebaVdwForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self) -> AmoebaVdwForce __init__(self, other) -> AmoebaVdwForce Create an Amoeba VdwForce. """ this = _openmm.new_AmoebaVdwForce(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_AmoebaVdwForce __del__ = lambda self: None AmoebaVdwForce_swigregister = _openmm.AmoebaVdwForce_swigregister AmoebaVdwForce_swigregister(AmoebaVdwForce) class CMAPTorsionForce(Force): """ This class implements an interaction between pairs of dihedral angles. The interaction energy is defined by an "energy correction map" (CMAP), which is simply a set of tabulated energy values on a regular grid of (phi, psi) angles. Natural cubic spline interpolation is used to compute forces and energies at arbitrary values of the two angles. To use this class, first create one or more energy correction maps by calling addMap(). For each one, you provide an array of energies at uniformly spaced values of the two angles. Next, add interactions by calling addTorsion(). For each one, you specify the sequence of particles used to calculate each of the two dihedral angles, and the index of the map used to calculate their interaction energy. """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, CMAPTorsionForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, CMAPTorsionForce, name) __repr__ = _swig_repr def getNumMaps(self): """ getNumMaps(self) -> int Get the number of maps that have been defined. """ return _openmm.CMAPTorsionForce_getNumMaps(self) def getNumTorsions(self): """ getNumTorsions(self) -> int Get the number of CMAP torsion terms in the potential function """ return _openmm.CMAPTorsionForce_getNumTorsions(self) def addMap(self, size, energy): """ addMap(self, size, energy) -> int Create a new map that can be used for torsion pairs. Parameters ---------- size : int the size of the map along each dimension energy : vector< double > the energy values for the map. This must be of length size*size. The element energy[i+size*j] contains the energy when the first torsion angle equals i*2*PI/size and the second torsion angle equals j*2*PI/size. Returns ------- int the index of the map that was added """ return _openmm.CMAPTorsionForce_addMap(self, size, energy) def getMapParameters(self, index): """ getMapParameters(self, index) Get the energy values of a map. Parameters ---------- index : int the index of the map for which to get energy values Returns ------- size : int the size of the map along each dimension energy : vector< double > the energy values for the map. This must be of length size*size. The element energy[i+size*j] contains the energy when the first torsion angle equals i*2*PI/size and the second torsion angle equals j*2*PI/size. """ val = _openmm.CMAPTorsionForce_getMapParameters(self, index) val[1]=unit.Quantity(val[1], unit.kilojoule_per_mole) return val def setMapParameters(self, index, size, energy): """ setMapParameters(self, index, size, energy) Set the energy values of a map. Parameters ---------- index : int the index of the map for which to set energy values size : int the size of the map along each dimension energy : vector< double > the energy values for the map. This must be of length size*size. The element energy[i+size*j] contains the energy when the first torsion angle equals i*2*PI/size and the second torsion angle equals j*2*PI/size. """ return _openmm.CMAPTorsionForce_setMapParameters(self, index, size, energy) def addTorsion(self, map, a1, a2, a3, a4, b1, b2, b3, b4): """ addTorsion(self, map, a1, a2, a3, a4, b1, b2, b3, b4) -> int Add a CMAP torsion term to the force field. Parameters ---------- map : int the index of the map to use for this term a1 : int the index of the first particle forming the first torsion a2 : int the index of the second particle forming the first torsion a3 : int the index of the third particle forming the first torsion a4 : int the index of the fourth particle forming the first torsion b1 : int the index of the first particle forming the second torsion b2 : int the index of the second particle forming the second torsion b3 : int the index of the third particle forming the second torsion b4 : int the index of the fourth particle forming the second torsion Returns ------- int the index of the torsion that was added """ return _openmm.CMAPTorsionForce_addTorsion(self, map, a1, a2, a3, a4, b1, b2, b3, b4) def getTorsionParameters(self, index): """ getTorsionParameters(self, index) Get the force field parameters for a CMAP torsion term. Parameters ---------- index : int the index of the torsion for which to get parameters Returns ------- map : int the index of the map to use for this term a1 : int the index of the first particle forming the first torsion a2 : int the index of the second particle forming the first torsion a3 : int the index of the third particle forming the first torsion a4 : int the index of the fourth particle forming the first torsion b1 : int the index of the first particle forming the second torsion b2 : int the index of the second particle forming the second torsion b3 : int the index of the third particle forming the second torsion b4 : int the index of the fourth particle forming the second torsion """ return _openmm.CMAPTorsionForce_getTorsionParameters(self, index) def setTorsionParameters(self, index, map, a1, a2, a3, a4, b1, b2, b3, b4): """ setTorsionParameters(self, index, map, a1, a2, a3, a4, b1, b2, b3, b4) Set the force field parameters for a CMAP torsion term. Parameters ---------- index : int the index of the torsion for which to set parameters map : int the index of the map to use for this term a1 : int the index of the first particle forming the first torsion a2 : int the index of the second particle forming the first torsion a3 : int the index of the third particle forming the first torsion a4 : int the index of the fourth particle forming the first torsion b1 : int the index of the first particle forming the second torsion b2 : int the index of the second particle forming the second torsion b3 : int the index of the third particle forming the second torsion b4 : int the index of the fourth particle forming the second torsion """ return _openmm.CMAPTorsionForce_setTorsionParameters(self, index, map, a1, a2, a3, a4, b1, b2, b3, b4) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the map and torsion parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setMapParameters() and setTorsionParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. The only information that can be updated with this method is the energy values for a map, and the map index for a torsion. The size of a map and the set of particles involved in a torsion cannot be changed. Also, new bonds and torsions cannot be added. """ return _openmm.CMAPTorsionForce_updateParametersInContext(self, context) def setUsesPeriodicBoundaryConditions(self, periodic): """ setUsesPeriodicBoundaryConditions(self, periodic) Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful. """ return _openmm.CMAPTorsionForce_setUsesPeriodicBoundaryConditions(self, periodic) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if force uses PBC and false otherwise """ return _openmm.CMAPTorsionForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self) -> CMAPTorsionForce __init__(self, other) -> CMAPTorsionForce Create a CMAPTorsionForce. """ this = _openmm.new_CMAPTorsionForce(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_CMAPTorsionForce __del__ = lambda self: None CMAPTorsionForce_swigregister = _openmm.CMAPTorsionForce_swigregister CMAPTorsionForce_swigregister(CMAPTorsionForce) class Discrete2DFunction(TabulatedFunction): """This is a TabulatedFunction that computes a discrete two dimensional function f(x,y). To evaluate it, x and y are each rounded to the nearest integer and the table element with those indices is returned. If either index is outside the range [0, size), the result is undefined.""" __swig_setmethods__ = {} for _s in [TabulatedFunction]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, Discrete2DFunction, name, value) __swig_getmethods__ = {} for _s in [TabulatedFunction]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, Discrete2DFunction, name) __repr__ = _swig_repr def __init__(self, xsize, ysize, values): """ __init__(self, xsize, ysize, values) -> Discrete2DFunction This is a TabulatedFunction that computes a discrete two dimensional function f(x,y). To evaluate it, x and y are each rounded to the nearest integer and the table element with those indices is returned. If either index is outside the range [0, size), the result is undefined. """ this = _openmm.new_Discrete2DFunction(xsize, ysize, values) try: self.this.append(this) except Exception: self.this = this def getFunctionParameters(self): """getFunctionParameters(self)""" return _openmm.Discrete2DFunction_getFunctionParameters(self) def setFunctionParameters(self, xsize, ysize, values): """setFunctionParameters(self, xsize, ysize, values)""" return _openmm.Discrete2DFunction_setFunctionParameters(self, xsize, ysize, values) def Copy(self): """ Copy(self) -> Discrete2DFunction @deprecated This will be removed in a future release. """ return _openmm.Discrete2DFunction_Copy(self) __swig_destroy__ = _openmm.delete_Discrete2DFunction __del__ = lambda self: None Discrete2DFunction_swigregister = _openmm.Discrete2DFunction_swigregister Discrete2DFunction_swigregister(Discrete2DFunction) class BrownianIntegrator(Integrator): """This is an Integrator which simulates a System using Brownian dynamics.""" __swig_setmethods__ = {} for _s in [Integrator]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, BrownianIntegrator, name, value) __swig_getmethods__ = {} for _s in [Integrator]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, BrownianIntegrator, name) __repr__ = _swig_repr def getTemperature(self): """ getTemperature(self) -> double Get the temperature of the heat bath (in Kelvin). Returns ------- double the temperature of the heat bath (in Kelvin). """ val = _openmm.BrownianIntegrator_getTemperature(self) val=unit.Quantity(val, unit.kelvin) return val def setTemperature(self, temp): """ setTemperature(self, temp) Set the temperature of the heat bath (in Kelvin). Parameters ---------- temp : double the temperature of the heat bath, measured in Kelvin. """ return _openmm.BrownianIntegrator_setTemperature(self, temp) def getFriction(self): """ getFriction(self) -> double Get the friction coefficient which determines how strongly the system is coupled to the heat bath (in inverse ps). Returns ------- double the friction coefficient, measured in 1/ps """ val = _openmm.BrownianIntegrator_getFriction(self) val=unit.Quantity(val, 1/unit.picosecond) return val def setFriction(self, coeff): """ setFriction(self, coeff) Set the friction coefficient which determines how strongly the system is coupled to the heat bath (in inverse ps). Parameters ---------- coeff : double the friction coefficient, measured in 1/ps """ return _openmm.BrownianIntegrator_setFriction(self, coeff) def getRandomNumberSeed(self): """ getRandomNumberSeed(self) -> int Get the random number seed. See setRandomNumberSeed() for details. """ return _openmm.BrownianIntegrator_getRandomNumberSeed(self) def setRandomNumberSeed(self, seed): """ setRandomNumberSeed(self, seed) Set the random number seed. The precise meaning of this parameter is undefined, and is left up to each Platform to interpret in an appropriate way. It is guaranteed that if two simulations are run with different random number seeds, the sequence of random forces will be different. On the other hand, no guarantees are made about the behavior of simulations that use the same seed. In particular, Platforms are permitted to use non-deterministic algorithms which produce different results on successive runs, even if those runs were initialized identically. If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context is created from this Force. This is done to ensure that each Context receives unique random seeds without you needing to set them explicitly. """ return _openmm.BrownianIntegrator_setRandomNumberSeed(self, seed) def step(self, steps): """ step(self, steps) Advance a simulation through time by taking a series of time steps. Parameters ---------- steps : int the number of time steps to take """ return _openmm.BrownianIntegrator_step(self, steps) def __init__(self, *args): """ __init__(self, temperature, frictionCoeff, stepSize) -> BrownianIntegrator __init__(self, other) -> BrownianIntegrator Create a BrownianIntegrator. Parameters ---------- temperature : double the temperature of the heat bath (in Kelvin) frictionCoeff : double the friction coefficient which couples the system to the heat bath, measured in 1/ps stepSize : double the step size with which to integrate the system (in picoseconds) """ this = _openmm.new_BrownianIntegrator(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_BrownianIntegrator __del__ = lambda self: None BrownianIntegrator_swigregister = _openmm.BrownianIntegrator_swigregister BrownianIntegrator_swigregister(BrownianIntegrator) class HarmonicBondForce(Force): """This class implements an interaction between pairs of particles that varies harmonically with the distance between them. To use it, create a HarmonicBondForce object then call addBond() once for each bond. After a bond has been added, you can modify its force field parameters by calling setBondParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().""" __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, HarmonicBondForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, HarmonicBondForce, name) __repr__ = _swig_repr def getNumBonds(self): """ getNumBonds(self) -> int Get the number of harmonic bond stretch terms in the potential function """ return _openmm.HarmonicBondForce_getNumBonds(self) def addBond(self, particle1, particle2, length, k): """ addBond(self, particle1, particle2, length, k) -> int Add a bond term to the force field. Parameters ---------- particle1 : int the index of the first particle connected by the bond particle2 : int the index of the second particle connected by the bond length : double the equilibrium length of the bond, measured in nm k : double the harmonic force constant for the bond, measured in kJ/mol/nm^2 Returns ------- int the index of the bond that was added """ return _openmm.HarmonicBondForce_addBond(self, particle1, particle2, length, k) def getBondParameters(self, index): """ getBondParameters(self, index) Get the force field parameters for a bond term. Parameters ---------- index : int the index of the bond for which to get parameters Returns ------- particle1 : int the index of the first particle connected by the bond particle2 : int the index of the second particle connected by the bond length : double the equilibrium length of the bond, measured in nm k : double the harmonic force constant for the bond, measured in kJ/mol/nm^2 """ val = _openmm.HarmonicBondForce_getBondParameters(self, index) val[2]=unit.Quantity(val[2], unit.nanometer) val[3]=unit.Quantity(val[3], unit.kilojoule_per_mole/(unit.nanometer*unit.nanometer)) return val def setBondParameters(self, index, particle1, particle2, length, k): """ setBondParameters(self, index, particle1, particle2, length, k) Set the force field parameters for a bond term. Parameters ---------- index : int the index of the bond for which to set parameters particle1 : int the index of the first particle connected by the bond particle2 : int the index of the second particle connected by the bond length : double the equilibrium length of the bond, measured in nm k : double the harmonic force constant for the bond, measured in kJ/mol/nm^2 """ return _openmm.HarmonicBondForce_setBondParameters(self, index, particle1, particle2, length, k) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the per-bond parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setBondParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. The only information this method updates is the values of per-bond parameters. The set of particles involved in a bond cannot be changed, nor can new bonds be added. """ return _openmm.HarmonicBondForce_updateParametersInContext(self, context) def setUsesPeriodicBoundaryConditions(self, periodic): """ setUsesPeriodicBoundaryConditions(self, periodic) Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful. """ return _openmm.HarmonicBondForce_setUsesPeriodicBoundaryConditions(self, periodic) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if force uses PBC and false otherwise """ return _openmm.HarmonicBondForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self) -> HarmonicBondForce __init__(self, other) -> HarmonicBondForce Create a HarmonicBondForce. """ this = _openmm.new_HarmonicBondForce(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_HarmonicBondForce __del__ = lambda self: None HarmonicBondForce_swigregister = _openmm.HarmonicBondForce_swigregister HarmonicBondForce_swigregister(HarmonicBondForce) class AmoebaWcaDispersionForce(Force): """ This class implements a nonbonded interaction between pairs of particles typically used along with AmoebaGeneralizedKirkwoodForce as part of an implicit solvent model. To use it, create an AmoebaWcaDispersionForce object then call addParticle() once for each particle. After a particle has been added, you can modify its force field parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext(). """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, AmoebaWcaDispersionForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, AmoebaWcaDispersionForce, name) __repr__ = _swig_repr def getNumParticles(self): """ getNumParticles(self) -> int Get the number of particles """ return _openmm.AmoebaWcaDispersionForce_getNumParticles(self) def setParticleParameters(self, particleIndex, radius, epsilon): """ setParticleParameters(self, particleIndex, radius, epsilon) Set the force field parameters for a WCA dispersion particle. Parameters ---------- particleIndex : int the particle index radius : double radius epsilon : double epsilon """ return _openmm.AmoebaWcaDispersionForce_setParticleParameters(self, particleIndex, radius, epsilon) def getParticleParameters(self, particleIndex): """ getParticleParameters(self, particleIndex) Get the force field parameters for a WCA dispersion particle. Parameters ---------- particleIndex : int the particle index Returns ------- radius : double radius epsilon : double epsilon """ val = _openmm.AmoebaWcaDispersionForce_getParticleParameters(self, particleIndex) val[0]=unit.Quantity(val[0], unit.nanometer) val[1]=unit.Quantity(val[1], unit.kilojoule_per_mole) return val def addParticle(self, radius, epsilon): """ addParticle(self, radius, epsilon) -> int Set the force field parameters for a WCA dispersion particle. Parameters ---------- radius : double radius epsilon : double epsilon Returns ------- int index of added particle """ return _openmm.AmoebaWcaDispersionForce_addParticle(self, radius, epsilon) def updateParametersInContext(self, context): """ updateParametersInContext(self, context) Update the per-particle parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setParticleParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context. The only information this method updates is the values of per-particle parameters. All other aspects of the Force are unaffected and can only be changed by reinitializing the Context. """ return _openmm.AmoebaWcaDispersionForce_updateParametersInContext(self, context) def getEpso(self): """getEpso(self) -> double""" val = _openmm.AmoebaWcaDispersionForce_getEpso(self) val=unit.Quantity(val, unit.kilojoule_per_mole) return val def getEpsh(self): """getEpsh(self) -> double""" val = _openmm.AmoebaWcaDispersionForce_getEpsh(self) val=unit.Quantity(val, unit.kilojoule_per_mole) return val def getRmino(self): """getRmino(self) -> double""" val = _openmm.AmoebaWcaDispersionForce_getRmino(self) val=unit.Quantity(val, unit.nanometer) return val def getRminh(self): """getRminh(self) -> double""" val = _openmm.AmoebaWcaDispersionForce_getRminh(self) val=unit.Quantity(val, unit.nanometer) return val def getAwater(self): """getAwater(self) -> double""" val = _openmm.AmoebaWcaDispersionForce_getAwater(self) val=unit.Quantity(val, 1/(unit.nanometer*unit.nanometer*unit.nanometer)) return val def getShctd(self): """getShctd(self) -> double""" return _openmm.AmoebaWcaDispersionForce_getShctd(self) def getDispoff(self): """getDispoff(self) -> double""" val = _openmm.AmoebaWcaDispersionForce_getDispoff(self) val=unit.Quantity(val, unit.nanometer) return val def getSlevy(self): """getSlevy(self) -> double""" return _openmm.AmoebaWcaDispersionForce_getSlevy(self) def setEpso(self, inputValue): """setEpso(self, inputValue)""" return _openmm.AmoebaWcaDispersionForce_setEpso(self, inputValue) def setEpsh(self, inputValue): """setEpsh(self, inputValue)""" return _openmm.AmoebaWcaDispersionForce_setEpsh(self, inputValue) def setRmino(self, inputValue): """setRmino(self, inputValue)""" return _openmm.AmoebaWcaDispersionForce_setRmino(self, inputValue) def setRminh(self, inputValue): """setRminh(self, inputValue)""" return _openmm.AmoebaWcaDispersionForce_setRminh(self, inputValue) def setAwater(self, inputValue): """setAwater(self, inputValue)""" return _openmm.AmoebaWcaDispersionForce_setAwater(self, inputValue) def setShctd(self, inputValue): """setShctd(self, inputValue)""" return _openmm.AmoebaWcaDispersionForce_setShctd(self, inputValue) def setDispoff(self, inputValue): """setDispoff(self, inputValue)""" return _openmm.AmoebaWcaDispersionForce_setDispoff(self, inputValue) def setSlevy(self, inputValue): """setSlevy(self, inputValue)""" return _openmm.AmoebaWcaDispersionForce_setSlevy(self, inputValue) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if nonbondedMethod uses PBC and false otherwise """ return _openmm.AmoebaWcaDispersionForce_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self) -> AmoebaWcaDispersionForce __init__(self, other) -> AmoebaWcaDispersionForce Create an AmoebaWcaDispersionForce. """ this = _openmm.new_AmoebaWcaDispersionForce(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_AmoebaWcaDispersionForce __del__ = lambda self: None AmoebaWcaDispersionForce_swigregister = _openmm.AmoebaWcaDispersionForce_swigregister AmoebaWcaDispersionForce_swigregister(AmoebaWcaDispersionForce) class Platform(_object): """ A Platform defines an implementation of all the kernels needed to perform some calculation. More precisely, a Platform object acts as a registry for a set of KernelFactory objects which together implement the kernels. The Platform class, in turn, provides a static registry of all available Platform objects. To get a Platform object, call <pre> Platform& platform = Platform::findPlatform(kernelNames); </pre> passing in the names of all kernels that will be required for the calculation you plan to perform. It will return the fastest available Platform which provides implementations of all the specified kernels. You can then call createKernel() to construct particular kernels as needed. """ __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Platform, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Platform, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _openmm.delete_Platform __del__ = lambda self: None def registerPlatform(platform): """ registerPlatform(platform) Register a new Platform. """ if not platform.thisown: s = ("the %s object does not own its corresponding OpenMM object" % self.__class__.__name__) raise Exception(s) val = _openmm.Platform_registerPlatform(platform) platform.thisown=0 return val if _newclass: registerPlatform = staticmethod(registerPlatform) __swig_getmethods__["registerPlatform"] = lambda x: registerPlatform def getNumPlatforms(): """ getNumPlatforms() -> int Get the number of Platforms that have been registered. """ return _openmm.Platform_getNumPlatforms() if _newclass: getNumPlatforms = staticmethod(getNumPlatforms) __swig_getmethods__["getNumPlatforms"] = lambda x: getNumPlatforms def getPlatform(index): """ getPlatform(index) -> Platform Get a registered Platform by index. """ return _openmm.Platform_getPlatform(index) if _newclass: getPlatform = staticmethod(getPlatform) __swig_getmethods__["getPlatform"] = lambda x: getPlatform def getPluginLoadFailures(): """ getPluginLoadFailures() -> vectorstring Get any failures caused during the last call to loadPluginsFromDirectory """ return _openmm.Platform_getPluginLoadFailures() if _newclass: getPluginLoadFailures = staticmethod(getPluginLoadFailures) __swig_getmethods__["getPluginLoadFailures"] = lambda x: getPluginLoadFailures def getPlatformByName(name): """ getPlatformByName(name) -> Platform Get the registered Platform with a particular name. If no Platform with that name has been registered, this throws an exception. """ return _openmm.Platform_getPlatformByName(name) if _newclass: getPlatformByName = staticmethod(getPlatformByName) __swig_getmethods__["getPlatformByName"] = lambda x: getPlatformByName def findPlatform(kernelNames): """ findPlatform(kernelNames) -> Platform Find a Platform which can be used to perform a calculation. Parameters ---------- kernelNames : vector< std::string > the names of all kernels which will be needed for the calculation Returns ------- Platform the fastest registered Platform which supports all of the requested kernels. If no Platform exists which supports all of them, this will throw an exception. """ return _openmm.Platform_findPlatform(kernelNames) if _newclass: findPlatform = staticmethod(findPlatform) __swig_getmethods__["findPlatform"] = lambda x: findPlatform def loadPluginLibrary(file): """ loadPluginLibrary(file) Load a dynamic library (DLL) which contains an OpenMM plugin. Typically, each Platform is distributed as a separate dynamic library. This method can then be called at runtime to load each available library. Each library should contain an initializer function to register any Platforms and KernelFactories that it contains. If the file does not exist or cannot be loaded, an exception is thrown. Parameters ---------- file : string the path to the dynamic library file. This is interpreted using the operating system's rules for loading libraries. Typically it may be either an absolute path or relative to a set of standard locations. """ return _openmm.Platform_loadPluginLibrary(file) if _newclass: loadPluginLibrary = staticmethod(loadPluginLibrary) __swig_getmethods__["loadPluginLibrary"] = lambda x: loadPluginLibrary def loadPluginsFromDirectory(directory): """ loadPluginsFromDirectory(directory) -> vectorstring Load multiple dynamic libraries (DLLs) which contain OpenMM plugins from a single directory. This method loops over every file contained in the specified directory and calls loadPluginLibrary() for each one. If an error occurs while trying to load a particular file, that file is simply ignored. You can retrieve a list of all such errors by calling getPluginLoadFailures(). Parameters ---------- directory : string the path to the directory containing libraries to load Returns ------- vector< std::string > the names of all files which were successfully loaded as libraries """ return _openmm.Platform_loadPluginsFromDirectory(directory) if _newclass: loadPluginsFromDirectory = staticmethod(loadPluginsFromDirectory) __swig_getmethods__["loadPluginsFromDirectory"] = lambda x: loadPluginsFromDirectory def getDefaultPluginsDirectory(): """ getDefaultPluginsDirectory() -> std::string const & Get the default directory from which to load plugins. If the environment variable OPENMM_PLUGIN_DIR is set, this returns its value. Otherwise, it returns a platform specific default location. Returns ------- string the path to the default plugin directory """ return _openmm.Platform_getDefaultPluginsDirectory() if _newclass: getDefaultPluginsDirectory = staticmethod(getDefaultPluginsDirectory) __swig_getmethods__["getDefaultPluginsDirectory"] = lambda x: getDefaultPluginsDirectory def getOpenMMVersion(): """ getOpenMMVersion() -> std::string const & Get a string containing the version number of the OpenMM library. """ return _openmm.Platform_getOpenMMVersion() if _newclass: getOpenMMVersion = staticmethod(getOpenMMVersion) __swig_getmethods__["getOpenMMVersion"] = lambda x: getOpenMMVersion def getName(self): """ getName(self) -> std::string const & Get the name of this platform. This should be a unique identifier which can be used to recognized it. """ return _openmm.Platform_getName(self) def getSpeed(self): """ getSpeed(self) -> double Get an estimate of how fast this Platform class is. This need not be precise. It only is expected to return an order or magnitude estimate of the relative performance of different Platform classes. An unoptimized reference implementation should return 1.0, and all other Platforms should return a larger value that is an estimate of how many times faster they are than the reference implementation. """ return _openmm.Platform_getSpeed(self) def supportsDoublePrecision(self): """ supportsDoublePrecision(self) -> bool Get whether this Platform supports double precision arithmetic. If this returns false, the platform is permitted to represent double precision values internally as single precision. @deprecated This method is not well defined, and is too simplistic to describe the actual behavior of some Platforms, such as ones that offer multiple precision modes. It will be removed in a future release. """ return _openmm.Platform_supportsDoublePrecision(self) def getPropertyNames(self): """ getPropertyNames(self) -> vectorstring Get the names of all Platform-specific properties this Platform supports. """ return _openmm.Platform_getPropertyNames(self) def getPropertyValue(self, context, property): """ getPropertyValue(self, context, property) -> std::string const & Get the value of a Platform-specific property for a Context. Parameters ---------- context : Context the Context for which to get the property property : string the name of the property to get Returns ------- string the value of the property """ return _openmm.Platform_getPropertyValue(self, context, property) def setPropertyValue(self, context, property, value): """ setPropertyValue(self, context, property, value) Set the value of a Platform-specific property for a Context. Parameters ---------- context : Context the Context for which to set the property property : string the name of the property to set value : string the value to set for the property """ return _openmm.Platform_setPropertyValue(self, context, property, value) def getPropertyDefaultValue(self, property): """ getPropertyDefaultValue(self, property) -> std::string const & Get the default value of a Platform-specific property. This is the value that will be used for newly created Contexts. Parameters ---------- property : string the name of the property to get Returns ------- string the default value of the property """ return _openmm.Platform_getPropertyDefaultValue(self, property) def setPropertyDefaultValue(self, property, value): """ setPropertyDefaultValue(self, property, value) Set the default value of a Platform-specific property. This is the value that will be used for newly created Contexts. Parameters ---------- property : string the name of the property to set value : string the value to set for the property """ return _openmm.Platform_setPropertyDefaultValue(self, property, value) def linkedContextCreated(self, context, originalContext): """ linkedContextCreated(self, context, originalContext) This is called whenever a new Context is created using ContextImpl::createLinkedContext(). It gives the Platform a chance to initialize the context and store platform-specific data in it. Parameters ---------- context : ContextImpl the newly created context originalContext : ContextImpl the original context it is linked to """ return _openmm.Platform_linkedContextCreated(self, context, originalContext) def supportsKernels(self, kernelNames): """ supportsKernels(self, kernelNames) -> bool Determine whether this Platforms provides implementations of a set of kernels. Parameters ---------- kernelNames : vector< std::string > the names of the kernels of interests Returns ------- bool true if this Platform provides implementations of all the kernels in the list, false if there are any which it does not support """ return _openmm.Platform_supportsKernels(self, kernelNames) Platform_swigregister = _openmm.Platform_swigregister Platform_swigregister(Platform) def Platform_registerPlatform(platform): """ Platform_registerPlatform(platform) Register a new Platform. """ if not platform.thisown: s = ("the %s object does not own its corresponding OpenMM object" % self.__class__.__name__) raise Exception(s) val = _openmm.Platform_registerPlatform(platform) platform.thisown=0 return val def Platform_getNumPlatforms(): """ Platform_getNumPlatforms() -> int Get the number of Platforms that have been registered. """ return _openmm.Platform_getNumPlatforms() def Platform_getPlatform(index): """ Platform_getPlatform(index) -> Platform Get a registered Platform by index. """ return _openmm.Platform_getPlatform(index) def Platform_getPluginLoadFailures(): """ Platform_getPluginLoadFailures() -> vectorstring Get any failures caused during the last call to loadPluginsFromDirectory """ return _openmm.Platform_getPluginLoadFailures() def Platform_getPlatformByName(name): """ Platform_getPlatformByName(name) -> Platform Get the registered Platform with a particular name. If no Platform with that name has been registered, this throws an exception. """ return _openmm.Platform_getPlatformByName(name) def Platform_findPlatform(kernelNames): """ Platform_findPlatform(kernelNames) -> Platform Find a Platform which can be used to perform a calculation. Parameters ---------- kernelNames : vector< std::string > the names of all kernels which will be needed for the calculation Returns ------- Platform the fastest registered Platform which supports all of the requested kernels. If no Platform exists which supports all of them, this will throw an exception. """ return _openmm.Platform_findPlatform(kernelNames) def Platform_loadPluginLibrary(file): """ Platform_loadPluginLibrary(file) Load a dynamic library (DLL) which contains an OpenMM plugin. Typically, each Platform is distributed as a separate dynamic library. This method can then be called at runtime to load each available library. Each library should contain an initializer function to register any Platforms and KernelFactories that it contains. If the file does not exist or cannot be loaded, an exception is thrown. Parameters ---------- file : string the path to the dynamic library file. This is interpreted using the operating system's rules for loading libraries. Typically it may be either an absolute path or relative to a set of standard locations. """ return _openmm.Platform_loadPluginLibrary(file) def Platform_loadPluginsFromDirectory(directory): """ Platform_loadPluginsFromDirectory(directory) -> vectorstring Load multiple dynamic libraries (DLLs) which contain OpenMM plugins from a single directory. This method loops over every file contained in the specified directory and calls loadPluginLibrary() for each one. If an error occurs while trying to load a particular file, that file is simply ignored. You can retrieve a list of all such errors by calling getPluginLoadFailures(). Parameters ---------- directory : string the path to the directory containing libraries to load Returns ------- vector< std::string > the names of all files which were successfully loaded as libraries """ return _openmm.Platform_loadPluginsFromDirectory(directory) def Platform_getDefaultPluginsDirectory(): """ Platform_getDefaultPluginsDirectory() -> std::string const & Get the default directory from which to load plugins. If the environment variable OPENMM_PLUGIN_DIR is set, this returns its value. Otherwise, it returns a platform specific default location. Returns ------- string the path to the default plugin directory """ return _openmm.Platform_getDefaultPluginsDirectory() def Platform_getOpenMMVersion(): """ Platform_getOpenMMVersion() -> std::string const & Get a string containing the version number of the OpenMM library. """ return _openmm.Platform_getOpenMMVersion() class Continuous3DFunction(TabulatedFunction): """This is a TabulatedFunction that computes a continuous three dimensional function.""" __swig_setmethods__ = {} for _s in [TabulatedFunction]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, Continuous3DFunction, name, value) __swig_getmethods__ = {} for _s in [TabulatedFunction]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, Continuous3DFunction, name) __repr__ = _swig_repr def __init__(self, xsize, ysize, zsize, values, xmin, xmax, ymin, ymax, zmin, zmax): """ __init__(self, xsize, ysize, zsize, values, xmin, xmax, ymin, ymax, zmin, zmax) -> Continuous3DFunction This is a TabulatedFunction that computes a continuous three dimensional function. """ this = _openmm.new_Continuous3DFunction(xsize, ysize, zsize, values, xmin, xmax, ymin, ymax, zmin, zmax) try: self.this.append(this) except Exception: self.this = this def getFunctionParameters(self): """getFunctionParameters(self)""" return _openmm.Continuous3DFunction_getFunctionParameters(self) def setFunctionParameters(self, xsize, ysize, zsize, values, xmin, xmax, ymin, ymax, zmin, zmax): """setFunctionParameters(self, xsize, ysize, zsize, values, xmin, xmax, ymin, ymax, zmin, zmax)""" return _openmm.Continuous3DFunction_setFunctionParameters(self, xsize, ysize, zsize, values, xmin, xmax, ymin, ymax, zmin, zmax) def Copy(self): """ Copy(self) -> Continuous3DFunction @deprecated This will be removed in a future release. """ return _openmm.Continuous3DFunction_Copy(self) __swig_destroy__ = _openmm.delete_Continuous3DFunction __del__ = lambda self: None Continuous3DFunction_swigregister = _openmm.Continuous3DFunction_swigregister Continuous3DFunction_swigregister(Continuous3DFunction) class MonteCarloMembraneBarostat(Force): """ This is a Monte Carlo barostat designed specifically for membrane simulations. It assumes the membrane lies in the XY plane. The Monte Carlo acceptance criterion includes a term to model isotropic pressure, which depends on the volume of the periodic box, and a second term to model surface tension, which depends on the cross sectional area of the box in the XY plane. Note that pressure and surface tension are defined with opposite senses: a larger pressure tends to make the box smaller, but a larger surface tension tends to make the box larger. There are options for configuring exactly how the various box dimensions are allowed to change: - The X and Y axes may be treated isotropically, in which case they always scale by the same amount and remain in proportion to each other; or they may be treated anisotropically, in which case they can vary independently of each other. - The Z axis can be allowed to vary independently of the other axes; or held fixed; or constrained to vary in inverse proportion to the other two axes, so that the total box volume remains fixed. This class assumes the simulation is also being run at constant temperature, and requires you to specify the system temperature (since it affects the acceptance probability for Monte Carlo moves). It does not actually perform temperature regulation, however. You must use another mechanism along with it to maintain the temperature, such as LangevinIntegrator or AndersenThermostat. """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, MonteCarloMembraneBarostat, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, MonteCarloMembraneBarostat, name) __repr__ = _swig_repr XYIsotropic = _openmm.MonteCarloMembraneBarostat_XYIsotropic XYAnisotropic = _openmm.MonteCarloMembraneBarostat_XYAnisotropic ZFree = _openmm.MonteCarloMembraneBarostat_ZFree ZFixed = _openmm.MonteCarloMembraneBarostat_ZFixed ConstantVolume = _openmm.MonteCarloMembraneBarostat_ConstantVolume def Pressure(): """ Pressure() -> std::string const & This is the name of the parameter which stores the current pressure acting on the system (in bar). """ return _openmm.MonteCarloMembraneBarostat_Pressure() if _newclass: Pressure = staticmethod(Pressure) __swig_getmethods__["Pressure"] = lambda x: Pressure def SurfaceTension(): """ SurfaceTension() -> std::string const & This is the name of the parameter which stores the current surface tension acting on the system (in bar*nm). """ return _openmm.MonteCarloMembraneBarostat_SurfaceTension() if _newclass: SurfaceTension = staticmethod(SurfaceTension) __swig_getmethods__["SurfaceTension"] = lambda x: SurfaceTension def Temperature(): """ Temperature() -> std::string const & This is the name of the parameter which stores the current temperature at which the system is being maintained (in Kelvin) """ return _openmm.MonteCarloMembraneBarostat_Temperature() if _newclass: Temperature = staticmethod(Temperature) __swig_getmethods__["Temperature"] = lambda x: Temperature def getDefaultPressure(self): """ getDefaultPressure(self) -> double Get the default pressure acting on the system (in bar). Returns ------- double the default pressure acting on the system, measured in bar. """ val = _openmm.MonteCarloMembraneBarostat_getDefaultPressure(self) val=unit.Quantity(val, unit.bar) return val def setDefaultPressure(self, pressure): """ setDefaultPressure(self, pressure) Set the default pressure acting on the system. This will affect any new Contexts you create, but not ones that already exist. Parameters ---------- pressure : double the default pressure acting on the system, measured in bar. """ return _openmm.MonteCarloMembraneBarostat_setDefaultPressure(self, pressure) def getDefaultSurfaceTension(self): """ getDefaultSurfaceTension(self) -> double Get the default surface tension acting on the system (in bar*nm). Returns ------- double the default surface tension acting on the system, measured in bar*nm. """ val = _openmm.MonteCarloMembraneBarostat_getDefaultSurfaceTension(self) val=unit.Quantity(val, unit.bar*unit.nanometer) return val def setDefaultSurfaceTension(self, surfaceTension): """ setDefaultSurfaceTension(self, surfaceTension) Set the default surface tension acting on the system. This will affect any new Contexts you create, but not ones that already exist. Parameters ---------- surfaceTension : double the default surface tension acting on the system, measured in bar. """ return _openmm.MonteCarloMembraneBarostat_setDefaultSurfaceTension(self, surfaceTension) def getFrequency(self): """ getFrequency(self) -> int Get the frequency (in time steps) at which Monte Carlo volume changes should be attempted. If this is set to 0, the barostat is disabled. """ return _openmm.MonteCarloMembraneBarostat_getFrequency(self) def setFrequency(self, freq): """ setFrequency(self, freq) Set the frequency (in time steps) at which Monte Carlo volume changes should be attempted. If this is set to 0, the barostat is disabled. """ return _openmm.MonteCarloMembraneBarostat_setFrequency(self, freq) def getDefaultTemperature(self): """ getDefaultTemperature(self) -> double Get the default temperature at which the system is being maintained, measured in Kelvin. """ val = _openmm.MonteCarloMembraneBarostat_getDefaultTemperature(self) val=unit.Quantity(val, unit.kelvin) return val def setDefaultTemperature(self, temp): """ setDefaultTemperature(self, temp) Set the default temperature at which the system is being maintained. This will affect any new Contexts you create, but not ones that already exist. Parameters ---------- temp : double the system temperature, measured in Kelvin. """ return _openmm.MonteCarloMembraneBarostat_setDefaultTemperature(self, temp) def getXYMode(self): """ getXYMode(self) -> OpenMM::MonteCarloMembraneBarostat::XYMode Get the mode specifying the behavior of the X and Y axes. """ return _openmm.MonteCarloMembraneBarostat_getXYMode(self) def setXYMode(self, mode): """ setXYMode(self, mode) Set the mode specifying the behavior of the X and Y axes. """ return _openmm.MonteCarloMembraneBarostat_setXYMode(self, mode) def getZMode(self): """ getZMode(self) -> OpenMM::MonteCarloMembraneBarostat::ZMode Get the mode specifying the behavior of the Z axis. """ return _openmm.MonteCarloMembraneBarostat_getZMode(self) def setZMode(self, mode): """ setZMode(self, mode) Set the mode specifying the behavior of the Z axis. """ return _openmm.MonteCarloMembraneBarostat_setZMode(self, mode) def getRandomNumberSeed(self): """ getRandomNumberSeed(self) -> int Get the random number seed. See setRandomNumberSeed() for details. """ return _openmm.MonteCarloMembraneBarostat_getRandomNumberSeed(self) def setRandomNumberSeed(self, seed): """ setRandomNumberSeed(self, seed) Set the random number seed. It is guaranteed that if two simulations are run with different random number seeds, the sequence of Monte Carlo steps will be different. On the other hand, no guarantees are made about the behavior of simulations that use the same seed. In particular, Platforms are permitted to use non-deterministic algorithms which produce different results on successive runs, even if those runs were initialized identically. If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context is created from this Force. This is done to ensure that each Context receives unique random seeds without you needing to set them explicitly. """ return _openmm.MonteCarloMembraneBarostat_setRandomNumberSeed(self, seed) def usesPeriodicBoundaryConditions(self): """ usesPeriodicBoundaryConditions(self) -> bool Returns whether or not this force makes use of periodic boundary conditions. Returns ------- bool true if force uses PBC and false otherwise """ return _openmm.MonteCarloMembraneBarostat_usesPeriodicBoundaryConditions(self) def __init__(self, *args): """ __init__(self, defaultPressure, defaultSurfaceTension, defaultTemperature, xymode, zmode, frequency=25) -> MonteCarloMembraneBarostat __init__(self, defaultPressure, defaultSurfaceTension, defaultTemperature, xymode, zmode) -> MonteCarloMembraneBarostat __init__(self, other) -> MonteCarloMembraneBarostat Create a MonteCarloMembraneBarostat. Parameters ---------- defaultPressure : double the default pressure acting on the system (in bar) defaultSurfaceTension : double the default surface tension acting on the system (in bar*nm) defaultTemperature : double the default temperature at which the system is being maintained (in Kelvin) xymode : XYMode the mode specifying the behavior of the X and Y axes zmode : ZMode the mode specifying the behavior of the Z axis frequency : int the frequency at which Monte Carlo volume changes should be attempted (in time steps) """ this = _openmm.new_MonteCarloMembraneBarostat(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _openmm.delete_MonteCarloMembraneBarostat __del__ = lambda self: None MonteCarloMembraneBarostat_swigregister = _openmm.MonteCarloMembraneBarostat_swigregister MonteCarloMembraneBarostat_swigregister(MonteCarloMembraneBarostat) def MonteCarloMembraneBarostat_Pressure(): """ MonteCarloMembraneBarostat_Pressure() -> std::string const & This is the name of the parameter which stores the current pressure acting on the system (in bar). """ return _openmm.MonteCarloMembraneBarostat_Pressure() def MonteCarloMembraneBarostat_SurfaceTension(): """ MonteCarloMembraneBarostat_SurfaceTension() -> std::string const & This is the name of the parameter which stores the current surface tension acting on the system (in bar*nm). """ return _openmm.MonteCarloMembraneBarostat_SurfaceTension() def MonteCarloMembraneBarostat_Temperature(): """ MonteCarloMembraneBarostat_Temperature() -> std::string const & This is the name of the parameter which stores the current temperature at which the system is being maintained (in Kelvin) """ return _openmm.MonteCarloMembraneBarostat_Temperature() class CustomCentroidBondForce(Force): """ This class is similar to CustomCompoundBondForce, but instead of applying forces between individual particles, it applies them between the centers of groups of particles. This is useful for a variety of purposes, such as restraints to keep two molecules from moving too far apart. When using this class, you define groups of particles, and the center of each group is calculated as a weighted average of the particle positions. By default, the particle masses are used as weights, so the center position is the center of mass. You can optionally specify different weights to use. You then add bonds just as with CustomCompoundBondForce, but instead of specifying the particles that make up a bond, you specify the groups. When creating a CustomCentroidBondForce, you specify the number of groups involved in a bond, and an expression for the energy of each bond. It may depend on the center positions of individual groups, the distances between the centers of pairs of groups, the angles formed by sets of three groups, and the dihedral angles formed by sets of four groups. We refer to the groups in a bond as g1, g2, g3, etc. For each bond, CustomCentroidBondForce evaluates a user supplied algebraic expression to determine the interaction energy. The expression may depend on the following variables and functions: - x1, y1, z1, x2, y2, z2, etc.: The x, y, and z coordinates of the centers of the groups. For example, x1 is the x coordinate of the center of group g1, and y3 is the y coordinate of the center of group g3. - distance(g1, g2): the distance between the centers of groups g1 and g2 (where "g1" and "g2" may be replaced by the names of whichever groups you want to calculate the distance between). - angle(g1, g2, g3): the angle formed by the centers of the three specified groups. - dihedral(g1, g2, g3, g4): the dihedral angle formed by the centers of the four specified groups. The expression also may involve tabulated functions, and may depend on arbitrary global and per-bond parameters. To use this class, create a CustomCentroidBondForce object, passing an algebraic expression to the constructor that defines the interaction energy of each bond. Then call addPerBondParameter() to define per-bond parameters and addGlobalParameter() to define global parameters. The values of per-bond parameters are specified as part of the system definition, while values of global parameters may be modified during a simulation by calling Context::setParameter(). Next call addGroup() to define the particle groups. Each group is specified by the particles it contains, and the weights to use when computing the center position. Then call addBond() to define bonds and specify their parameter values. After a bond has been added, you can modify its parameters by calling setBondParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext(). As an example, the following code creates a CustomCentroidBondForce that implements a harmonic force between the centers of mass of two groups of particles. <tt><pre> CustomCentroidBondForce* force = new CustomCentroidBondForce(2, "0.5*k*distance(g1,g2)^2"); force->addPerBondParameter("k"); force->addGroup(particles1); force->addGroup(particles2); vector<int> bondGroups; bondGroups.push_back(0); bondGroups.push_back(1); vector<double> bondParameters; bondParameters.push_back(k); force->addBond(bondGroups, bondParameters); </pre></tt> This class also has the ability to compute derivatives of the potential energy with respect to global parameters. Call addEnergyParameterDerivative() to request that the derivative with respect to a particular parameter be computed. You can then query its value in a Context by calling getState() on it. Expressions may involve the operators + (add), - (subtract), * (multiply), / (divide), and ^ (power), and the following functions: sqrt, exp, log, sin, cos, sec, csc, tan, cot, asin, acos, atan, sinh, cosh, tanh, erf, erfc, min, max, abs, floor, ceil, step, delta, select. All trigonometric functions are defined in radians, and log is the natural logarithm. step(x) = 0 if x is less than 0, 1 otherwise. delta(x) = 1 if x is 0, 0 otherwise. select(x,y,z) = z if x = 0, y otherwise. In addition, you can call addTabulatedFunction() to define a new function based on tabulated values. You specify the function by creating a TabulatedFunction object. That function can then appear in the expression. """ __swig_setmethods__ = {} for _s in [Force]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, CustomCentroidBondForce, name, value) __swig_getmethods__ = {} for _s in [Force]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, CustomCentroidBondForce, name) __repr__ = _swig_repr __swig_destroy__ = _openmm.delete_CustomCentroidBondForce __del__ = lambda self: None def getNumGroupsPerBond(self): """ getNumGroupsPerBond(self) -> int Get the number of groups used to define each bond. """ return _openmm.CustomCentroidBondForce_getNumGroupsPerBond(self) def getNumGroups(self): """ getNumGroups(self) -> int Get the number of particle groups that have been defined. """ return _openmm.CustomCentroidBondForce_getNumGroups(self) def getNumBonds(self): """ getNumBonds(self) -