Class ResidueCollection.CifBuilder

java.lang.Object
pl.poznan.put.pdb.analysis.ResidueCollection.CifBuilder
Enclosing interface:
ResidueCollection

public static final class ResidueCollection.CifBuilder extends Object
A builder that can merge many residue collections in one mmCIF file.
  • Constructor Details

    • CifBuilder

      public CifBuilder()
      Creates an instance of this build and initializes it with an audit, citation and citation_author headers.
  • Method Details

    • add

      public ResidueCollection.CifBuilder add(ResidueCollection residueCollection)
      Add a residue collection to be serialized into mmCIF format. Model number defaults to 1 and entity block is omitted entirely.
      Parameters:
      residueCollection - The residue collection to store.
      Returns:
      This instance of builder.
    • add

      public ResidueCollection.CifBuilder add(ResidueCollection residueCollection, String name)
      Add a residue collection to be serialized into mmCIF format. Model number defaults to 1 and description is empty.
      Parameters:
      residueCollection - The residue collection to store.
      name - The name of the residue collection.
      Returns:
      This instance of builder.
    • add

      public ResidueCollection.CifBuilder add(ResidueCollection residueCollection, String name, String description)
      Add a residue collection to be serialized into mmCIF format. Model number defaults to 1.
      Parameters:
      residueCollection - The residue collection to store.
      name - The name of the residue collection.
      description - An optional description (for example, the dot-bracket representation of the entity).
      Returns:
      This instance of builder.
    • add

      public ResidueCollection.CifBuilder add(ResidueCollection residueCollection, String name, String description, int modelNumber)
      Add a residue collection to be serialized into mmCIF format.
      Parameters:
      residueCollection - The residue collection to store.
      name - The name of the residue collection.
      description - An optional description (for example, the dot-bracket representation of the entity).
      modelNumber - The model number to store together with the coordinates.
      Returns:
      This instance of builder.
    • build

      public String build() throws IOException
      Returns:
      The string content in PDBx/mmCIF format.
      Throws:
      IOException - When serializing the mmCIF to string fails.