Structure#

The structure module represents atomic structures in accordance with the Protein Data Bank (PDB) specification, ensuring standardized handling of molecular data.

Constructor#

Structure

Represents atomic structures per the Protein Data Bank (PDB) specification.

Attributes and underlying data#

Structure.record_type

Array of record types, e.g., ATOM (n,)

Structure.atom_serial_number

Array of serial numbers (n,)

Structure.atom_name

Array of atom names (n,)

Structure.atom_coordinate

Array of x,y,z atom coordinates (n, d)

Structure.alternate_location_indicator

Array of alternate location indices (n,)

Structure.residue_name

Array of residue names (n,)

Structure.chain_identifier

Array of chain identifiers (n,)

Structure.residue_sequence_number

Array of residue ids (n,)

Structure.code_for_residue_insertion

Array of insertion information (n,)

Structure.occupancy

Array of occupancy factors (n,)

Structure.temperature_factor

Array of B-factors (n,)

Structure.segment_identifier

Array of segment identifiers (n,)

Structure.element_symbol

Array of element symbols (n,)

Structure.charge

Array of charges (n,)

Structure.metadata

Metadata dictionary

Serialization#

Structure.to_file(filename)

Writes the Structure instance to disk.

Structure.from_file(filename[, ...])

Reads an atomic structure file and into a Structure instance.

Conversion#

Structure.to_volume([shape, sampling_rate, ...])

Maps class instance to a volume.

Subsetting#

Structure.copy()

Returns a copy of the Structure instance.

Structure.subset_by_chain([chain])

Return a subset of the structure that contains only atoms belonging to a specific chain.

Structure.subset_by_range(start, stop[, chain])

Return a subset of the structure within a specific range of residues.

Computations#

Structure.rigid_transform([rotation_matrix, ...])

Performs a rigid transform of internal structure coordinates.

Structure.align_structures(structure1, ...)

Align structure2 to structure1 using the Kabsch Algorithm.

Structure.compare_structures(structure1, ...)

Compute root mean square deviation (RMSD) between two structures with the same number of atoms.

Structure.center_of_mass([weight_type])

Calculate the center of mass of the structure.