Class 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 Detail

      • vAB

        private javajs.util.V3 vAB
      • vNorm

        private javajs.util.V3 vNorm
      • plane

        private javajs.util.P4 plane
      • bsAddedMask

        private javajs.util.BS bsAddedMask
      • lastSetH

        private int lastSetH
      • maxSerial

        private int maxSerial
      • haveHsAlready

        private boolean haveHsAlready
      • bsAddedHydrogens

        private javajs.util.BS bsAddedHydrogens
      • bsAtomsForHs

        private javajs.util.BS bsAtomsForHs
      • hNames

        private String[] hNames
      • baseBondIndex

        private int baseBondIndex
      • bsAssigned

        private javajs.util.BS bsAssigned
      • types

        private static STR[] types
      • mytypes

        private static int[] mytypes
      • 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
      • pdbHydrogenCount

        private static final int[] pdbHydrogenCount
      • allCarbohydrates

        private static final String allCarbohydrates
        this form is used for counting groups in ModelSet GLX added for 13.1.16
        See Also:
        Constant Field Values
      • group3Count

        private static int group3Count
      • predefinedGroup1Names

        static final char[] predefinedGroup1Names
      • group3NameCount

        public static short group3NameCount
      • predefinedGroup3Names

        private static final String[] predefinedGroup3Names
      • specialAtomNames

        private static final String[] specialAtomNames
      • ATOMID_MAX

        public static final int ATOMID_MAX
      • htSpecialAtoms

        private static Map<String,​Byte> htSpecialAtoms
      • argbsAmino

        private static final int[] argbsAmino
      • argbsNucleic

        private static final int[] argbsNucleic
      • argbsChainAtom

        private static final int[] argbsChainAtom
        some pastel colors C0D0FF - pastel blue B0FFB0 - pastel green B0FFFF - pastel cyan FFC0C8 - pink FFC0FF - pastel magenta FFFF80 - pastel yellow FFDEAD - navajowhite FFD070 - pastel gold FF9898 - light coral B4E444 - light yellow-green C0C000 - light olive FF8060 - light tomato 00FF7F - springgreen cpk on; select atomno>100; label %i; color chain; select selected & hetero; cpk off
      • argbsChainHetero

        private static final int[] argbsChainHetero
      • argbsShapely

        private static final int[] argbsShapely
    • Constructor Detail

      • BioResolver

        public BioResolver()
    • Method Detail

      • 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)
      • getLigandBondInfo

        private String[][] getLigandBondInfo​(JmolAdapter adapter,
                                             Object model,
                                             String group3)
        reads PDB ligand CIF info and creates a bondInfo object.
        Parameters:
        adapter -
        model -
        group3 -
        Returns:
        [[atom1, atom2, order]...]
      • finalizeHydrogens

        public void finalizeHydrogens()
      • addHydrogens

        private void addHydrogens()
      • deleteUnneededAtoms

        private void deleteUnneededAtoms()
        Delete hydrogen atoms that are still in bsAddedHydrogens, because they were not actually added. Also delete ligand hydrogen atoms from CO2- and PO3(2-) Note that we do this AFTER all atoms have been added. That means that this operation will not mess up atom indexing
      • deleteAtoms

        private void deleteAtoms​(javajs.util.BS bsDeletedAtoms)
        called from org.jmol.modelsetbio.resolver when adding hydrogens.
        Parameters:
        bsDeletedAtoms -
      • fixAnnotations

        private void fixAnnotations​(int i,
                                    String name,
                                    int type)
      • finalizePdbCharges

        private void finalizePdbCharges()
      • finalizePdbMultipleBonds

        private void finalizePdbMultipleBonds()
      • setHydrogen

        private void setHydrogen​(int iTo,
                                 int iAtom,
                                 String name,
                                 javajs.util.P3 pt)
      • fixPropertyValue

        public Object fixPropertyValue​(javajs.util.BS bsAtoms,
                                       Object data,
                                       boolean toHydrogens)
      • allocateBioPolymer

        static BioPolymer allocateBioPolymer​(Group[] groups,
                                             int firstGroupIndex,
                                             boolean checkConnections,
                                             int pt0)
      • 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 -
      • setStructure

        private void setStructure​(JmolAdapterStructureIterator iterStructure)
        note that istart and iend will be adjusted.
        Parameters:
        iterStructure -
      • 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)
      • getPdbBondInfo

        private String[][] getPdbBondInfo​(String group3,
                                          boolean isLegacy)
      • knownGroupID

        public static short knownGroupID​(String group3)
      • checkCarbohydrate

        private static final boolean checkCarbohydrate​(String group3)
        Parameters:
        group3 - a potential group3 name
        Returns:
        whether this is a carbohydrate from the list
      • isHetero

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

        public short getGroupID​(String g3)
      • getGroupIdFor

        static short getGroupIdFor​(String group3)
      • addGroup3Name

        private static short addGroup3Name​(String group3)
        These can overrun 3 characters; that is not significant.
        Parameters:
        group3 -
        Returns:
        a short group ID
      • getStandardPdbHydrogenCount

        private static int getStandardPdbHydrogenCount​(String group3)
      • getSpecialAtomName

        static final String getSpecialAtomName​(int atomID)
      • getArgbs

        public int[] getArgbs​(int tok)