public class MmtfModel extends Object implements Model
Model for mmtf structures. Remembers the index of the model and a mapping of chain
identifiers relevant for this model, as well as their respective identifiers in the chain data arrays.| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getAllChainIdentifiers()
Returns A set of all chin identifiers referenced in th model.
|
List<Chain> |
getAllChains()
Returns all
Chains. |
List<LeafSubstructure<?>> |
getAllLeafSubstructures()
Returns all
LeafSubstructures. |
Optional<Atom> |
getAtom(Integer atomIdentifier)
|
Optional<Chain> |
getChain(String chainIdentifier)
|
Model |
getCopy()
Returns a copy of this model.
|
Chain |
getFirstChain()
Returns the first
Chain. |
LeafSubstructure<?> |
getFirstLeafSubstructure() |
Optional<LeafSubstructure<?>> |
getLeafSubstructure(LeafIdentifier leafIdentifier)
Returns an
Optional of the LeafSubstructure with the given identifier. |
Integer |
getModelIdentifier()
Returns the model identifier, an integer greater or equal to 1.
|
int |
getNumberOfLeafSubstructures() |
void |
removeAtom(Integer atomIdentifier)
Removes an atom from this container.
|
void |
removeChain(String chainIdentifier)
Removes a
Chain with the given identifier from the structure. |
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. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitflatToStringgetAllAminoAcids, getAllAtoms, getAllLigands, getAllNucleotides, getAminoAcid, getAtom, getLigand, getNucleotide, removeLeafSubstructurepublic Integer getModelIdentifier()
ModelgetModelIdentifier in interface Modelpublic List<Chain> getAllChains()
ChainContainerChains.getAllChains in interface ChainContainerChains.public Set<String> getAllChainIdentifiers()
ModelgetAllChainIdentifiers in interface Modelpublic Chain getFirstChain()
ChainContainerChain.getFirstChain in interface ChainContainerChain.public Optional<Chain> getChain(String chainIdentifier)
Modelpublic void removeChain(String chainIdentifier)
ModelChain with the given identifier from the structure.removeChain in interface ModelchainIdentifier - The identifier of the chain.public 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 Model getCopy()
ModelgetCopy in interface LeafSubstructureContainergetCopy in interface ModelCopyright © 2018. All rights reserved.