Class ResidueGraph

java.lang.Object
org.rcsb.strucmotif.domain.structure.ResidueGraph

public class ResidueGraph extends Object
Represents the pseudo-graph defined by all residues. Some tricks to efficiently report distances and angles between residues.
  • Constructor Details

    • ResidueGraph

      public ResidueGraph(Structure structure, List<LabelSelection> labelSelections, List<Map<LabelAtomId,float[]>> residues, float squaredCutoff, boolean allowTransformed)
      Construct a residue graph.
      Parameters:
      structure - the context
      labelSelections - residue keys (may be subset, may be all)
      residues - residue coordinates (may be subset, may be all)
      squaredCutoff - maximum distance of residue pairs to index
      allowTransformed - allow pairs between 2 transformed chains?
    • ResidueGraph

      public ResidueGraph(Structure structure, float squaredCutoff, boolean allowTransformed)
      Construct a new residue graph from a full structure.
      Parameters:
      structure - data
      squaredCutoff - maximum dot product between atoms to consider
      allowTransformed - set to true during QueryStructure evaluation
  • Method Details

    • getBackboneDistance

      public float getBackboneDistance(IndexSelection residue1, IndexSelection residue2)
      Reports the distance of backbone of 2 residues.
      Parameters:
      residue1 - first
      residue2 - second
      Returns:
      the distance
    • getSideChainDistance

      public float getSideChainDistance(IndexSelection residue1, IndexSelection residue2)
      Reports the distance of side-chains of 2 residues.
      Parameters:
      residue1 - first
      residue2 - second
      Returns:
      the distance
    • getAngle

      public float getAngle(IndexSelection residue1, IndexSelection residue2)
      Reports the angle between 2 residues.
      Parameters:
      residue1 - first
      residue2 - second
      Returns:
      the angle
    • getNumberOfPairings

      public int getNumberOfPairings()
      Reports the number of pairings present in this graph.
      Returns:
      the number of registered pairs
    • pairingsSequential

      public Stream<Pair<IndexSelection,IndexSelection>> pairingsSequential()
      Allows to sequentially traverse all pairings.
      Returns:
      a stream of residue pairs
    • pairingsParallel

      public Stream<Pair<IndexSelection,IndexSelection>> pairingsParallel()
      Allows to traverse all pairings.
      Returns:
      a stream of residue pairs
    • residuePairOccurrencesParallel

      public Stream<ResiduePairOccurrence> residuePairOccurrencesParallel()
      Allows to traverse all residue pair occurrences. Will employ parallel stream.
      Returns:
      a stream of ResiduePairOccurrence instances
    • residuePairOccurrencesSequential

      public Stream<ResiduePairOccurrence> residuePairOccurrencesSequential()
      Allows to traverse all residue pair occurrences. Will employ sequential stream.
      Returns:
      a stream of ResiduePairOccurrence instances