protex.residue.Residue

class protex.residue.Residue(residue, alternativ_name, system, inital_parameters, alternativ_parameters, has_equivalent_atoms, force_idxs={})[source]

Bases: object

Residue extends the OpenMM Residue Class by important features needed for the proton transfer.

Parameters:
  • residue (openmm.app.topology.Residue) – The residue from an OpenMM Topology

  • alternativ_name (str) – The name of the corresponding protonated/deprotonated form (eg. OAC for HOAC)

  • system (openmm.openmm.System) – The system generated with openMM, where all residues are in

  • initial_parameters (dict[list]) – The parameters for the residue

  • alternativ_parameters (dict[list]) – The parameters for the alternativ (protonated/deprotonated) state

  • force_idxs

  • has_equivalent_atoms (tuple[bool,bool]) – if original name and alternative name have equivalent atoms

Variables:
  • residue (openmm.app.topology.Residue) – The residue from an OpenMM Topology

  • original_name (str) – The name of the residue given by the OpenMM Residue, will not change throughout the simulation(?)

  • current_name (str) – The current name of the residue, depending on the protonation state

  • atom_idxs (list[int]) – List of all atom indices belonging to that residue

  • list[str] (atom_names;) – List of all atom names belonging to that residue

  • parameters (dict[str: dict[list]]) – Dictionary containnig the parameters for original_name and alternativ_name

  • record_charge_state (list) – deprecated 1.1? Records the charge state of that residue

  • system (openmm.openmm.System) – The system generated with openMM, where all residues are in

  • equivalent_atoms (dict[str, bool]) – if orignal_name and alternative name have equivalent atoms

  • force_idxs

Methods

get_idx_for_atom_name

update

Update the requested force in that residue.

Attributes

alternativ_name

Alternative name for the residue, e.g.

current_charge

Current charge of the residue.

endstate_charge

Charge of the residue at the endstate (will be int).

has_equivalent_atom

Determines if the current residue has an equivalent atom defined.

property alternativ_name: str

Alternative name for the residue, e.g. the corresponding name for the protonated/deprotonated form.

Returns:

The alternative name

Return type:

str

property current_charge: int

Current charge of the residue.

property endstate_charge: int

Charge of the residue at the endstate (will be int).

property has_equivalent_atom: bool

Determines if the current residue has an equivalent atom defined.

It depends i.e if the residue is currently OAC (-> two equivalent O’s) or HOAC (no equivlent O’s).

Returns:

True if this residue currently has an equivalent atom, else otherwise

Return type:

bool

update(force_name: str, lamb: float) None[source]

Update the requested force in that residue.

Parameters:
  • force_name (str) – Name of the force to update

  • lamb (float) – lambda state at which to get corresponding values (between 0 and 1)

Return type:

None