class Chem::Chain
- Chem::Chain
- Reference
- Object
Included Modules
Defined in:
chem/core/chain.crConstructors
Instance Method Summary
-
#<=>(rhs : self) : Int32
The comparison operator.
- #[](number : Int32, insertion_code : Char | Nil = nil) : Residue
- #[]?(number : Int32, insertion_code : Char | Nil = nil) : Residue | Nil
- #clear : self
- #delete(residue : Residue) : Residue | Nil
- #dig(number : Int32, insertion_code : Char | Nil) : Residue
- #dig(number : Int32, insertion_code : Char | Nil, *subindexes)
- #dig(number : Int32) : Residue
- #dig(number : Int32, *subindexes)
- #dig?(number : Int32, insertion_code : Char | Nil) : Residue | Nil
- #dig?(number : Int32, insertion_code : Char | Nil, *subindexes)
- #dig?(number : Int32) : Residue | Nil
- #dig?(number : Int32, *subindexes)
- #each_atom : Iterator(Atom)
- #each_atom(&block : Atom -> )
- #each_residue : Iterator(Residue)
- #each_residue(&block : Residue -> )
- #id : Char
- #inspect(io : ::IO) : Nil
- #n_atoms : Int32
- #n_residues : Int32
- #polymer? : Bool
-
#renumber_by_connectivity : Nil
Renumber residues based on bond information.
- #reset_cache : Nil
- #structure : Structure
- #structure=(new_structure : Structure) : Structure
Instance methods inherited from module Chem::ResidueCollection
each_residue : Iterator(Residue)each_residue(&block : Residue -> ) each_residue, each_residue_fragment(& : ResidueView -> ) : Nil each_residue_fragment, each_secondary_structure(reuse : Bool | Array(Residue) = false, strict : Bool = true, handedness : Bool = true) : Iterator(ResidueView)
each_secondary_structure(reuse : Bool | Array(Residue) = false, strict : Bool = true, handedness : Bool = true, & : ResidueView, Protein::SecondaryStructure -> ) : Nil each_secondary_structure, link_bond : Topology::BondType | Nil link_bond, n_residues : Int32 n_residues, reset_secondary_structure : self reset_secondary_structure, residue_fragments : Array(ResidueView) residue_fragments, residues : ResidueView residues, sec=(seclist : Array(Protein::SecondaryStructure)) : Array(Protein::SecondaryStructure)
sec=(sec : Protein::SecondaryStructure) : Protein::SecondaryStructure sec=, secondary_structures(strict : Bool = true, handedness : Bool = true) : Array(ResidueView) secondary_structures
Instance methods inherited from module Chem::AtomCollection
atoms : AtomView
atoms,
bonds : Array(Bond)
bonds,
coords : Spatial::CoordinatesProxy
coords,
each_atom : Iterator(Atom)each_atom(&block : Atom -> ) each_atom, each_fragment(& : AtomView -> ) : Nil each_fragment, formal_charge : Int32 formal_charge, formal_charges : Array(Int32) formal_charges, fragments : Array(AtomView) fragments, has_hydrogens? : Bool has_hydrogens?, n_atoms : Int32 n_atoms, to_gen(output : ::IO | Path | String, *args, **options) : Nil
to_gen(*args, **options) : String to_gen, to_mol2(output : ::IO | Path | String, *args, **options) : Nil
to_mol2(*args, **options) : String to_mol2, to_pdb(output : ::IO | Path | String, *args, **options) : Nil
to_pdb(*args, **options) : String to_pdb, to_poscar(output : ::IO | Path | String, *args, **options) : Nil
to_poscar(*args, **options) : String to_poscar, to_xyz(output : ::IO | Path | String, *args, **options) : Nil
to_xyz(*args, **options) : String to_xyz
Constructor Detail
Instance Method Detail
def <=>(rhs : self) : Int32
#
The comparison operator.
Returns -1
, 0
or 1
depending on whether self
precedes
rhs, equals to rhs or comes after rhs. The comparison is
done based on chain identifier.
chains = Structure.read("peptide.pdb").chains
chains[0] <=> chains[1] # => -1
chains[1] <=> chains[1] # => 0
chains[2] <=> chains[1] # => 1
def renumber_by_connectivity : Nil
#
Renumber residues based on bond information. Residue ordering is computed based on the link bond if available.