[−][src]Struct pdbtbx::PDB
A PDB file containing the 3D coordinates of many atoms making up the 3D structure of a protein, but it can also be used for other molecules.
Implementations
impl PDB
[src]
pub fn new() -> PDB
[src]
Create an empty PDB struct
pub fn remark_count(&self) -> usize
[src]
Get the number of REMARK records in the PDB file
pub fn remarks(&self) -> impl DoubleEndedIterator<Item = &(usize, String)> + '_
[src]
Get the remarks, containing the remark-type-number and a line of free text
pub fn remarks_mut(
&mut self
) -> impl DoubleEndedIterator<Item = &mut (usize, String)> + '_
[src]
&mut self
) -> impl DoubleEndedIterator<Item = &mut (usize, String)> + '_
Get the remarks as mutable references, containing the remark-type-number and a line of free text
pub fn add_remark(&mut self, remark_type: usize, remark_text: String)
[src]
Add a remark
Arguments
remark_type
- the remark-type-numberremark_text
- the free line of text, containing the actual remark
Panics
It panics if the text if too long, the text contains invalid characters or the remark-type-number is not valid (wwPDB v3.30).
pub fn has_scale(&self) -> bool
[src]
Returns true
if the PDB has a Scale
pub fn scale(&self) -> &Scale
[src]
pub fn scale_mut(&mut self) -> &mut Scale
[src]
pub fn set_scale(&mut self, scale: Scale)
[src]
Set the Scale fro this PDB
pub fn has_origx(&self) -> bool
[src]
Returns true
if the PDB has an OrigX
pub fn origx(&self) -> &OrigX
[src]
pub fn origx_mut(&mut self) -> &mut OrigX
[src]
pub fn set_origx(&mut self, origx: OrigX)
[src]
Set the OrigX fro this PDB
pub fn mtrix(&self) -> impl DoubleEndedIterator<Item = &MtriX> + '_
[src]
Get the MtriX records for this PDB
pub fn mtrix_mut(&mut self) -> impl DoubleEndedIterator<Item = &mut MtriX> + '_
[src]
Get the MtriX records for this PDB, as mutable references
pub fn get_mtrix(&self, index: usize) -> Option<&MtriX>
[src]
Get a specific MtriX.
Arguments
index
- the index of the MtriX to return
Fails
It fails when the index is out of bounds.
pub fn get_mtrix_mut(&mut self, index: usize) -> Option<&mut MtriX>
[src]
Get a specific MtriX as a mutable reference.
Arguments
index
- the index of the MtriX to return
Fails
It fails when the index is out of bounds.
pub fn add_mtrix(&mut self, mtrix: MtriX)
[src]
Add a MtriX to this PDB
pub fn has_unit_cell(&self) -> bool
[src]
Returns true
if the PDB has a UnitCell
pub fn unit_cell(&self) -> &UnitCell
[src]
pub fn unit_cell_mut(&mut self) -> &mut UnitCell
[src]
pub fn set_unit_cell(&mut self, cell: UnitCell)
[src]
Set the UnitCell fro this PDB
pub fn has_symmetry(&self) -> bool
[src]
Returns true
if the PDB has a Symmetry
pub fn symmetry(&self) -> &Symmetry
[src]
pub fn symmetry_mut(&mut self) -> &mut Symmetry
[src]
pub fn set_symmetry(&mut self, symmetry: Symmetry)
[src]
Set the Symmetry fro this PDB
pub fn add_model(&mut self, new_model: Model)
[src]
Adds a Model to this PDB
pub fn model_count(&self) -> usize
[src]
Get the amount of Models making up this PDB
pub fn chain_count(&self) -> usize
[src]
Get the amount of Chains making up this PDB. Disregarding Hetero Chains.
pub fn residue_count(&self) -> usize
[src]
Get the amount of Residues making up this PDB. Disregarding Hetero Residues.
pub fn atom_count(&self) -> usize
[src]
Get the amount of Atoms making up this PDB. Disregarding Hetero Atoms.
pub fn total_chain_count(&self) -> usize
[src]
Get the amount of Chains making up this PDB. Including Hetero Chains.
pub fn total_residue_count(&self) -> usize
[src]
Get the amount of Residues making up this PDB. Including Hetero Residues.
pub fn total_atom_count(&self) -> usize
[src]
Get the amount of Atoms making up this PDB. Including Hetero Atoms.
pub fn model(&self, index: usize) -> Option<&Model>
[src]
Get a specific Model from list of Models making up this PDB.
Arguments
index
- the index of the Model
Fails
It fails when the index is outside bounds.
pub fn model_mut(&mut self, index: usize) -> Option<&mut Model>
[src]
Get a specific Model as a mutable reference from list of Models making up this PDB.
Arguments
index
- the index of the Model
Fails
It fails when the index is outside bounds.
pub fn chain(&self, index: usize) -> Option<&Chain>
[src]
Get a specific Chain from the Chains making up this PDB. Including Hetero Atoms.
Arguments
index
- the index of the Chain
Fails
It fails when the index is outside bounds.
pub fn chain_mut(&mut self, index: usize) -> Option<&mut Chain>
[src]
Get a specific Chain as a mutable reference from the Chains making up this PDB. Including Hetero Atoms.
Arguments
index
- the index of the Chain
Fails
It fails when the index is outside bounds.
pub fn residue(&self, index: usize) -> Option<&Residue>
[src]
Get a specific Residue from the Residues making up this PDB. Including Hetero Atoms.
Arguments
index
- the index of the Residue
Fails
It fails when the index is outside bounds.
pub fn residue_mut(&mut self, index: usize) -> Option<&mut Residue>
[src]
Get a specific Residue as a mutable reference from the Residues making up this PDB. Including Hetero Atoms.
Arguments
index
- the index of the Residue
Fails
It fails when the index is outside bounds.
pub fn atom(&self, index: usize) -> Option<&Atom>
[src]
Get a specific Atom from the Atoms making up this PDB. Including Hetero Atoms.
Arguments
index
- the index of the Atom
Fails
It fails when the index is outside bounds.
pub fn atom_mut(&mut self, index: usize) -> Option<&mut Atom>
[src]
Get a specific Atom as a mutable reference from the Atoms making up this PDB. Including Hetero Atoms.
Arguments
index
- the index of the Atom
Fails
It fails when the index is outside bounds.
pub fn models(&self) -> impl DoubleEndedIterator<Item = &Model> + '_
[src]
Get the list of Models making up this PDB.
pub fn models_mut(&mut self) -> impl DoubleEndedIterator<Item = &mut Model> + '_
[src]
Get the list of Models as mutable references making up this PDB.
pub fn chains(&self) -> impl DoubleEndedIterator<Item = &Chain> + '_
[src]
Get the list of Chains making up this PDB. This disregards all Hetero Chains. Double ended so iterating from the end is just as fast as from the start.
pub fn chains_mut(&mut self) -> impl DoubleEndedIterator<Item = &mut Chain> + '_
[src]
Get the list of Chains as mutable references making up this PDB. This disregards all Hetero Chains. Double ended so iterating from the end is just as fast as from the start.
pub fn residues(&self) -> impl DoubleEndedIterator<Item = &Residue> + '_
[src]
Get the list of Residue making up this PDB. This disregards all Hetero Residue. Double ended so iterating from the end is just as fast as from the start.
pub fn residues_mut(
&mut self
) -> impl DoubleEndedIterator<Item = &mut Residue> + '_
[src]
&mut self
) -> impl DoubleEndedIterator<Item = &mut Residue> + '_
Get the list of Residue as mutable references making up this PDB. This disregards all Hetero Residue. Double ended so iterating from the end is just as fast as from the start.
pub fn atoms(&self) -> impl DoubleEndedIterator<Item = &Atom> + '_
[src]
Get the list of Atom making up this PDB. This disregards all Hetero Atom. Double ended so iterating from the end is just as fast as from the start.
pub fn atoms_mut(&mut self) -> impl DoubleEndedIterator<Item = &mut Atom> + '_
[src]
Get the list of Atom as mutable references making up this PDB. This disregards all Hetero Atom. Double ended so iterating from the end is just as fast as from the start.
pub fn hetero_chains(&self) -> impl DoubleEndedIterator<Item = &Chain> + '_
[src]
Get the list of Chains making up this Model. This disregards all Normal Chains. Double ended so iterating from the end is just as fast as from the start.
pub fn hetero_chains_mut(
&mut self
) -> impl DoubleEndedIterator<Item = &mut Chain> + '_
[src]
&mut self
) -> impl DoubleEndedIterator<Item = &mut Chain> + '_
Get the list of Chains as mutable references making up this Model. This disregards all Normal Chains. Double ended so iterating from the end is just as fast as from the start.
pub fn hetero_residues(&self) -> impl DoubleEndedIterator<Item = &Residue> + '_
[src]
Get the list of Residues making up this Model. This disregards all Normal Residues. Double ended so iterating from the end is just as fast as from the start.
pub fn hetero_residues_mut(
&mut self
) -> impl DoubleEndedIterator<Item = &mut Residue> + '_
[src]
&mut self
) -> impl DoubleEndedIterator<Item = &mut Residue> + '_
Get the list of Residues as mutable references making up this Model. This disregards all Normal Residues. Double ended so iterating from the end is just as fast as from the start.
pub fn hetero_atoms(&self) -> impl DoubleEndedIterator<Item = &Atom> + '_
[src]
Get the list of Atoms making up this Model. This disregards all Normal Atoms. Double ended so iterating from the end is just as fast as from the start.
pub fn hetero_atoms_mut(
&mut self
) -> impl DoubleEndedIterator<Item = &mut Atom> + '_
[src]
&mut self
) -> impl DoubleEndedIterator<Item = &mut Atom> + '_
Get the list of Atoms as mutable references making up this Model. This disregards all Normal Atoms. Double ended so iterating from the end is just as fast as from the start.
pub fn all_chains(&self) -> impl DoubleEndedIterator<Item = &Chain> + '_
[src]
Get the list of Chains making up this Model. This includes all Normal and Hetero Chains. Double ended so iterating from the end is just as fast as from the start.
pub fn all_chains_mut(
&mut self
) -> impl DoubleEndedIterator<Item = &mut Chain> + '_
[src]
&mut self
) -> impl DoubleEndedIterator<Item = &mut Chain> + '_
Get the list of Chains as mutable references making up this Model. This includes all Normal and Hetero Chains. Double ended so iterating from the end is just as fast as from the start.
pub fn all_residues(&self) -> impl DoubleEndedIterator<Item = &Residue> + '_
[src]
Get the list of Residues making up this Model. This includes all Normal and Hetero Residues. Double ended so iterating from the end is just as fast as from the start.
pub fn all_residues_mut(
&mut self
) -> impl DoubleEndedIterator<Item = &mut Residue> + '_
[src]
&mut self
) -> impl DoubleEndedIterator<Item = &mut Residue> + '_
Get the list of Residues as mutable references making up this Model. This includes all Normal and Hetero Residues. Double ended so iterating from the end is just as fast as from the start.
pub fn all_atoms(&self) -> impl DoubleEndedIterator<Item = &Atom> + '_
[src]
Get the list of Atoms making up this Model. This includes all Normal and Hetero Atoms. Double ended so iterating from the end is just as fast as from the start.
pub fn all_atoms_mut(
&mut self
) -> impl DoubleEndedIterator<Item = &mut Atom> + '_
[src]
&mut self
) -> impl DoubleEndedIterator<Item = &mut Atom> + '_
Get the list of Atoms as mutable references making up this Model. This includes all Normal and Hetero Atoms. Double ended so iterating from the end is just as fast as from the start.
pub fn remove_atoms_by<F>(&mut self, predicate: F) where
F: Fn(&Atom) -> bool,
[src]
F: Fn(&Atom) -> bool,
Remove all Atoms matching the given predicate. The predicate will be run on all Atoms (Normal and Hetero). As this is done in place this is the fastest way to remove Atoms from this Model.
pub fn remove_residues_by<F>(&mut self, predicate: F) where
F: Fn(&Residue) -> bool,
[src]
F: Fn(&Residue) -> bool,
Remove all Residues matching the given predicate. The predicate will be run on all Residues (Normal and Hetero). As this is done in place this is the fastest way to remove Residues from this Model.
pub fn remove_chains_by<F>(&mut self, predicate: F) where
F: Fn(&Chain) -> bool,
[src]
F: Fn(&Chain) -> bool,
Remove all Residues matching the given predicate. The predicate will be run on all Residues (Normal and Hetero). As this is done in place this is the fastest way to remove Residues from this Model.
pub fn remove_models_by<F>(&mut self, predicate: F) where
F: Fn(&Model) -> bool,
[src]
F: Fn(&Model) -> bool,
Remove all Chains matching the given predicate. The predicate will be run on all Chains (Normal and Hetero). As this is done in place this is the fastest way to remove Chains from this Model.
pub fn remove_model(&mut self, index: usize)
[src]
Remove the Model specified.
Arguments
index
- the index of the Model to remove
Panics
It panics when the index is outside bounds.
pub fn remove_model_serial_number(&mut self, serial_number: usize) -> bool
[src]
Remove the Model specified. It returns true
if it found a matching Model and removed it.
It removes the first matching Model from the list.
Arguments
serial_number
- the serial number of the Model to remove
pub fn renumber(&mut self)
[src]
This renumbers all numbered structs in the PDB. So it renumbers models, atoms, residues, chains and MtriXs.
pub fn apply_transformation(&mut self, transformation: &TransformationMatrix)
[src]
Apply a transformation to the position of all atoms (Normal and Hetero) making up this PDB, the new position is immediately set.
pub fn join(&mut self, mut other: PDB)
[src]
Joins two PDBs. If one has multiple models it extends the models of this PDB with the models of the other PDB. If this PDB does not have any models it moves the models of the other PDB to this PDB. If both have one model it moves all chains/residues/atoms form the first model of the other PDB to the first model of this PDB. Effectively the same as calling join on those models.
Trait Implementations
impl Clone for PDB
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PDB
[src]
impl Default for PDB
[src]
impl Display for PDB
[src]
impl PartialEq<PDB> for PDB
[src]
Auto Trait Implementations
impl RefUnwindSafe for PDB
[src]
impl Send for PDB
[src]
impl Sync for PDB
[src]
impl Unpin for PDB
[src]
impl UnwindSafe for PDB
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,