Class ImmutableDefaultPdbModel
- All Implemented Interfaces:
Serializable,PdbModel,ResidueCollection
DefaultPdbModel.
Use the builder to create immutable instances:
ImmutableDefaultPdbModel.builder().
Use the static factory method to create immutable instances:
ImmutableDefaultPdbModel.of().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDefaultPdbModel.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 forImmutableDefaultPdbModel.chains()Groups together residues in the same chain and repeat that for every chain.static ImmutableDefaultPdbModelcopyOf(DefaultPdbModel instance) Creates an immutable copy of aDefaultPdbModelvalue.booleanThis instance is equal to all instances ofImmutableDefaultPdbModelthat have equal attribute values.inthashCode()Computes a hash code from attributes:atoms.header()intstatic ImmutableDefaultPdbModelof(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) Construct a new immutableDefaultPdbModelinstance.static ImmutableDefaultPdbModelof(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, List<PdbAtomLine> atoms, List<PdbModresLine> modifiedResidues, List<PdbRemark465Line> missingResidues, String title, Set<PdbResidueIdentifier> chainTerminatedAfter) Construct a new immutableDefaultPdbModelinstance.residues()Groups together atoms from the same residue and repeat that for every residue.title()toString()Prints the immutable valueDefaultPdbModelwith attribute values.final ImmutableDefaultPdbModelwithAtoms(Iterable<? extends PdbAtomLine> elements) Copy the current immutable object with elements that replace the content ofatoms.final ImmutableDefaultPdbModelwithAtoms(PdbAtomLine... elements) Copy the current immutable object with elements that replace the content ofatoms.final ImmutableDefaultPdbModelwithChainTerminatedAfter(Iterable<? extends PdbResidueIdentifier> elements) Copy the current immutable object with elements that replace the content ofchainTerminatedAfter.final ImmutableDefaultPdbModelwithChainTerminatedAfter(PdbResidueIdentifier... elements) Copy the current immutable object with elements that replace the content ofchainTerminatedAfter.final ImmutableDefaultPdbModelCopy the current immutable object by setting a value for theexperimentalDataattribute.final ImmutableDefaultPdbModelwithHeader(PdbHeaderLine value) Copy the current immutable object by setting a value for theheaderattribute.final ImmutableDefaultPdbModelwithMissingResidues(Iterable<? extends PdbRemark465Line> elements) Copy the current immutable object with elements that replace the content ofmissingResidues.final ImmutableDefaultPdbModelwithMissingResidues(PdbRemark465Line... elements) Copy the current immutable object with elements that replace the content ofmissingResidues.final ImmutableDefaultPdbModelwithModelNumber(int value) Copy the current immutable object by setting a value for themodelNumberattribute.final ImmutableDefaultPdbModelwithModifiedResidues(Iterable<? extends PdbModresLine> elements) Copy the current immutable object with elements that replace the content ofmodifiedResidues.final ImmutableDefaultPdbModelwithModifiedResidues(PdbModresLine... elements) Copy the current immutable object with elements that replace the content ofmodifiedResidues.final ImmutableDefaultPdbModelwithResolution(PdbRemark2Line value) Copy the current immutable object by setting a value for theresolutionattribute.final ImmutableDefaultPdbModelCopy the current immutable object by setting a value for thetitleattribute.Methods inherited from class pl.poznan.put.pdb.analysis.DefaultPdbModel
filteredNewInstance, normalize, ofMethods 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 classDefaultPdbModel- Returns:
- The value of the
headerattribute
-
experimentalData
- Specified by:
experimentalDatain interfacePdbModel- Specified by:
experimentalDatain classDefaultPdbModel- Returns:
- The value of the
experimentalDataattribute
-
resolution
- Specified by:
resolutionin interfacePdbModel- Specified by:
resolutionin classDefaultPdbModel- Returns:
- The value of the
resolutionattribute
-
modelNumber
public int modelNumber()- Specified by:
modelNumberin interfacePdbModel- Specified by:
modelNumberin classDefaultPdbModel- Returns:
- The value of the
modelNumberattribute
-
atoms
- Specified by:
atomsin interfacePdbModel- Specified by:
atomsin classDefaultPdbModel- Returns:
- The value of the
atomsattribute
-
modifiedResidues
- Specified by:
modifiedResiduesin interfacePdbModel- Specified by:
modifiedResiduesin classDefaultPdbModel- Returns:
- The value of the
modifiedResiduesattribute
-
missingResidues
- Specified by:
missingResiduesin interfacePdbModel- Specified by:
missingResiduesin classDefaultPdbModel- Returns:
- The value of the
missingResiduesattribute
-
title
- Specified by:
titlein interfacePdbModel- Specified by:
titlein classDefaultPdbModel- Returns:
- The value of the
titleattribute
-
chainTerminatedAfter
- Specified by:
chainTerminatedAfterin interfacePdbModel- Specified by:
chainTerminatedAfterin classDefaultPdbModel- Returns:
- The value of the
chainTerminatedAfterattribute
-
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 ImmutableDefaultPdbModel 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 ImmutableDefaultPdbModel 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 ImmutableDefaultPdbModel 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
-
equals
This instance is equal to all instances ofImmutableDefaultPdbModelthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:atoms. -
toString
Prints the immutable valueDefaultPdbModelwith 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 classDefaultPdbModel- 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 classDefaultPdbModel- Returns:
- A lazily initialized value of the
residuesattribute
-
of
public static ImmutableDefaultPdbModel of(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, List<PdbAtomLine> atoms, List<PdbModresLine> modifiedResidues, List<PdbRemark465Line> missingResidues, String title, Set<PdbResidueIdentifier> chainTerminatedAfter) Construct a new immutableDefaultPdbModelinstance.- 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 thechainTerminatedAfterattribute- Returns:
- An immutable DefaultPdbModel instance
-
of
public static ImmutableDefaultPdbModel 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) Construct a new immutableDefaultPdbModelinstance.- 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 thechainTerminatedAfterattribute- Returns:
- An immutable DefaultPdbModel instance
-
copyOf
Creates an immutable copy of aDefaultPdbModelvalue. 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 DefaultPdbModel instance
-
builder
Creates a builder forImmutableDefaultPdbModel.ImmutableDefaultPdbModel.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 .build();- Returns:
- A new ImmutableDefaultPdbModel builder
-