ThermodynamicState

class propertyestimator.thermodynamics.ThermodynamicState(temperature=None, pressure=None)[source]

Data specifying a physical thermodynamic state obeying Boltzmann statistics.

temperature

The external temperature

Type

propertyestimator.unit.Quantity with units compatible with kelvin

pressure

The external pressure

Type

propertyestimator.unit.Quantity with units compatible with atmospheres

Examples

Specify an NPT state at 298 K and 1 atm pressure.

>>> state = ThermodynamicState(temperature=298.0*unit.kelvin, pressure=1.0*unit.atmospheres)

Note that the pressure is only relevant for periodic systems.

__init__(temperature=None, pressure=None)[source]

Constructs a new ThermodynamicState object.

Parameters
  • temperature (propertyestimator.unit.Quantity with units compatible with kelvin) – The external temperature

  • pressure (propertyestimator.unit.Quantity with units compatible with atmospheres) – The external pressure

Methods

__init__([temperature, pressure])

Constructs a new ThermodynamicState 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

beta

Returns one divided by the temperature multiplied by the molar gas constant

inverse_beta

Returns the temperature multiplied by the molar gas constant

property inverse_beta

Returns the temperature multiplied by the molar gas constant

property beta

Returns one divided by the temperature multiplied by the molar gas constant

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