parmed.utils.pandautils module

A collection of utilities for use with Pandas objects

parmed.utils.pandautils.create_dataframe(obj)[source]

Creates a pandas.DataFrame object from the current instance

Returns
dataframepandas.DataFrame

Notes

The DataFrame will be over all atoms. The columns will be the attributes of the atom (as well as its containing residue). Some columns will always exist. Others will only exist if those attributes have been set on the Atom instances (see the Atom docs for possible attributes and their meaning). The columns that will always be present are:

  • number : int

  • name : str

  • type : str

  • atomic_number : int

  • charge : float

  • mass : float

  • nb_idx : int

  • solvent_radius : float

  • screen : float

  • occupancy : float

  • bfactor : float

  • altloc : str

  • tree : str

  • join : int

  • irotat : int

  • rmin : float

  • epsilon : float

  • rmin_14 : float

  • epsilon_14 : float

  • resname : str (name of the containing residue)

  • resid : int (Sequential index of the containing residue)

  • resnum : int (original residue number in the input structure)

  • chain : str (chain ID that the containing residue belongs to)

The following attributes are optionally present if they were present in the original file defining the structure:

  • xx : float (x-coordinate position)

  • xy : float (y-coordinate position)

  • xz : float (z-coordinate position)

  • vx : float (x-coordinate velocity)

  • vy : float (y-coordinate velocity)

  • vz : float (z-coordinate velocity)

  • type_idx : int (integer type index for AMOEBA)

  • class_idx : int (integer class type index for AMOEBA)

  • multipole_111 : float (Monopole)

  • multipole_211 : float (1,1 Dipole component)

  • multipole_212 : float (1,2 Dipole component)

  • multipole_222 : float (2,2 Dipole component)

  • multipole_411 : float (1,1 Quadrupole component)

  • multipole_412 : float (1,2 Quadrupole component)

  • multipole_422 : float (2,2 Quadrupole component)

  • multipole_413 : float (1,3 Quadrupole component)

  • multipole_423 : float (2,3 Quadrupole component)

  • multipole_433 : float (3,3 Quadrupole component)

  • polarizability : float (dipole polarizability)

  • vdw_parent : int (index of the vdW parent atom of this atom)

  • U11 : float (U[1][1] of anisotropic b-factor tensor)

  • U22 : float (U[2][2] of anisotropic b-factor tensor)

  • U33 : float (U[3][3] of anisotropic b-factor tensor)

  • U12 : float (U[1][2] of anisotropic b-factor tensor)

  • U13 : float (U[1][3] of anisotropic b-factor tensor)

  • U23 : float (U[2][3] of anisotropic b-factor tensor)

parmed.utils.pandautils.load_dataframe(obj, dataframe)[source]

Loads a DataFrame into the current object, setting atomic properties based on the entries of the DataFrame. Supported atomic properties are:

  • number : int

  • name : str

  • type : str

  • atomic_number : int

  • charge : float

  • mass : float

  • nb_idx : int

  • solvent_radius : float

  • screen : float

  • occupancy : float

  • bfactor : float

  • altloc : str

  • tree : str

  • join : int

  • irotat : int

  • rmin : float

  • epsilon : float

  • rmin_14 : float

  • epsilon_14 : float

  • xx : float (x-coordinate position)

  • xy : float (y-coordinate position)

  • xz : float (z-coordinate position)

  • vx : float (x-coordinate velocity)

  • vy : float (y-coordinate velocity)

  • vz : float (z-coordinate velocity)

  • type_idx : int (integer type index for AMOEBA)

  • class_idx : int (integer class type index for AMOEBA)

  • multipole_111 : float (Monopole)

  • multipole_211 : float (1,1 Dipole component)

  • multipole_212 : float (1,2 Dipole component)

  • multipole_222 : float (2,2 Dipole component)

  • multipole_411 : float (1,1 Quadrupole component)

  • multipole_412 : float (1,2 Quadrupole component)

  • multipole_422 : float (2,2 Quadrupole component)

  • multipole_413 : float (1,3 Quadrupole component)

  • multipole_423 : float (2,3 Quadrupole component)

  • multipole_433 : float (3,3 Quadrupole component)

  • polarizability : float (dipole polarizability)

  • vdw_parent : int (index of the vdW parent atom of this atom)

  • segid : segment ID (similar to chain, but for CHARMM)

  • U11 : float (U[1][1] of anisotropic b-factor tensor)

  • U22 : float (U[2][2] of anisotropic b-factor tensor)

  • U33 : float (U[3][3] of anisotropic b-factor tensor)

  • U12 : float (U[1][2] of anisotropic b-factor tensor)

  • U13 : float (U[1][3] of anisotropic b-factor tensor)

  • U23 : float (U[2][3] of anisotropic b-factor tensor)

The resname, resid, chain, and resnum attributes are ignored. Other attributes emit a ParameterWarning