Class ResidueGraph
java.lang.Object
org.rcsb.strucmotif.domain.structure.ResidueGraph
Represents the pseudo-graph defined by all residues. Some tricks to efficiently report distances and angles between
residues.
-
Constructor Summary
ConstructorsConstructorDescriptionResidueGraph(Structure structure, float squaredCutoff, boolean allowTransformed) Construct a new residue graph from a full structure.ResidueGraph(Structure structure, List<LabelSelection> labelSelections, List<Map<LabelAtomId, float[]>> residues, float squaredCutoff, boolean allowTransformed) Construct a residue graph. -
Method Summary
Modifier and TypeMethodDescriptionfloatgetAngle(IndexSelection residue1, IndexSelection residue2) Reports the angle between 2 residues.floatgetBackboneDistance(IndexSelection residue1, IndexSelection residue2) Reports the distance of backbone of 2 residues.intReports the number of pairings present in this graph.floatgetSideChainDistance(IndexSelection residue1, IndexSelection residue2) Reports the distance of side-chains of 2 residues.Allows to traverse all pairings.Allows to sequentially traverse all pairings.Allows to traverse all residue pair occurrences.Allows to traverse all residue pair occurrences.
-
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 contextlabelSelections- residue keys (may be subset, may be all)residues- residue coordinates (may be subset, may be all)squaredCutoff- maximum distance of residue pairs to indexallowTransformed- allow pairs between 2 transformed chains?
-
ResidueGraph
Construct a new residue graph from a full structure.- Parameters:
structure- datasquaredCutoff- maximum dot product between atoms to considerallowTransformed- set to true during QueryStructure evaluation
-
-
Method Details
-
getBackboneDistance
Reports the distance of backbone of 2 residues.- Parameters:
residue1- firstresidue2- second- Returns:
- the distance
-
getSideChainDistance
Reports the distance of side-chains of 2 residues.- Parameters:
residue1- firstresidue2- second- Returns:
- the distance
-
getAngle
Reports the angle between 2 residues.- Parameters:
residue1- firstresidue2- second- Returns:
- the angle
-
getNumberOfPairings
public int getNumberOfPairings()Reports the number of pairings present in this graph.- Returns:
- the number of registered pairs
-
pairingsSequential
Allows to sequentially traverse all pairings.- Returns:
- a stream of residue pairs
-
pairingsParallel
Allows to traverse all pairings.- Returns:
- a stream of residue pairs
-
residuePairOccurrencesParallel
Allows to traverse all residue pair occurrences. Will employ parallel stream.- Returns:
- a stream of
ResiduePairOccurrenceinstances
-
residuePairOccurrencesSequential
Allows to traverse all residue pair occurrences. Will employ sequential stream.- Returns:
- a stream of
ResiduePairOccurrenceinstances
-