biotite.structure.io.pdb.get_symmetry_mates

biotite.structure.io.pdb.get_symmetry_mates(pdb_file, model=None, altloc='first', extra_fields=[], include_bonds=False)[source]

Build a structure model containing all symmetric copies of the structure within a single unit cell, given by the space group.

This function receives the data from REMARK 290 records in the file. Consequently, this remark must be present in the file, which is usually only true for crystal structures.

Parameters
pdb_filePDBFile

The file object.

modelint, optional

If this parameter is given, the function will return an AtomArray from the atoms corresponding to the given model number (starting at 1). Negative values are used to index models starting from the last model instead of the first model. If this parameter is omitted, an AtomArrayStack containing all models will be returned, even if the structure contains only one model.

altloc{‘first’, ‘occupancy’, ‘all’}
This parameter defines how altloc IDs are handled:
  • 'first' - Use atoms that have the first

    altloc ID appearing in a residue.

  • 'occupancy' - Use atoms that have the altloc ID

    with the highest occupancy for a residue.

  • 'all' - Use all atoms.

    Note that this leads to duplicate atoms. When this option is chosen, the altloc_id annotation array is added to the returned structure.

extra_fieldslist of str, optional

The strings in the list are optional annotation categories that should be stored in the output array or stack. These are valid values: 'atom_id', 'b_factor', 'occupancy' and 'charge'.

include_bondsbool, optional

If set to true, a BondList will be created for the resulting AtomArray containing the bond information from the file. Bonds, whose order could not be determined from the Chemical Component Dictionary (e.g. especially inter-residue bonds), have BondType.ANY, since the PDB format itself does not support bond orders.

Returns
symmetry_matesAtomArray or AtomArrayStack

All atoms within a single unit cell. The return type depends on the model parameter.

Notes

To expand the structure beyond a single unit cell, use repeat_box() with the return value as its input.

Examples

>>> import os.path
>>> file = PDBFile.read(os.path.join(path_to_structures, "1aki.pdb"))
>>> atoms_in_unit_cell = get_symmetry_mates(file, model=1)