PDB - read and write pdb format

espressopp.tools.pdbwrite(filename, system, molsize=4, append=False, typenames=None)

Writes a file in PDB format

  • filename (string) – output file name
  • system (espressopp System object) – espressopp system
  • molsize (int) – if molsize>0, the molecule count is increased every molsize particles (default 4)
  • append (bool) – if True, append to filename, other over-write filename (default False)
  • typenames (dict, key=int, value=string) – dictionary used for mapping from espressopp’s integer particle types to the particle type strings written in a pdb file
espressopp.tools.pdbread(filename, natoms, header)

Reads one frame of a pdb format file

  • filename (string) – input file name
  • natoms (int) – number of atoms in pdf file
  • header (int) – number of header lines to skip at start of file

Returns: index,atomname,resname,resid,x,y,z,alpha,beta,segid,element (lists of type int,str,str,int,float,float,float,float,float,str,str)