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.

Structure.atom_serial_number

Array of serial numbers.

Structure.atom_name

Array of atom names.

Structure.atom_coordinate

Array of x,y,z atom coordinates.

Structure.alternate_location_indicator

Array of alternate location indices.

Structure.residue_name

Array of residue names.

Structure.chain_identifier

Array of chain identifiers.

Structure.residue_sequence_number

Array of residue ids.

Structure.code_for_residue_insertion

Array of insertion information.

Structure.occupancy

Array of occupancy factors.

Structure.temperature_factor

Array of B-factors.

Structure.segment_identifier

Array of segment identifiers.

Structure.element_symbol

Array of element symbols.

Structure.charge

Array of charges.

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()

Calculate the center of mass of the structure.

Structure.centered()

Shifts the structure analogous to tme.density.Density.centered().