public class MmtfStructure extends Object implements Structure
Structures for mmtf structures.| Constructor and Description |
|---|
MmtfStructure(byte[] bytes)
Creates a new
MmtfStructure |
MmtfStructure(byte[] bytes,
boolean deflate)
Creates a new
MmtfStructure |
| Modifier and Type | Method and Description |
|---|---|
List<Chain> |
getAllChains()
Returns all
Chains. |
List<LeafSubstructure<?>> |
getAllLeafSubstructures()
Returns all
LeafSubstructures. |
Set<Integer> |
getAllModelIdentifiers()
Returns all model identifiers referenced in the model.
|
List<Model> |
getAllModels()
Returns all
Models. |
Optional<Atom> |
getAtom(Integer atomIdentifier)
|
Optional<Chain> |
getChain(int modelIdentifier,
String chainIdentifier)
|
Structure |
getCopy()
Returns a copy of this structure.
|
Chain |
getFirstChain()
Returns the first
Chain. |
LeafSubstructure<?> |
getFirstLeafSubstructure() |
Model |
getFirstModel()
Returns the first
Model (with the smallest identifier). |
Optional<LeafSubstructure<?>> |
getLeafSubstructure(LeafIdentifier leafIdentifier)
Returns an
Optional of the LeafSubstructure with the given identifier. |
Optional<Model> |
getModel(int modelIdentifier)
|
int |
getNumberOfLeafSubstructures() |
String |
getPdbIdentifier()
Returns the PDB identifier, a 4 character code, where the first character is any number followed by three
alphanumeric characters.
|
String |
getTitle()
Returns the title.
|
void |
removeAtom(Integer atomIdentifier)
Removes an atom from this container.
|
boolean |
removeLeafSubstructure(LeafIdentifier leafIdentifier)
Removes a
LeafSubstructure from this container. |
void |
removeLeafSubstructuresNotRelevantFor(LeafSubstructureContainer leafSubstructuresToKeep)
Removes all
LeafSubstructures from this container that are not referenced in the given
LeafSubstructureContainer. |
void |
removeModel(int modelIdentifier)
Removes a
Model with the given identifier from the structure. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitflatToStringgetAllAminoAcids, getAllAtoms, getAllLigands, getAllNucleotides, getAminoAcid, getAtom, getLigand, getNucleotide, removeLeafSubstructurepublic MmtfStructure(byte[] bytes)
MmtfStructurebytes - The original undecoded bytes.public MmtfStructure(byte[] bytes,
boolean deflate)
MmtfStructurebytes - The original undecoded bytes.deflate - Signifies if the byte array should be deflated.public String getPdbIdentifier()
StructuregetPdbIdentifier in interface StructurePDBIdentifierpublic List<Model> getAllModels()
StructureModels.getAllModels in interface Structurepublic Set<Integer> getAllModelIdentifiers()
StructuregetAllModelIdentifiers in interface Structurepublic Model getFirstModel()
StructureModel (with the smallest identifier).getFirstModel in interface Structurepublic Optional<Model> getModel(int modelIdentifier)
Structurepublic void removeModel(int modelIdentifier)
StructureModel with the given identifier from the structure.removeModel in interface StructuremodelIdentifier - The identifier of the model.public List<Chain> getAllChains()
ChainContainerChains.getAllChains in interface ChainContainerChains.public Chain getFirstChain()
ChainContainerChain.getFirstChain in interface ChainContainerChain.public Optional<Chain> getChain(int modelIdentifier, String chainIdentifier)
Structurepublic List<LeafSubstructure<?>> getAllLeafSubstructures()
LeafSubstructureContainerLeafSubstructures.getAllLeafSubstructures in interface LeafSubstructureContainerLeafSubstructures.public Optional<LeafSubstructure<?>> getLeafSubstructure(LeafIdentifier leafIdentifier)
LeafSubstructureContainerOptional of the LeafSubstructure with the given identifier. If no LeafSubstructure
with the identifier could be found, an empty optional is returned.getLeafSubstructure in interface LeafSubstructureContainerleafIdentifier - The identifier of the leaf.Optional encapsulating the LeafSubstructure.public LeafSubstructure<?> getFirstLeafSubstructure()
getFirstLeafSubstructure in interface LeafSubstructureContainerpublic boolean removeLeafSubstructure(LeafIdentifier leafIdentifier)
LeafSubstructureContainerLeafSubstructure from this container.removeLeafSubstructure in interface LeafSubstructureContainerleafIdentifier - The identifier of the leaf.LeafSubstructure was removed.public void removeLeafSubstructuresNotRelevantFor(LeafSubstructureContainer leafSubstructuresToKeep)
LeafSubstructureContainerLeafSubstructures from this container that are not referenced in the given
LeafSubstructureContainer. Basically all LeafSubstructures are removed that do not match any of the
given containers families. This method also keeps exchangeable families if any are defined.removeLeafSubstructuresNotRelevantFor in interface LeafSubstructureContainerleafSubstructuresToKeep - The leaf structures that are kept.public int getNumberOfLeafSubstructures()
getNumberOfLeafSubstructures in interface LeafSubstructureContainerpublic Optional<Atom> getAtom(Integer atomIdentifier)
AtomContainerOptional of the Atom with the given identifier. If no Atom with the identifier could
be found, an empty optional is returned.getAtom in interface AtomContaineratomIdentifier - The identifier of the atom.Optional encapsulating the Atom.public void removeAtom(Integer atomIdentifier)
AtomContainerremoveAtom in interface AtomContaineratomIdentifier - The identifier of the atom to be removed.public Structure getCopy()
StructuregetCopy in interface LeafSubstructureContainergetCopy in interface StructureCopyright © 2018. All rights reserved.