Interface ResidueCollection

All Superinterfaces:
Serializable
All Known Subinterfaces:
CifModel, PdbModel, SingleTypedResidueCollection
All Known Implementing Classes:
AbstractPdbModel, DefaultCifModel, DefaultPdbModel, DefaultResidueCollection, ImmutableDefaultCifModel, ImmutableDefaultPdbModel, ImmutableDefaultResidueCollection, ImmutablePdbChain, ImmutablePdbCompactFragment, PdbChain, PdbCompactFragment
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ResidueCollection extends Serializable
A collection of residues.
  • Method Details

    • residues

      List<PdbResidue> residues()
      Returns:
      The list of residues.
    • withoutAlternateLocations

      default ResidueCollection withoutAlternateLocations()
      Creates a new instance of this class in which atoms with alternate locations are present only once.
      Returns:
      A copy of the current instance, but without alternate locations in atoms.
    • findBondLengthViolations

      default List<String> findBondLengthViolations()
      Analyzes atomic bond lenths to find violations (too long or too short) and generates a report in a form of a list of validation messages.
      Returns:
      A list of error messages.
    • hasResidue

      default boolean hasResidue(ChainNumberICode query)
      Checks if a given (chain, number, icode) is present in this collection of residues.
      Parameters:
      query - A residue identifier.
      Returns:
      True if a given residue is part of this collection.
    • findResidue

      default PdbResidue findResidue(ChainNumberICode query)
      Finds a residue by a triplet (chain, number, icode).
      Parameters:
      query - A residue identifier.
      Returns:
      The residue found in this collection of residues.
    • indexOf

      default int indexOf(ChainNumberICode query)
      Finds a residue by a triplet (chain, number, icode).
      Parameters:
      query - A residue identifier.
      Returns:
      The index of a residue found in this collection of residues.
    • sequence

      default String sequence()
      Generates a sequence out of this residue collection.
      Returns:
      A sequence of one-letter-codes e.g. ACGGGG.
    • filteredAtoms

      default List<PdbAtomLine> filteredAtoms(MoleculeType moleculeType)
      Filters atoms in this residue collection.
      Parameters:
      moleculeType - Type of molecule to leave in the result.
      Returns:
      A list of atoms of a given type.
    • residueIdentifiers

      default List<PdbResidueIdentifier> residueIdentifiers()
      Returns:
      A list of residue identifiers.
    • namedResidueIdentifiers

      default List<PdbNamedResidueIdentifier> namedResidueIdentifiers()
      Returns:
      A list of named residue identifiers.
    • toPdb

      default String toPdb()
      Generates a list of ATOM lines in PDB format from this instance.
      Returns:
      A representation of this residue collection in PDB format.
    • toCif

      default String toCif() throws IOException
      Generates a list of ATOM lines in mmCIF format from this instance.
      Returns:
      A representation of this residue collection in mmCIF format.
      Throws:
      IOException