Enum Class DensityFileFormat

java.lang.Object
java.lang.Enum<DensityFileFormat>
org.biojava.nbio.structure.io.density.DensityFileFormat
All Implemented Interfaces:
Serializable, Comparable<DensityFileFormat>, java.lang.constant.Constable

public enum DensityFileFormat extends Enum<DensityFileFormat>
The file format a density map was delivered in.

The important distinction here is isJmolLoadable(). Most of these formats are sampled grids that a viewer can contour directly; map coefficients are not, they are structure factors that require a Fourier transform first. Handing the latter to a viewer produces nothing at all, so the difference has to be visible to callers.

Since:
7.3.0
Author:
Amr ALHOSSARY
  • Enum Constant Details

    • CCP4

      public static final DensityFileFormat CCP4
      A CCP4/MRC sampled map, as served pre-computed by PDBe.
    • CCP4_GZ

      public static final DensityFileFormat CCP4_GZ
      A gzipped CCP4/MRC map, the form EMDB distributes its primary maps in.
    • BCIF_VOLUME

      public static final DensityFileFormat BCIF_VOLUME
      A BinaryCIF volume slice from a Mol* density server.
    • CIF_VOLUME

      public static final DensityFileFormat CIF_VOLUME
      A text CIF volume slice from a Mol* density server.
    • MAP_COEFFICIENTS_CIF_GZ

      public static final DensityFileFormat MAP_COEFFICIENTS_CIF_GZ
      Structure-factor amplitudes and phases in mmCIF, as published with the wwPDB validation reports. Not a density grid. A Fourier transform (for example gemmi sf2map, or CCP4's fft after cif2mtz) is needed before these can be displayed.
  • Method Details

    • values

      public static DensityFileFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DensityFileFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getExtension

      public String getExtension()
      Returns:
      the file extension used for cached files of this format, including the leading dot
    • isJmolLoadable

      public boolean isJmolLoadable()
      Whether a viewer can contour this file as it stands.
      Returns:
      false for MAP_COEFFICIENTS_CIF_GZ, which needs an FFT first; true for the sampled grid formats
    • isCompressed

      public boolean isCompressed()
      Whether files of this format are gzip-compressed on disk. Jmol detects gzip from the magic bytes, so such files do not need decompressing before display.
      Returns:
      true for the compressed formats