public class AdapterToStructureData extends Object implements StructureDataInterface, StructureAdapterInterface
StructureAdapterInterface
to the StructureDataInterface
.Constructor and Description |
---|
AdapterToStructureData() |
Modifier and Type | Method and Description |
---|---|
void |
finalizeStructure()
A generic function to be used at the end of all data addition to do required cleanup on the structure
|
char[] |
getAltLocIds()
Returns an array of location ids of the atoms.
|
int[] |
getAtomIds()
Returns an array of atom serial ids (_atom_site.id in mmCIF dictionary).
|
float[] |
getbFactors()
Returns an array containing the B-factors (temperature factors) of the atoms in Angstroms^2.
|
String |
getBioassemblyName(int bioassemblyIndex)
Returns the name of the transformation for a bioassembly.
|
String[] |
getChainIds()
Returns an array of internal chain identifiers (asym_ids in mmCIF dictionary), of length the
number of chains (polymeric, non-polymeric and water) in the structure.
|
int[] |
getChainIndexListForTransform(int bioassemblyIndex,
int transformationIndex)
Returns the list of chain indices for the given transformation for the given bioassembly.
|
String[] |
getChainNames()
Returns an array of public chain identifiers (auth_ids in mmCIF dictionary), of length the
number of chains (polymeric, non-polymeric and water) in the structure.
|
int[] |
getChainsPerModel()
Returns an array containing the number of chains (polymeric/non-polymeric/water) in each model.
|
String |
getDepositionDate()
Returns the deposition date of the structure as a string
in ISO time standard format.
|
int[] |
getEntityChainIndexList(int entityInd)
Returns the chain indices for the entity specified by the index.
|
String |
getEntityDescription(int entityInd)
Returns the entity description (as defined in mmCIF dictionary)
for the entity specified by the index.
|
String |
getEntitySequence(int entityInd)
Returns the sequence for the entity specified by the index.
|
String |
getEntityType(int entityInd)
Returns the entity type (polymer, non-polymer, water) for the entity specified by the index.
|
String[] |
getExperimentalMethods()
Returns the experimental methods as an array of strings.
|
int[] |
getGroupAtomCharges(int groupInd)
Returns the atom charges for the group specified in
StructureDataInterface.getGroupTypeIndices() . |
String[] |
getGroupAtomNames(int groupInd)
Returns the atom names (e.g.
|
int[] |
getGroupBondIndices(int groupInd)
Returns the zero-based bond indices (in pairs) for the group specified in
StructureDataInterface.getGroupTypeIndices() . |
int[] |
getGroupBondOrders(int groupInd)
Returns the bond orders for the group specified in
StructureDataInterface.getGroupTypeIndices() . |
String |
getGroupChemCompType(int groupInd)
Returns the chemical component type for the group specified in
StructureDataInterface.getGroupTypeIndices() . |
String[] |
getGroupElementNames(int groupInd)
Returns the IUPAC element names (e.g.
|
int[] |
getGroupIds()
Returns an array containing residue numbers (auth_seq_id in mmCIF dictionary) for each residue (group).
|
String |
getGroupName(int groupInd)
Returns the group name for the group specified in
StructureDataInterface.getGroupTypeIndices() . |
int[] |
getGroupSequenceIndices()
Returns an array containing the indices of groups (residues) in their corresponding sequences,
obtainable through
StructureDataInterface.getEntitySequence(int) . |
char |
getGroupSingleLetterCode(int groupInd)
Returns the single letter amino acid code or nucleotide code for the
group specified in
StructureDataInterface.getGroupTypeIndices() . |
int[] |
getGroupsPerChain()
Returns an array containing the number of groups (residues) in each chain.
|
int[] |
getGroupTypeIndices()
Returns an array containing indices to be used to obtain group level information,
e.g.
|
char[] |
getInsCodes()
Returns an array containing the insertion codes (pdbx_PDB_ins_code in mmCIF dictionary) for each residue (group).
|
int[] |
getInterGroupBondIndices()
Returns the zero-based bond indices (in pairs) for the structure.
|
int[] |
getInterGroupBondOrders()
Returns an array of bond orders (1,2,3) of inter-group bonds with length number of inter-group bonds
|
double[] |
getMatrixForTransform(int bioassemblyIndex,
int transformationIndex)
Returns a 4x4 transformation matrix for the given transformation for the given bioassembly.
|
String |
getMmtfProducer()
Returns a string describing the producer of the MMTF file.
|
String |
getMmtfVersion()
Returns the MMTF version number (from the specification).
|
double[][] |
getNcsOperatorList()
Returns the NCS operation matrix list.
|
int |
getNumAtoms()
Returns the number of atoms in the structure.
|
int |
getNumAtomsInGroup(int groupInd)
Returns the number of atoms in the group specified in
StructureDataInterface.getGroupTypeIndices() . |
int |
getNumBioassemblies()
Returns the number of bioassemblies in this structure.
|
int |
getNumBonds()
Returns the total number of bonds in the structure
|
int |
getNumChains()
Returns the number of chains (for all models) in the structure.
|
int |
getNumEntities()
Returns the number of entities (as defined in mmCIF dictionary) in the structure
|
int |
getNumGroups()
Returns the number of groups (residues) in the structure that have
experimentally determined 3D coordinates.
|
int |
getNumModels()
Returns the number of models in the structure.
|
int |
getNumTransInBioassembly(int bioassemblyIndex)
Returns the number of transformations in a given bioassembly.
|
float[] |
getOccupancies()
Returns an array containing the occupancy values of the atoms.
|
String |
getReleaseDate()
Returns the release date of the structure as a string
in ISO time standard format.
|
float |
getResolution()
Returns the resolution of the dataset.
|
float |
getRfree()
Returns the Rfree of the dataset.
|
float |
getRwork()
Returns the Rwork of the dataset.
|
int[] |
getSecStructList()
Returns the secondary structure information for the structure as a list of integers
|
String |
getSpaceGroup()
Returns the space group of the structure.
|
String |
getStructureId()
Returns the identifier of the structure.
|
String |
getTitle()
Returns the title of the structure.
|
float[] |
getUnitCell()
Returns the 6 floats that describe the unit cell.
|
float[] |
getxCoords()
Returns an array containing the X coordinates of the atoms in Angstroms.
|
float[] |
getyCoords()
Returns an array containing the Y coordinates of the atoms in Angstroms.
|
float[] |
getzCoords()
Returns an array containing the Z coordinates of the atoms in Angstroms.
|
void |
initStructure(int totalNumBonds,
int totalNumAtoms,
int totalNumGroups,
int totalNumChains,
int totalNumModels,
String structureId)
Used before any additions to do any required pre-processing.
|
void |
setAtomInfo(String atomName,
int serialNumber,
char alternativeLocationId,
float x,
float y,
float z,
float occupancy,
float temperatureFactor,
String element,
int charge)
Sets the atom level information for a given atom.
|
void |
setBioAssemblyTrans(int bioAssemblyIndex,
int[] chainIndices,
double[] transform,
String name)
Sets a single Bioassembly transformation to a structure.
|
void |
setChainInfo(String chainId,
String chainName,
int groupCount)
Sets the information for a given chain.
|
void |
setEntityInfo(int[] chainIndices,
String sequence,
String description,
String title)
Sets the entity level annotation for a chain(s).
|
void |
setGroupBond(int firstAtomIndex,
int secondAtomIndex,
int bondOrder)
Sets an intra-group bond.
|
void |
setGroupInfo(String groupName,
int groupNumber,
char insertionCode,
String polymerType,
int atomCount,
int bondCount,
char singleAtomCode,
int sequenceIndex,
int secStructType)
Sets the information for a given group / residue with atomic data.
|
void |
setHeaderInfo(float rFree,
float rWork,
float resolution,
String title,
String depositionDate,
String releaseDate,
String[] experimnetalMethods)
Sets the header information.
|
void |
setInterGroupBond(int firstAtomIndex,
int secondAtomIndex,
int bondOrder)
Sets an inter-group bond.
|
void |
setModelInfo(int modelId,
int chainCount)
Sets the number of chains for a given model.
|
void |
setXtalInfo(String spaceGroup,
float[] unitCell,
double[][] ncsOperMatrixList)
Sets the space group and unit cell information.
|
public float[] getxCoords()
StructureDataInterface
getxCoords
in interface StructureDataInterface
StructureDataInterface.getNumAtoms()
public float[] getyCoords()
StructureDataInterface
getyCoords
in interface StructureDataInterface
StructureDataInterface.getNumAtoms()
public float[] getzCoords()
StructureDataInterface
getzCoords
in interface StructureDataInterface
StructureDataInterface.getNumAtoms()
public float[] getbFactors()
StructureDataInterface
getbFactors
in interface StructureDataInterface
StructureDataInterface.getNumAtoms()
public float[] getOccupancies()
StructureDataInterface
getOccupancies
in interface StructureDataInterface
StructureDataInterface.getNumAtoms()
public int[] getAtomIds()
StructureDataInterface
getAtomIds
in interface StructureDataInterface
StructureDataInterface.getNumAtoms()
public char[] getAltLocIds()
StructureDataInterface
getAltLocIds
in interface StructureDataInterface
StructureDataInterface.getNumAtoms()
public char[] getInsCodes()
StructureDataInterface
getInsCodes
in interface StructureDataInterface
StructureDataInterface.getNumGroups()
StructureDataInterface.getGroupIds()
public int[] getGroupIds()
StructureDataInterface
getGroupIds
in interface StructureDataInterface
StructureDataInterface.getNumGroups()
StructureDataInterface.getInsCodes()
public String getGroupName(int groupInd)
StructureDataInterface
StructureDataInterface.getGroupTypeIndices()
.
to link groups to the 3 letter group name, e.g. HIS.getGroupName
in interface StructureDataInterface
groupInd
- The index of the group specified in StructureDataInterface.getGroupTypeIndices()
.public int getNumAtomsInGroup(int groupInd)
StructureDataInterface
StructureDataInterface.getGroupTypeIndices()
.getNumAtomsInGroup
in interface StructureDataInterface
groupInd
- The index of the group specified in StructureDataInterface.getGroupTypeIndices()
.public String[] getGroupAtomNames(int groupInd)
StructureDataInterface
StructureDataInterface.getGroupTypeIndices()
.
Atom names are unique for each unique atom in a group.getGroupAtomNames
in interface StructureDataInterface
groupInd
- The index of the group specified in StructureDataInterface.getGroupTypeIndices()
.public String[] getGroupElementNames(int groupInd)
StructureDataInterface
StructureDataInterface.getGroupTypeIndices()
.getGroupElementNames
in interface StructureDataInterface
groupInd
- the index of the group specified in StructureDataInterface.getGroupTypeIndices()
.public int[] getGroupBondOrders(int groupInd)
StructureDataInterface
StructureDataInterface.getGroupTypeIndices()
.
A list of integers indicating the bond ordersgetGroupBondOrders
in interface StructureDataInterface
groupInd
- the index of the group specified in StructureDataInterface.getGroupTypeIndices()
.public int[] getGroupBondIndices(int groupInd)
StructureDataInterface
StructureDataInterface.getGroupTypeIndices()
.
(e.g. 0,1 means there is bond between atom 0 and 1).getGroupBondIndices
in interface StructureDataInterface
groupInd
- the index of the group specified in StructureDataInterface.getGroupTypeIndices()
.public int[] getGroupAtomCharges(int groupInd)
StructureDataInterface
StructureDataInterface.getGroupTypeIndices()
.getGroupAtomCharges
in interface StructureDataInterface
groupInd
- the index of the group specified in StructureDataInterface.getGroupTypeIndices()
.public char getGroupSingleLetterCode(int groupInd)
StructureDataInterface
StructureDataInterface.getGroupTypeIndices()
.getGroupSingleLetterCode
in interface StructureDataInterface
groupInd
- the index of the group specified in StructureDataInterface.getGroupTypeIndices()
.public String getGroupChemCompType(int groupInd)
StructureDataInterface
StructureDataInterface.getGroupTypeIndices()
.getGroupChemCompType
in interface StructureDataInterface
groupInd
- The index of the group specified in StructureDataInterface.getGroupTypeIndices()
.public int[] getGroupTypeIndices()
StructureDataInterface
StructureDataInterface.getGroupAtomCharges(int)
.getGroupTypeIndices
in interface StructureDataInterface
StructureDataInterface.getNumGroups()
public int[] getGroupSequenceIndices()
StructureDataInterface
StructureDataInterface.getEntitySequence(int)
.
The indices are 0-based and specified per entity, -1 indicates the group is not present in the sequence.getGroupSequenceIndices
in interface StructureDataInterface
StructureDataInterface.getNumGroups()
public String[] getChainIds()
StructureDataInterface
getChainIds
in interface StructureDataInterface
StructureDataInterface.getNumChains()
StructureDataInterface.getChainNames()
public String[] getChainNames()
StructureDataInterface
getChainNames
in interface StructureDataInterface
StructureDataInterface.getNumChains()
StructureDataInterface.getChainIds()
public int[] getChainsPerModel()
StructureDataInterface
getChainsPerModel
in interface StructureDataInterface
StructureDataInterface.getNumModels()
public int[] getGroupsPerChain()
StructureDataInterface
getGroupsPerChain
in interface StructureDataInterface
StructureDataInterface.getNumChains()
public String getSpaceGroup()
StructureDataInterface
getSpaceGroup
in interface StructureDataInterface
public float[] getUnitCell()
StructureDataInterface
getUnitCell
in interface StructureDataInterface
public int getNumBioassemblies()
StructureDataInterface
getNumBioassemblies
in interface StructureDataInterface
public int getNumTransInBioassembly(int bioassemblyIndex)
StructureDataInterface
getNumTransInBioassembly
in interface StructureDataInterface
bioassemblyIndex
- an integer specifying the bioassembly index (zero indexed).public int[] getChainIndexListForTransform(int bioassemblyIndex, int transformationIndex)
StructureDataInterface
getChainIndexListForTransform
in interface StructureDataInterface
bioassemblyIndex
- an integer specifying the bioassembly index (zero indexed).transformationIndex
- an integer specifying the index (zero indexed) for the desired transformation.public double[] getMatrixForTransform(int bioassemblyIndex, int transformationIndex)
StructureDataInterface
getMatrixForTransform
in interface StructureDataInterface
bioassemblyIndex
- an integer specifying the bioassembly index (zero indexed).transformationIndex
- an integer specifying the index for the desired transformation (zero indexed).public int[] getInterGroupBondIndices()
StructureDataInterface
getInterGroupBondIndices
in interface StructureDataInterface
public int[] getInterGroupBondOrders()
StructureDataInterface
getInterGroupBondOrders
in interface StructureDataInterface
public String getMmtfVersion()
StructureDataInterface
getMmtfVersion
in interface StructureDataInterface
public String getMmtfProducer()
StructureDataInterface
getMmtfProducer
in interface StructureDataInterface
public int getNumEntities()
StructureDataInterface
getNumEntities
in interface StructureDataInterface
public String getEntityDescription(int entityInd)
StructureDataInterface
getEntityDescription
in interface StructureDataInterface
entityInd
- the index of the specified entity.public String getEntityType(int entityInd)
StructureDataInterface
getEntityType
in interface StructureDataInterface
entityInd
- the index of the specified entity.public int[] getEntityChainIndexList(int entityInd)
StructureDataInterface
getEntityChainIndexList
in interface StructureDataInterface
entityInd
- the index of the specified entity.public String getEntitySequence(int entityInd)
StructureDataInterface
getEntitySequence
in interface StructureDataInterface
entityInd
- the index of the specified entity.public String getStructureId()
StructureDataInterface
getStructureId
in interface StructureDataInterface
public int getNumModels()
StructureDataInterface
getNumModels
in interface StructureDataInterface
public int getNumChains()
StructureDataInterface
getNumChains
in interface StructureDataInterface
StructureDataInterface.getChainsPerModel()
public int getNumGroups()
StructureDataInterface
getNumGroups
in interface StructureDataInterface
public int getNumAtoms()
StructureDataInterface
getNumAtoms
in interface StructureDataInterface
public float getRfree()
StructureDataInterface
getRfree
in interface StructureDataInterface
public float getRwork()
StructureDataInterface
getRwork
in interface StructureDataInterface
public float getResolution()
StructureDataInterface
getResolution
in interface StructureDataInterface
public String getTitle()
StructureDataInterface
getTitle
in interface StructureDataInterface
public String[] getExperimentalMethods()
StructureDataInterface
getExperimentalMethods
in interface StructureDataInterface
public String getDepositionDate()
StructureDataInterface
getDepositionDate
in interface StructureDataInterface
public void initStructure(int totalNumBonds, int totalNumAtoms, int totalNumGroups, int totalNumChains, int totalNumModels, String structureId)
StructureAdapterInterface
initStructure
in interface StructureAdapterInterface
totalNumBonds
- the total number of bonds in the structuretotalNumAtoms
- the total number of atoms found in the data.totalNumGroups
- the total number of groups found in the data.totalNumChains
- the total number of chains found in the data.totalNumModels
- the total number of models found in the data.structureId
- an identifier for the structure (e.g. PDB id).public void finalizeStructure()
StructureAdapterInterface
finalizeStructure
in interface StructureAdapterInterface
public void setModelInfo(int modelId, int chainCount)
StructureAdapterInterface
setModelInfo
in interface StructureAdapterInterface
modelId
- identifier of the model within the structurechainCount
- total number of chains within this modelpublic void setChainInfo(String chainId, String chainName, int groupCount)
StructureAdapterInterface
setChainInfo
in interface StructureAdapterInterface
chainId
- chain identifier - length of one to fourchainName
- chain name - public chain idgroupCount
- number of groups/residues in chainpublic void setEntityInfo(int[] chainIndices, String sequence, String description, String title)
StructureAdapterInterface
setEntityInfo
in interface StructureAdapterInterface
chainIndices
- the indices of the chain this refers to.sequence
- the full sequence of the entitydescription
- the text description of the entitytitle
- as a string (POLYMER/NON-POLYMER and WATER)public void setGroupInfo(String groupName, int groupNumber, char insertionCode, String polymerType, int atomCount, int bondCount, char singleAtomCode, int sequenceIndex, int secStructType)
StructureAdapterInterface
setGroupInfo
in interface StructureAdapterInterface
groupName
- 3 letter code name of this group/residuegroupNumber
- sequence position of this groupinsertionCode
- the one letter insertion codepolymerType
- a string indicating the type of group (as found in the chemcomp dictionary. Empty string if none available.atomCount
- the number of atoms in the groupbondCount
- the number of unique bonds in the groupsingleAtomCode
- the single letter code of the groupsequenceIndex
- the index of this group in the sequencesecStructType
- the type of secondary structure used (types are according to DSSP and number to
type mappings are defined in the specification)public void setAtomInfo(String atomName, int serialNumber, char alternativeLocationId, float x, float y, float z, float occupancy, float temperatureFactor, String element, int charge)
StructureAdapterInterface
setAtomInfo
in interface StructureAdapterInterface
atomName
- 1-3 long string of the unique name of the atomserialNumber
- a number counting atoms in a structurealternativeLocationId
- a character indicating the alternate
location of the atomx
- the x cartesian coordinatey
- the y cartesian coordinatez
- the z cartesian coordinateoccupancy
- the atomic occupancytemperatureFactor
- the B factor (temperature factor)element
- a 1-3 long string indicating the chemical element of the atomcharge
- the atomic chargepublic void setBioAssemblyTrans(int bioAssemblyIndex, int[] chainIndices, double[] transform, String name)
StructureAdapterInterface
setBioAssemblyTrans
in interface StructureAdapterInterface
bioAssemblyIndex
- an integer index of this bioassembly.chainIndices
- the integer indices of the chains involved in this bioassembly.transform
- a list of doubles indicating the transform for this bioassembly.name
- the name of the bioassemblypublic void setXtalInfo(String spaceGroup, float[] unitCell, double[][] ncsOperMatrixList)
StructureAdapterInterface
setXtalInfo
in interface StructureAdapterInterface
spaceGroup
- the space group name, e.g. "P 21 21 21"unitCell
- an array of length 6 with the unit cell parameters in order: a, b, c, alpha, beta, gammancsOperMatrixList
- the list of NCS operation matricespublic void setGroupBond(int firstAtomIndex, int secondAtomIndex, int bondOrder)
StructureAdapterInterface
setGroupBond
in interface StructureAdapterInterface
firstAtomIndex
- the atom index of the first partner in the bondsecondAtomIndex
- the atom index of the second partner in the bondbondOrder
- the bond orderpublic void setInterGroupBond(int firstAtomIndex, int secondAtomIndex, int bondOrder)
StructureAdapterInterface
setInterGroupBond
in interface StructureAdapterInterface
firstAtomIndex
- the atom index of the first partner in the bondsecondAtomIndex
- the atom index of the second partner in the bondbondOrder
- the bond orderpublic void setHeaderInfo(float rFree, float rWork, float resolution, String title, String depositionDate, String releaseDate, String[] experimnetalMethods)
StructureAdapterInterface
setHeaderInfo
in interface StructureAdapterInterface
rFree
- the measured R-Free for the structurerWork
- the measure R-Work for the structureresolution
- the resolution of the structuretitle
- the title of the structuredepositionDate
- the deposition date of the structurereleaseDate
- the release date of the structureexperimnetalMethods
- the list of experimental methods in the structurepublic int getNumBonds()
StructureDataInterface
getNumBonds
in interface StructureDataInterface
public int[] getSecStructList()
StructureDataInterface
getSecStructList
in interface StructureDataInterface
public String getReleaseDate()
StructureDataInterface
getReleaseDate
in interface StructureDataInterface
public double[][] getNcsOperatorList()
StructureDataInterface
getNcsOperatorList
in interface StructureDataInterface
public String getBioassemblyName(int bioassemblyIndex)
StructureDataInterface
getBioassemblyName
in interface StructureDataInterface
bioassemblyIndex
- an integer specifying the bioassembly index (zero indexed).Copyright © 2015–2016 RCSB PDB. All rights reserved.