Class Structure
java.lang.Object
org.rcsb.strucmotif.domain.structure.Structure
The structure object wraps categories of a mmCIF file and allows access via some utility methods.
-
Constructor Summary
ConstructorsConstructorDescriptionStructure(String structureIdentifier, Map<String, int[]> chainOffsets, int[] labelSeqId, int[] residueOffsets, byte[] residueTypes, byte[] labelAtomId, short[] x, short[] y, short[] z, Map<String, List<String>> assemblies, Map<String, Transformation> transformations) Create a structure view. -
Method Summary
Modifier and TypeMethodDescriptionAccess to assembly information.intCount of all atoms/rows in the source CIF file.intCount of all chains in the source CIF file.getLabelSelection(int residueIndex) Access to all unique (label_asym_id, label_seq_id) pairs that exist in this structure.intCount of all residues in the source CIF file.intgetResidueIndex(String labelAsymId, int labelSeqId) Look up the index of a residue.getResidueType(int residueIndex) Reports the residue type/amino acid at a certain index.This structure's identifier.getTransformation(String structOperIdentifier) Access to a specific transformation.Access to all transformations.Map<LabelAtomId,float[]> manifestResidue(int residueIndex) Manifest a residue by its index.Map<LabelAtomId,float[]> manifestResidue(int residueIndex, String structOperIdentifier) 'Manifests' a residue, i.e.Map<LabelAtomId,float[]> manifestResidue(LabelSelection labelSelection) Manifest a residue by its LabelSelection.List<Map<LabelAtomId,float[]>> manifestResidues(List<LabelSelection> labelSelections) Manifest a collection of residues by their LabelSelection.
-
Constructor Details
-
Structure
public Structure(String structureIdentifier, Map<String, int[]> chainOffsets, int[] labelSeqId, int[] residueOffsets, byte[] residueTypes, byte[] labelAtomId, short[] x, short[] y, short[] z, Map<String, List<String>> assemblies, Map<String, Transformation> transformations) Create a structure view.- Parameters:
structureIdentifier- the identifierchainOffsets- residue indices where label_asym_id changeslabelSeqId- array of all label_seq_idresidueOffsets- the offset of each residue in the atom_site categoryresidueTypes- the type of each residuelabelAtomId- the type of each atomx- the x coords of each atomy- the y coords of each atomz- the z coords of each atomassemblies- all assembliestransformations- all transformations
-
-
Method Details
-
getStructureIdentifier
This structure's identifier.- Returns:
- a String
-
getLabelSelections
Access to all unique (label_asym_id, label_seq_id) pairs that exist in this structure. This call is expensive and will traverse all internally registered chains and sequence positions and create a collection of associated LabelSelection instances.Make sure to reuse the result returned by this call. Never call in a loop!
- Returns:
- a sorted list of all LabelSelection instances that exist for this structure
-
getResidueIndex
Look up the index of a residue.- Parameters:
labelAsymId- the chain-ID of the residuelabelSeqId- the sequence position of the residue- Returns:
- the index of the residue
- Throws:
NoSuchElementException- if the chain/residue cannot be found
-
getLabelSelection
-
getChainCount
public int getChainCount()Count of all chains in the source CIF file.- Returns:
- an int
-
getResidueCount
public int getResidueCount()Count of all residues in the source CIF file.- Returns:
- an int
-
getAtomCount
public int getAtomCount()Count of all atoms/rows in the source CIF file.- Returns:
- an int
-
getResidueType
Reports the residue type/amino acid at a certain index.- Parameters:
residueIndex- the index of the residue- Returns:
- a ResidueType instance
-
getAssemblies
Access to assembly information.- Returns:
- Map of all assemblies [assemblyId, (label_asym_id x struct_oper_id)[]]
-
getTransformations
Access to all transformations.- Returns:
- Map of transformations [struct_oper_id, Transformation]
-
getTransformation
Access to a specific transformation.- Parameters:
structOperIdentifier- the struct_oper_id expression- Returns:
- a Transformation object
-
manifestResidue
Manifest a residue by its LabelSelection.- Parameters:
labelSelection- the residue identifier- Returns:
- a residue
-
manifestResidues
Manifest a collection of residues by their LabelSelection.- Parameters:
labelSelections- a collection of residue identifiers- Returns:
- a collection of residues
-
manifestResidue
Manifest a residue by its index.- Parameters:
residueIndex- the index of the residue- Returns:
- a residue
-
manifestResidue
'Manifests' a residue, i.e. extract all relevant atom_site rows and move coordinates of all atoms to a map. Atoms are identified by their label_comp_id, coordinates given as float[3]. The requested transformation will be applied to the coordinates.- Parameters:
residueIndex- the index of the residuestructOperIdentifier- the operator to apply to these coordinates- Returns:
- a Map [label_atom_id, [x, y, z]]
-