Class BioResolver

java.lang.Object
org.jmol.modelsetbio.BioResolver
All Implemented Interfaces:
Comparator<String[]>

public final class BioResolver extends Object implements Comparator<String[]>
a class used by ModelLoader to handle all loading of operations specific to PDB/mmCIF files. By loading only by class name, only loaded if PDB file is called. In addition, constants relating only to PDB files are here -- for coloring by chain, selecting by protein, etc.
  • Field Details

    • htGroup

      public static final Map<String,Short> htGroup
    • pdbBondInfo

      public static final String[] pdbBondInfo
      pdbBondInfo describes in a compact way what the hydrogen atom names are for each standard amino acid. This list consists of pairs of attached atom/hydrogen atom names, with abbreviations N, C, O, B, D, G, 1, and 2 (for N, C, O, CB, CD, CG, C1', and C2', respectively) given in pdbHAttachments, above. Note that we never add HXT or NH3 "?" here is for methyl groups with H1, H2, H3. "@" indicates a prochiral center, with the assignment order given here
    • group3NameCount

      public static short group3NameCount
    • ATOMID_MAX

      public static final int ATOMID_MAX
  • Constructor Details

    • BioResolver

      public BioResolver()
  • Method Details

    • setLoader

      public BioResolver setLoader(ModelLoader modelLoader)
    • setViewer

      public BioResolver setViewer(Viewer vwr)
    • getBioModel

      public Model getBioModel(int modelIndex, int trajectoryBaseIndex, String jmolData, Properties modelProperties, Map<String,Object> modelAuxiliaryInfo)
    • distinguishAndPropagateGroup

      public Group distinguishAndPropagateGroup(Chain chain, String group3, int seqcode, int firstAtomIndex, int lastAtomIndex, int[] specialAtomIndexes, Atom[] atoms)
    • setHaveHsAlready

      public void setHaveHsAlready(boolean b)
    • initializeHydrogenAddition

      public void initializeHydrogenAddition()
    • addImplicitHydrogenAtoms

      public void addImplicitHydrogenAtoms(JmolAdapter adapter, int iGroup, int nH)
      Get bonding info for double bonds and add implicit hydrogen atoms, if needed.
      Parameters:
      adapter -
      iGroup - this group
      nH - legacy quirk
    • compare

      public int compare(String[] a, String[] b)
      Specified by:
      compare in interface Comparator<String[]>
    • finalizeHydrogens

      public void finalizeHydrogens()
    • fixPropertyValue

      public Object fixPropertyValue(BS bsAtoms, Object data, boolean toHydrogens)
    • iterateOverAllNewStructures

      public void iterateOverAllNewStructures(JmolAdapter adapter, Object atomSetCollection)
      Pull in all spans of helix, etc. in the file(s) We do turn first, because sometimes a group is defined twice, and this way it gets marked as helix or sheet if it is both one of those and turn. Jmol 14.3 - adds sequence ANNOTATION
      Parameters:
      adapter -
      atomSetCollection -
    • setGroupLists

      public void setGroupLists(int ipt)
    • isKnownPDBGroup

      public boolean isKnownPDBGroup(String g3, int max)
      Parameters:
      g3 -
      max - max ID (e.g. 20); can be Integer.MAX_VALUE to allow carbohydrate
      Returns:
      true if found
    • lookupSpecialAtomID

      public byte lookupSpecialAtomID(String name)
    • knownGroupID

      public static short knownGroupID(String group3)
    • isHetero

      public boolean isHetero(String group3)
      MMCif, Gromacs, MdTop, Mol2 readers only
      Parameters:
      group3 -
      Returns:
      true if an identified hetero group
    • toStdAmino3

      public String toStdAmino3(String g1)
    • getGroupID

      public short getGroupID(String g3)
    • getArgbs

      public int[] getArgbs(int tok)
    • getBioModelSet

      public BioModelSet getBioModelSet(ModelSet modelSet)