Class Group

  • All Implemented Interfaces:
    Structure
    Direct Known Subclasses:
    Monomer

    public class Group
    extends java.lang.Object
    implements Structure
    The essential container for every atom. Possibly a Monomer, but not necessarily. Always a member of a chain; sometimes a member of a BioPolymer. Groups need not be contiguous. firstAtomIndex is always fine to use, but lastAtomIndex is only the end of the INITIAL set of atoms in the file and must be carefully used.
    • Field Detail

      • standardGroupList

        public static java.lang.String standardGroupList
      • group3Names

        public static java.lang.String[] group3Names
      • specialAtomNames

        public static java.lang.String[] specialAtomNames
      • chain

        public Chain chain
        required
      • groupIndex

        public int groupIndex
      • group1

        public char group1
      • firstAtomIndex

        public int firstAtomIndex
      • leadAtomIndex

        public int leadAtomIndex
      • lastAtomIndex

        public int lastAtomIndex
      • bsAdded

        private javajs.util.BS bsAdded
      • seqcode

        public int seqcode
      • groupID

        public short groupID
      • selectedIndex

        public int selectedIndex
        for coloring by group
      • shapeVisibilityFlags

        public int shapeVisibilityFlags
      • dssrNT

        public java.util.Map<java.lang.String,​java.lang.Object> dssrNT
    • Constructor Detail

      • Group

        public Group()
    • Method Detail

      • setGroup

        public Group setGroup​(Chain chain,
                              java.lang.String group3,
                              int seqcode,
                              int firstAtomIndex,
                              int lastAtomIndex)
      • setGroupID

        protected void setGroupID​(java.lang.String group3)
        Parameters:
        group3 -
      • isAdded

        public boolean isAdded​(int atomIndex)
      • addAtoms

        public void addAtoms​(int atomIndex)
      • setAtomBits

        public void setAtomBits​(javajs.util.BS bs)
        note that we may pick up additional bits here that were added later
        Specified by:
        setAtomBits in interface Structure
        Parameters:
        bs -
      • setAtomBitsAndClear

        public void setAtomBitsAndClear​(javajs.util.BS bs,
                                        javajs.util.BS bsOut)
        Setting and clearing
        Specified by:
        setAtomBitsAndClear in interface Structure
        Parameters:
        bs -
        bsOut -
      • isSelected

        public boolean isSelected​(javajs.util.BS bs)
      • setShapeVisibility

        public final void setShapeVisibility​(int visFlag,
                                             boolean isVisible)
      • getGroup3

        public java.lang.String getGroup3()
      • getGroup1

        public char getGroup1()
      • getBioPolymerLength

        public int getBioPolymerLength()
      • getMonomerIndex

        public int getMonomerIndex()
      • getStructure

        public Structure getStructure()
      • getStrucNo

        public int getStrucNo()
      • getProteinStructureType

        public STR getProteinStructureType()
      • getProteinStructureSubType

        public STR getProteinStructureSubType()
      • setProteinStructureType

        public int setProteinStructureType​(STR type,
                                           int monomerIndexCurrent)
        Parameters:
        type -
        monomerIndexCurrent -
        Returns:
        type
      • isProtein

        public boolean isProtein()
        group ID-based definition
        Returns:
        boolean
      • isNucleic

        public boolean isNucleic()
        group ID-based definition
        Returns:
        boolean
      • isDna

        public boolean isDna()
        group ID-based definition
        Returns:
        boolean
      • isRna

        public boolean isRna()
        group ID-based definition
        Returns:
        boolean
      • isPurine

        public boolean isPurine()
        group ID-based definition
        Returns:
        boolean
      • isPurineByID

        protected boolean isPurineByID()
        group ID-based definition
        Returns:
        boolean
      • isPyrimidine

        public boolean isPyrimidine()
        group ID-based definition
        Returns:
        boolean
      • isPyrimidineByID

        protected boolean isPyrimidineByID()
      • isRnaByID

        protected boolean isRnaByID()
        group ID-based definition
        Returns:
        boolean
      • isDnaByID

        protected boolean isDnaByID()
        group ID-based definition
        Returns:
        boolean
      • isCarbohydrate

        public boolean isCarbohydrate()
      • getResno

        public final int getResno()
      • setResno

        public void setResno​(int i)
      • getSeqNumberFor

        public static final int getSeqNumberFor​(int seqcode)
      • haveSequenceNumber

        public static final boolean haveSequenceNumber​(int seqcode)
      • getSeqcodeString

        public final java.lang.String getSeqcodeString()
      • getSeqcodeFor

        public static int getSeqcodeFor​(int seqNo,
                                        char insCode)
      • getSeqcodeStringFor

        public static java.lang.String getSeqcodeStringFor​(int seqcode)
      • getInsertionCode

        public char getInsertionCode()
      • getInsCode

        public final int getInsCode()
      • getInsertionCodeFor

        public static int getInsertionCodeFor​(int seqcode)
      • getInsertionCodeChar

        public static char getInsertionCodeChar​(int seqcode)
      • scaleToScreen

        protected float scaleToScreen​(int Z,
                                      int mar)
      • isCursorOnTopOf

        protected boolean isCursorOnTopOf​(Atom atom,
                                          int x,
                                          int y,
                                          int radius,
                                          Atom champ)
      • getModel

        public Model getModel()
        BE CAREFUL: FAILURE TO NULL REFERENCES TO model WILL PREVENT FINALIZATION AND CREATE A MEMORY LEAK.
        Returns:
        associated Model
      • getSelectedMonomerCount

        public int getSelectedMonomerCount()
      • getSelectedMonomerIndex

        public int getSelectedMonomerIndex()
      • isLeadAtom

        public boolean isLeadAtom​(int atomIndex)
        Parameters:
        atomIndex -
        Returns:
        T/F
      • getLeadAtomOr

        public Atom getLeadAtomOr​(Atom atom)
      • getLeadAtom

        public Atom getLeadAtom()
      • getQuaternion

        public javajs.util.Quat getQuaternion​(char qType)
        Parameters:
        qType -
        Returns:
        quaternion
      • getQuaternionFrame

        public javajs.util.Quat getQuaternionFrame​(Atom[] atoms)
      • setStrucNo

        public void setStrucNo​(int i)
        Parameters:
        i -
      • getHelixData

        public java.lang.Object getHelixData​(int tokType,
                                             char qType,
                                             int mStep)
        Parameters:
        tokType -
        qType -
        mStep -
        Returns:
        helix data of some sort
      • isWithinStructure

        public boolean isWithinStructure​(STR type)
        Parameters:
        type -
        Returns:
        T/F
      • getProteinStructureTag

        public java.lang.String getProteinStructureTag()
      • getStructureId

        public java.lang.String getStructureId()
      • getBioPolymerIndexInModel

        public int getBioPolymerIndexInModel()
      • isCrossLinked

        public boolean isCrossLinked​(Group g)
        Parameters:
        g -
        Returns:
        T/F
      • getCrossLinkVector

        public boolean getCrossLinkVector​(javajs.util.Lst<java.lang.Integer> vReturn,
                                          boolean crosslinkCovalent,
                                          boolean crosslinkHBond)
        Parameters:
        vReturn -
        crosslinkHBond -
        crosslinkCovalent -
        Returns:
        T/F
      • isConnectedPrevious

        public boolean isConnectedPrevious()
      • getNitrogenAtom

        public Atom getNitrogenAtom()
      • getCarbonylOxygenAtom

        public Atom getCarbonylOxygenAtom()
      • fixIndices

        public void fixIndices​(int atomsDeleted,
                               javajs.util.BS bsDeleted)
      • getGroupInfo

        public java.util.Map<java.lang.String,​java.lang.Object> getGroupInfo​(int igroup,
                                                                                   javajs.util.P3 ptTemp)
      • getMinZ

        public void getMinZ​(Atom[] atoms,
                            int[] minZ)
      • checkMinZ

        private void checkMinZ​(Atom atom,
                               int[] minZ)
      • getGroupParameter

        public float getGroupParameter​(int tok)
        Monomers only
        Parameters:
        tok -
        Returns:
        NaN
      • getAtomIndex

        public int getAtomIndex​(java.lang.String name,
                                int offset)
        Parameters:
        name -
        offset -
        Returns:
        index of atom based on offset
      • getBSSideChain

        public javajs.util.BS getBSSideChain()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isNucleicMonomer

        public boolean isNucleicMonomer()