public class MmtfChain extends Object implements Chain
Chain for mmtf structures. Remembers the chain identifier, the leaf relevant for this
chain, their respective leaf identifiers, and atom ranges.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
List<LeafSubstructure<?>> |
getAllLeafSubstructures()
Returns all
LeafSubstructures. |
Optional<Atom> |
getAtom(Integer atomIdentifier)
|
String |
getChainIdentifier()
Returns the chain identifier, a short sequence of alphabetic characters.
|
Chain |
getCopy()
Returns a copy of this chain.
|
LeafSubstructure<?> |
getFirstLeafSubstructure() |
Optional<LeafSubstructure<?>> |
getLeafSubstructure(LeafIdentifier leafIdentifier)
Returns an
Optional of the LeafSubstructure with the given identifier. |
int |
getNumberOfLeafSubstructures() |
int |
hashCode() |
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. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitflatToStringgetAllAminoAcids, getAllAtoms, getAllLigands, getAllNucleotides, getAminoAcid, getAtom, getLigand, getNucleotide, removeLeafSubstructurepublic String getChainIdentifier()
ChaingetChainIdentifier in interface Chainpublic 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)
LeafSubstructures 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.
Further, this method does not cache the leafs that are being removed in contrary to the default implementation.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 Chain getCopy()
ChaingetCopy in interface ChaingetCopy in interface LeafSubstructureContainerCopyright © 2018. All rights reserved.