meld.system.pdb_writer.PDBWriter

class meld.system.pdb_writer.PDBWriter(atom_numbers, atom_names, residue_numbers, residue_names)[source]

Bases: object

Convert states into PDB format

__init__(atom_numbers, atom_names, residue_numbers, residue_names)[source]

Initialize a PDBWriter

Parameters
  • atom_numbers (List[int]) – number for each atom

  • atom_names (List[str]) – name for each atom

  • residue_numbers (List[int]) – residue number for each atom

  • residue_names (List[str]) – residue name for each atom

Methods

__init__(atom_numbers, atom_names, ...)

Initialize a PDBWriter

get_pdb_string(coordinates, stage)

Get pdb representation for coordinates

get_pdb_string(coordinates, stage)[source]

Get pdb representation for coordinates

Parameters
  • coordinates (ndarray) – n_atoms x 3 array

  • stage (int) – stage number to record in pdb

Return type

str

Returns

string representation in pdb format