python_pdb.formats.pandas module

Formatting for pandas formated structures.

The pandas dataframe should have the following columns to represent a PDB structure:

  • record_type

  • atom_number

  • atom_name

  • alt_loc

  • residue_name

  • chain_id

  • residue_seq_id

  • residue_insert_code

  • pos_x

  • pos_y

  • pos_z

  • occupancy

  • b_factor

  • element

  • charge

and optionaly model_index if there are multiple models.

python_pdb.formats.pandas.generate_records_from_pandas(df: DataFrame) Generator[Type[Record], None, None]

Generate pdb record from a pandas dataframe representation.