Class ImmutableDefaultCifModel
- All Implemented Interfaces:
Serializable,CifModel,PdbModel,ResidueCollection
DefaultCifModel.
Use the builder to create immutable instances:
ImmutableDefaultCifModel.builder().
Use the static factory method to create immutable instances:
ImmutableDefaultCifModel.of().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDefaultCifModel.Nested classes/interfaces inherited from interface pl.poznan.put.pdb.analysis.ResidueCollection
ResidueCollection.CifBuilder, ResidueCollection.PdbBuilder -
Method Summary
Modifier and TypeMethodDescriptionatoms()builder()Creates a builder forImmutableDefaultCifModel.chains()Groups together residues in the same chain and repeat that for every chain.static ImmutableDefaultCifModelcopyOf(DefaultCifModel instance) Creates an immutable copy of aDefaultCifModelvalue.booleanThis instance is equal to all instances ofImmutableDefaultCifModelthat have equal attribute values.inthashCode()Computes a hash code from attributes:atoms.header()intstatic ImmutableDefaultCifModelof(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, Iterable<? extends PdbAtomLine> atoms, Iterable<? extends PdbModresLine> modifiedResidues, Iterable<? extends PdbRemark465Line> missingResidues, String title, Iterable<? extends PdbResidueIdentifier> chainTerminatedAfter, Iterable<? extends QuantifiedBasePair> basePairs) Construct a new immutableDefaultCifModelinstance.static ImmutableDefaultCifModelof(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, List<PdbAtomLine> atoms, List<PdbModresLine> modifiedResidues, List<PdbRemark465Line> missingResidues, String title, Set<PdbResidueIdentifier> chainTerminatedAfter, List<QuantifiedBasePair> basePairs) Construct a new immutableDefaultCifModelinstance.residues()Groups together atoms from the same residue and repeat that for every residue.title()toString()Prints the immutable valueDefaultCifModelwith attribute values.final ImmutableDefaultCifModelwithAtoms(Iterable<? extends PdbAtomLine> elements) Copy the current immutable object with elements that replace the content ofatoms.final ImmutableDefaultCifModelwithAtoms(PdbAtomLine... elements) Copy the current immutable object with elements that replace the content ofatoms.final ImmutableDefaultCifModelwithBasePairs(Iterable<? extends QuantifiedBasePair> elements) Copy the current immutable object with elements that replace the content ofbasePairs.final ImmutableDefaultCifModelwithBasePairs(QuantifiedBasePair... elements) Copy the current immutable object with elements that replace the content ofbasePairs.final ImmutableDefaultCifModelwithChainTerminatedAfter(Iterable<? extends PdbResidueIdentifier> elements) Copy the current immutable object with elements that replace the content ofchainTerminatedAfter.final ImmutableDefaultCifModelwithChainTerminatedAfter(PdbResidueIdentifier... elements) Copy the current immutable object with elements that replace the content ofchainTerminatedAfter.final ImmutableDefaultCifModelCopy the current immutable object by setting a value for theexperimentalDataattribute.final ImmutableDefaultCifModelwithHeader(PdbHeaderLine value) Copy the current immutable object by setting a value for theheaderattribute.final ImmutableDefaultCifModelwithMissingResidues(Iterable<? extends PdbRemark465Line> elements) Copy the current immutable object with elements that replace the content ofmissingResidues.final ImmutableDefaultCifModelwithMissingResidues(PdbRemark465Line... elements) Copy the current immutable object with elements that replace the content ofmissingResidues.final ImmutableDefaultCifModelwithModelNumber(int value) Copy the current immutable object by setting a value for themodelNumberattribute.final ImmutableDefaultCifModelwithModifiedResidues(Iterable<? extends PdbModresLine> elements) Copy the current immutable object with elements that replace the content ofmodifiedResidues.final ImmutableDefaultCifModelwithModifiedResidues(PdbModresLine... elements) Copy the current immutable object with elements that replace the content ofmodifiedResidues.final ImmutableDefaultCifModelwithResolution(PdbRemark2Line value) Copy the current immutable object by setting a value for theresolutionattribute.final ImmutableDefaultCifModelCopy the current immutable object by setting a value for thetitleattribute.Methods inherited from class pl.poznan.put.pdb.analysis.DefaultCifModel
filteredNewInstance, normalizeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface pl.poznan.put.pdb.analysis.PdbModel
containsAny, filteredMissing, findChainContainingResidue, idCode, isModified, modificationDetailsMethods inherited from interface pl.poznan.put.pdb.analysis.ResidueCollection
filteredAtoms, findBondLengthViolations, findResidue, hasResidue, indexOf, namedResidueIdentifiers, residueIdentifiers, sequence, toCif, toPdb, withoutAlternateLocations
-
Method Details
-
header
- Specified by:
headerin interfacePdbModel- Specified by:
headerin classDefaultCifModel- Returns:
- The value of the
headerattribute
-
experimentalData
- Specified by:
experimentalDatain interfacePdbModel- Specified by:
experimentalDatain classDefaultCifModel- Returns:
- The value of the
experimentalDataattribute
-
resolution
- Specified by:
resolutionin interfacePdbModel- Specified by:
resolutionin classDefaultCifModel- Returns:
- The value of the
resolutionattribute
-
modelNumber
public int modelNumber()- Specified by:
modelNumberin interfacePdbModel- Specified by:
modelNumberin classDefaultCifModel- Returns:
- The value of the
modelNumberattribute
-
atoms
- Specified by:
atomsin interfacePdbModel- Specified by:
atomsin classDefaultCifModel- Returns:
- The value of the
atomsattribute
-
modifiedResidues
- Specified by:
modifiedResiduesin interfacePdbModel- Specified by:
modifiedResiduesin classDefaultCifModel- Returns:
- The value of the
modifiedResiduesattribute
-
missingResidues
- Specified by:
missingResiduesin interfacePdbModel- Specified by:
missingResiduesin classDefaultCifModel- Returns:
- The value of the
missingResiduesattribute
-
title
- Specified by:
titlein interfacePdbModel- Specified by:
titlein classDefaultCifModel- Returns:
- The value of the
titleattribute
-
chainTerminatedAfter
- Specified by:
chainTerminatedAfterin interfacePdbModel- Specified by:
chainTerminatedAfterin classDefaultCifModel- Returns:
- The value of the
chainTerminatedAfterattribute
-
basePairs
- Specified by:
basePairsin interfaceCifModel- Specified by:
basePairsin classDefaultCifModel- Returns:
- The value of the
basePairsattribute
-
withHeader
Copy the current immutable object by setting a value for theheaderattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for header- Returns:
- A modified copy of the
thisobject
-
withExperimentalData
Copy the current immutable object by setting a value for theexperimentalDataattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for experimentalData- Returns:
- A modified copy of the
thisobject
-
withResolution
Copy the current immutable object by setting a value for theresolutionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for resolution- Returns:
- A modified copy of the
thisobject
-
withModelNumber
Copy the current immutable object by setting a value for themodelNumberattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for modelNumber- Returns:
- A modified copy of the
thisobject
-
withAtoms
Copy the current immutable object with elements that replace the content ofatoms.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAtoms
Copy the current immutable object with elements that replace the content ofatoms. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of atoms elements to set- Returns:
- A modified copy of
thisobject
-
withModifiedResidues
Copy the current immutable object with elements that replace the content ofmodifiedResidues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withModifiedResidues
public final ImmutableDefaultCifModel withModifiedResidues(Iterable<? extends PdbModresLine> elements) Copy the current immutable object with elements that replace the content ofmodifiedResidues. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of modifiedResidues elements to set- Returns:
- A modified copy of
thisobject
-
withMissingResidues
Copy the current immutable object with elements that replace the content ofmissingResidues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMissingResidues
public final ImmutableDefaultCifModel withMissingResidues(Iterable<? extends PdbRemark465Line> elements) Copy the current immutable object with elements that replace the content ofmissingResidues. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of missingResidues elements to set- Returns:
- A modified copy of
thisobject
-
withTitle
Copy the current immutable object by setting a value for thetitleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for title- Returns:
- A modified copy of the
thisobject
-
withChainTerminatedAfter
Copy the current immutable object with elements that replace the content ofchainTerminatedAfter.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withChainTerminatedAfter
public final ImmutableDefaultCifModel withChainTerminatedAfter(Iterable<? extends PdbResidueIdentifier> elements) Copy the current immutable object with elements that replace the content ofchainTerminatedAfter. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of chainTerminatedAfter elements to set- Returns:
- A modified copy of
thisobject
-
withBasePairs
Copy the current immutable object with elements that replace the content ofbasePairs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBasePairs
public final ImmutableDefaultCifModel withBasePairs(Iterable<? extends QuantifiedBasePair> elements) Copy the current immutable object with elements that replace the content ofbasePairs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of basePairs elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableDefaultCifModelthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:atoms. -
toString
Prints the immutable valueDefaultCifModelwith attribute values. -
chains
Groups together residues in the same chain and repeat that for every chain.Returns a lazily initialized value of the
chainsattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Specified by:
chainsin interfacePdbModel- Overrides:
chainsin classDefaultCifModel- Returns:
- A lazily initialized value of the
chainsattribute
-
residues
Groups together atoms from the same residue and repeat that for every residue.Returns a lazily initialized value of the
residuesattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Specified by:
residuesin interfaceResidueCollection- Overrides:
residuesin classDefaultCifModel- Returns:
- A lazily initialized value of the
residuesattribute
-
of
public static ImmutableDefaultCifModel of(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, List<PdbAtomLine> atoms, List<PdbModresLine> modifiedResidues, List<PdbRemark465Line> missingResidues, String title, Set<PdbResidueIdentifier> chainTerminatedAfter, List<QuantifiedBasePair> basePairs) Construct a new immutableDefaultCifModelinstance.- Parameters:
header- The value for theheaderattributeexperimentalData- The value for theexperimentalDataattributeresolution- The value for theresolutionattributemodelNumber- The value for themodelNumberattributeatoms- The value for theatomsattributemodifiedResidues- The value for themodifiedResiduesattributemissingResidues- The value for themissingResiduesattributetitle- The value for thetitleattributechainTerminatedAfter- The value for thechainTerminatedAfterattributebasePairs- The value for thebasePairsattribute- Returns:
- An immutable DefaultCifModel instance
-
of
public static ImmutableDefaultCifModel of(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, Iterable<? extends PdbAtomLine> atoms, Iterable<? extends PdbModresLine> modifiedResidues, Iterable<? extends PdbRemark465Line> missingResidues, String title, Iterable<? extends PdbResidueIdentifier> chainTerminatedAfter, Iterable<? extends QuantifiedBasePair> basePairs) Construct a new immutableDefaultCifModelinstance.- Parameters:
header- The value for theheaderattributeexperimentalData- The value for theexperimentalDataattributeresolution- The value for theresolutionattributemodelNumber- The value for themodelNumberattributeatoms- The value for theatomsattributemodifiedResidues- The value for themodifiedResiduesattributemissingResidues- The value for themissingResiduesattributetitle- The value for thetitleattributechainTerminatedAfter- The value for thechainTerminatedAfterattributebasePairs- The value for thebasePairsattribute- Returns:
- An immutable DefaultCifModel instance
-
copyOf
Creates an immutable copy of aDefaultCifModelvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable DefaultCifModel instance
-
builder
Creates a builder forImmutableDefaultCifModel.ImmutableDefaultCifModel.builder() .header(pl.poznan.put.pdb.PdbHeaderLine) // requiredheader.experimentalData(pl.poznan.put.pdb.PdbExpdtaLine) // requiredexperimentalData.resolution(pl.poznan.put.pdb.PdbRemark2Line) // requiredresolution.modelNumber(int) // requiredmodelNumber.addAtoms|addAllAtoms(pl.poznan.put.pdb.PdbAtomLine) //atomselements .addModifiedResidues|addAllModifiedResidues(pl.poznan.put.pdb.PdbModresLine) //modifiedResidueselements .addMissingResidues|addAllMissingResidues(pl.poznan.put.pdb.PdbRemark465Line) //missingResidueselements .title(String) // requiredtitle.addChainTerminatedAfter|addAllChainTerminatedAfter(pl.poznan.put.pdb.PdbResidueIdentifier) //chainTerminatedAfterelements .addBasePairs|addAllBasePairs(pl.poznan.put.structure.QuantifiedBasePair) //basePairselements .build();- Returns:
- A new ImmutableDefaultCifModel builder
-