TLeapForceFieldSource

class propertyestimator.forcefield.TLeapForceFieldSource(leap_source='leaprc.gaff2', cutoff=<Quantity(9.0, 'angstrom')>)[source]

A wrapper around Amber force fields which may be applied via the tleap software package.

Notes

Currently this only supports force fields which are installed alongside tleap.

__init__(leap_source='leaprc.gaff2', cutoff=<Quantity(9.0, 'angstrom')>)[source]

Constructs a new TLeapForceFieldSource object

Parameters
  • leap_source (str) – The parameter file which should be sourced by leap when applying the force field. Currently only ‘leaprc.gaff’ and ‘leaprc.gaff2’ are supported.

  • cutoff (unit.Quantity) – The non-bonded interaction cutoff.

Examples

To create a source for the GAFF force field with tip3p water:

>>> amber_gaff_source = TLeapForceFieldSource('leaprc.gaff')

To create a source for the GAFF 2 force field with tip3p water:

>>> amber_gaff_2_source = TLeapForceFieldSource('leaprc.gaff2')

Methods

__init__([leap_source, cutoff])

Constructs a new TLeapForceFieldSource object

json()

Creates a JSON representation of this class.

parse_json(string_contents[, encoding])

Parses a typed json string into the corresponding class structure.

Attributes

cutoff

The non-bonded interaction cutoff.

leap_source

The parameter file which should be sourced by leap when applying the force field.

property leap_source

The parameter file which should be sourced by leap when applying the force field.

Type

list of str

property cutoff

The non-bonded interaction cutoff.

Type

unit.Quantity

json()

Creates a JSON representation of this class.

Returns

The JSON representation of this class.

Return type

str

classmethod parse_json(string_contents, encoding='utf8')

Parses a typed json string into the corresponding class structure.

Parameters
  • string_contents (str or bytes) – The typed json string.

  • encoding (str) – The encoding of the string_contents.

Returns

The parsed class.

Return type

Any