Package org.jmol.modelset
Class Group
- java.lang.Object
-
- org.jmol.modelset.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 Summary
Fields Modifier and Type Field Description private BSbsAddedChainchainrequiredintfirstAtomIndexchargroup1static java.lang.String[]group3NamesshortgroupIDintgroupIndexprivate static intINSERTION_CODE_MASKintlastAtomIndexintleadAtomIndexintselectedIndexfor coloring by groupintseqcodeprivate static intSEQUENCE_NUMBER_FLAGprivate static intSEQUENCE_NUMBER_SHIFTintshapeVisibilityFlagsstatic java.lang.String[]specialAtomNamesstatic java.lang.StringstandardGroupList
-
Constructor Summary
Constructors Constructor Description Group()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAtoms(int atomIndex)private voidcheckMinZ(Atom atom, int[] minZ)voidfixIndices(int atomsDeleted, BS bsDeleted)intgetAtomIndex(java.lang.String name, int offset)intgetBioPolymerIndexInModel()intgetBioPolymerLength()BSgetBSSideChain()AtomgetCarbonylOxygenAtom()booleangetCrossLinkVector(javajs.util.Lst<java.lang.Integer> vReturn, boolean crosslinkCovalent, boolean crosslinkHBond)chargetGroup1()java.lang.StringgetGroup3()java.util.Map<java.lang.String,java.lang.Object>getGroupInfo(int igroup, javajs.util.P3 ptTemp)floatgetGroupParameter(int tok)Monomers onlyjava.lang.ObjectgetHelixData(int tokType, char qType, int mStep)intgetInsCode()chargetInsertionCode()static chargetInsertionCodeChar(int seqcode)static intgetInsertionCodeFor(int seqcode)AtomgetLeadAtom()AtomgetLeadAtomOr(Atom atom)voidgetMinZ(Atom[] atoms, int[] minZ)ModelgetModel()BE CAREFUL: FAILURE TO NULL REFERENCES TO model WILL PREVENT FINALIZATION AND CREATE A MEMORY LEAK.intgetMonomerIndex()AtomgetNitrogenAtom()STRgetProteinStructureSubType()java.lang.StringgetProteinStructureTag()STRgetProteinStructureType()javajs.util.QuatgetQuaternion(char qType)javajs.util.QuatgetQuaternionFrame(Atom[] atoms)intgetResno()intgetSelectedMonomerCount()intgetSelectedMonomerIndex()static intgetSeqcodeFor(int seqNo, char insCode)java.lang.StringgetSeqcodeString()static java.lang.StringgetSeqcodeStringFor(int seqcode)static intgetSeqNumberFor(int seqcode)intgetStrucNo()StructuregetStructure()java.lang.StringgetStructureId()static booleanhaveSequenceNumber(int seqcode)booleanisAdded(int atomIndex)booleanisCarbohydrate()booleanisConnectedPrevious()booleanisCrossLinked(Group g)protected booleanisCursorOnTopOf(Atom atom, int x, int y, int radius, Atom champ)booleanisDna()group ID-based definitionprotected booleanisDnaByID()group ID-based definitionbooleanisLeadAtom(int atomIndex)booleanisNucleic()group ID-based definitionbooleanisProtein()group ID-based definitionbooleanisPurine()group ID-based definitionprotected booleanisPurineByID()group ID-based definitionbooleanisPyrimidine()group ID-based definitionprotected booleanisPyrimidineByID()booleanisRna()group ID-based definitionprotected booleanisRnaByID()group ID-based definitionbooleanisSelected(BS bs)booleanisWithinStructure(STR type)protected floatscaleToScreen(int Z, int mar)voidsetAtomBits(BS bs)note that we may pick up additional bits here that were added latervoidsetAtomBitsAndClear(BS bs, BS bsOut)Setting and clearingGroupsetGroup(Chain chain, java.lang.String group3, int seqcode, int firstAtomIndex, int lastAtomIndex)protected voidsetGroupID(java.lang.String group3)intsetProteinStructureType(STR type, int monomerIndexCurrent)voidsetResno(int i)voidsetShapeVisibility(int visFlag, boolean isVisible)voidsetStrucNo(int i)java.lang.StringtoString()
-
-
-
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 BS bsAdded
-
seqcode
public int seqcode
-
groupID
public short groupID
-
selectedIndex
public int selectedIndex
for coloring by group
-
SEQUENCE_NUMBER_FLAG
private static final int SEQUENCE_NUMBER_FLAG
- See Also:
- Constant Field Values
-
INSERTION_CODE_MASK
private static final int INSERTION_CODE_MASK
- See Also:
- Constant Field Values
-
SEQUENCE_NUMBER_SHIFT
private static final int SEQUENCE_NUMBER_SHIFT
- See Also:
- Constant Field Values
-
shapeVisibilityFlags
public int shapeVisibilityFlags
-
-
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(BS bs)
note that we may pick up additional bits here that were added later- Specified by:
setAtomBitsin interfaceStructure- Parameters:
bs-
-
setAtomBitsAndClear
public void setAtomBitsAndClear(BS bs, BS bsOut)
Setting and clearing- Specified by:
setAtomBitsAndClearin interfaceStructure- Parameters:
bs-bsOut-
-
isSelected
public boolean isSelected(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)
-
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
-
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, 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 BS getBSSideChain()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-