Class Group

java.lang.Object
org.jmol.modelset.Group
All Implemented Interfaces:
Structure
Direct Known Subclasses:
Monomer

public class Group extends 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 Details

    • standardGroupList

      public static String standardGroupList
    • group3Names

      public static String[] group3Names
    • specialAtomNames

      public static 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
    • seqcode

      public int seqcode
    • groupID

      public short groupID
    • selectedIndex

      public int selectedIndex
      for coloring by group
    • shapeVisibilityFlags

      public int shapeVisibilityFlags
    • dssrNT

      public Map<String,Object> dssrNT
  • Constructor Details

    • Group

      public Group()
  • Method Details

    • setGroup

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

      protected void setGroupID(String group3)
      Parameters:
      group3 -
    • isAdded

      public boolean isAdded(int atomIndex)
    • addAtoms

      public void addAtoms(int atomIndex)
    • setAtomBits

      public void setAtomBits(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(BS bs, BS bsOut)
      Setting and clearing
      Specified by:
      setAtomBitsAndClear in interface Structure
      Parameters:
      bs -
      bsOut -
    • isSelected

      public boolean isSelected(BS bs)
    • setShapeVisibility

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

      public 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 String getSeqcodeString()
    • getSeqcodeFor

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

      public static 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 Quat getQuaternion(char qType)
      Parameters:
      qType -
      Returns:
      quaternion
    • getQuaternionFrame

      public Quat getQuaternionFrame(Atom[] atoms)
    • setStrucNo

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

      public 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 String getProteinStructureTag()
    • getStructureId

      public String getStructureId()
    • getBioPolymerIndexInModel

      public int getBioPolymerIndexInModel()
    • isCrossLinked

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

      public boolean getCrossLinkVector(Lst<Integer> vReturn, boolean crosslinkCovalent, boolean crosslinkHBond)
      Parameters:
      vReturn -
      crosslinkHBond -
      crosslinkCovalent -
      Returns:
      T/F
    • getNitrogenAtom

      public Atom getNitrogenAtom()
    • getCarbonylOxygenAtom

      public Atom getCarbonylOxygenAtom()
    • fixIndices

      public void fixIndices(int atomsDeleted, BS bsDeleted)
    • getGroupInfo

      public Map<String,Object> getGroupInfo(int igroup, P3 ptTemp)
    • getMinZ

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

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

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

      public BS getBSSideChain()
    • toString

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

      public boolean isNucleicMonomer()