Package org.helm.notation2
Class Monomer
java.lang.Object
org.helm.notation2.Monomer
- All Implemented Interfaces:
Serializable
public class Monomer extends Object implements Serializable
This is a data model for Monomer. alternateId is used in polymer notation.
- Author:
- zhangtianhong
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static StringATTACHMENT_LIST_DELIMITERstatic StringBACKBONE_MOMONER_TYPEstatic StringBRANCH_MOMONER_TYPEstatic StringCHEMICAL_POLYMER_TYPEstatic StringID_Astatic StringID_ALAstatic StringID_ARGstatic StringID_ASNstatic StringID_ASPstatic StringID_Cstatic StringID_CHEMICAL_STRUCTUREstatic StringID_CYSstatic StringID_dRstatic StringID_Gstatic StringID_GLNstatic StringID_GLUstatic StringID_GLYstatic StringID_HISstatic StringID_ILEstatic StringID_LEUstatic StringID_LYSstatic StringID_METstatic StringID_Pstatic StringID_PHEstatic StringID_PROstatic StringID_Rstatic StringID_SERstatic StringID_Tstatic StringID_THRstatic StringID_TRPstatic StringID_TYRstatic StringID_Ustatic StringID_VALstatic StringID_Xstatic StringNUCLIEC_ACID_POLYMER_TYPEstatic StringPEPTIDE_POLYMER_TYPEstatic StringSTARTING_NAMEstatic String[]SUPPORTED_POLYMER_TYPESstatic StringUNDEFINED_MOMONER_TYPE -
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleanaddAttachment(Attachment attachment)Try to add a new attachment to this monomerbooleanattachmentContains(Monomer monomer)booleanattachmentEquals(Monomer monomer)booleancontainAnyAtom()static MonomerfromJSON(String json)StringgetAlternateId()AttachmentgetAttachment(String label)get a specific attachment by passing in a labelList<Attachment>getAttachmentList()StringgetAttachmentListString()StringgetCanSMILES()MoleculePropertygetCapMoleculeInfo(String label)This method returns the MoleculeInfo for the input R group label of this monomerintgetId()StringgetMolfile()StringgetMonomerType()StringgetName()StringgetNaturalAnalog()get the natural analog of this monomer.StringgetPolymerType()booleanisAdHocMonomer()booleanisModified()Test if this monomer has been modified.booleanisNewMonomer()booleanisSameType(Monomer m)Compare this momoner with another one, polymerType, monomerType and naturalAnalog (could be derived) must be the same to return truevoidsetAdHocMonomer(boolean adHocMonomer)voidsetAlternateId(String alternateId)voidsetAttachmentList(List<Attachment> attachmentList)voidsetCanSMILES(String canSMILES)voidsetId(int id)voidsetMolfile(String molfile)voidsetMonomerType(String monomerType)voidsetName(String name)voidsetNaturalAnalog(String naturalAnalog)voidsetNewMonomer(boolean newMonomer)voidsetPolymerType(String polymerType)StringtoJSON()
-
Field Details
-
NUCLIEC_ACID_POLYMER_TYPE
- See Also:
- Constant Field Values
-
PEPTIDE_POLYMER_TYPE
- See Also:
- Constant Field Values
-
CHEMICAL_POLYMER_TYPE
- See Also:
- Constant Field Values
-
SUPPORTED_POLYMER_TYPES
-
BACKBONE_MOMONER_TYPE
- See Also:
- Constant Field Values
-
BRANCH_MOMONER_TYPE
- See Also:
- Constant Field Values
-
UNDEFINED_MOMONER_TYPE
- See Also:
- Constant Field Values
-
STARTING_NAME
- See Also:
- Constant Field Values
-
ATTACHMENT_LIST_DELIMITER
- See Also:
- Constant Field Values
-
ID_A
- See Also:
- Constant Field Values
-
ID_G
- See Also:
- Constant Field Values
-
ID_C
- See Also:
- Constant Field Values
-
ID_U
- See Also:
- Constant Field Values
-
ID_T
- See Also:
- Constant Field Values
-
ID_R
- See Also:
- Constant Field Values
-
ID_dR
- See Also:
- Constant Field Values
-
ID_P
- See Also:
- Constant Field Values
-
ID_X
- See Also:
- Constant Field Values
-
ID_ALA
- See Also:
- Constant Field Values
-
ID_ARG
- See Also:
- Constant Field Values
-
ID_ASN
- See Also:
- Constant Field Values
-
ID_ASP
- See Also:
- Constant Field Values
-
ID_CYS
- See Also:
- Constant Field Values
-
ID_GLU
- See Also:
- Constant Field Values
-
ID_GLN
- See Also:
- Constant Field Values
-
ID_GLY
- See Also:
- Constant Field Values
-
ID_HIS
- See Also:
- Constant Field Values
-
ID_ILE
- See Also:
- Constant Field Values
-
ID_LEU
- See Also:
- Constant Field Values
-
ID_LYS
- See Also:
- Constant Field Values
-
ID_MET
- See Also:
- Constant Field Values
-
ID_PHE
- See Also:
- Constant Field Values
-
ID_PRO
- See Also:
- Constant Field Values
-
ID_SER
- See Also:
- Constant Field Values
-
ID_THR
- See Also:
- Constant Field Values
-
ID_TRP
- See Also:
- Constant Field Values
-
ID_TYR
- See Also:
- Constant Field Values
-
ID_VAL
- See Also:
- Constant Field Values
-
ID_CHEMICAL_STRUCTURE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Monomer
public Monomer()constructor -
Monomer
Create a new monomer.- Parameters:
polymerType- : unique text ID for the monomer, will be used in polymer notationmonomerType- : monomer type, Backbone, Branch, UnDefinednaturalAnalog- : the ID of its closest natural analogalternateId- : unique text ID for the monomer, will be used in polymer notation
-
-
Method Details
-
getId
public int getId() -
setId
public void setId(int id) -
getAlternateId
-
setAlternateId
-
getNaturalAnalog
get the natural analog of this monomer. For standard, unmodified monomer, the natural analog should be itself- Returns:
- natural analog of the monomer
-
setNaturalAnalog
-
setAdHocMonomer
public void setAdHocMonomer(boolean adHocMonomer) -
isAdHocMonomer
public boolean isAdHocMonomer() -
getCanSMILES
-
setCanSMILES
-
getMonomerType
-
setMonomerType
-
getPolymerType
-
setPolymerType
-
getAttachmentList
-
setAttachmentList
-
getMolfile
-
setMolfile
-
getAttachment
get a specific attachment by passing in a label- Parameters:
label- : unique for each attach point- Returns:
- Attachment or null if there is no such attach point
-
getCapMoleculeInfo
public MoleculeProperty getCapMoleculeInfo(String label) throws org.helm.chemtoolkit.CTKException, ChemistryException, IOExceptionThis method returns the MoleculeInfo for the input R group label of this monomer- Parameters:
label- - R1, R2...- Returns:
- MoleculeInfo for the cap group, R group will contribute nothing
- Throws:
org.helm.chemtoolkit.CTKException- general ChemToolKit exception passed to HELMToolKitChemistryException- if chemistry could not be initializedIOException- if molecule can not be read
-
addAttachment
Try to add a new attachment to this monomer- Parameters:
attachment- -- new attachment to be add in- Returns:
- true for success and false if there is one such attach point exist
-
getName
-
setName
-
isModified
public boolean isModified()Test if this monomer has been modified. The length of the alternatedId of an modified monomer should be greater than one.- Returns:
- true/false
-
isSameType
Compare this momoner with another one, polymerType, monomerType and naturalAnalog (could be derived) must be the same to return true- Parameters:
m- monomer- Returns:
- true or false
-
getAttachmentListString
-
isNewMonomer
public boolean isNewMonomer() -
setNewMonomer
public void setNewMonomer(boolean newMonomer) -
attachmentEquals
-
attachmentContains
-
containAnyAtom
public boolean containAnyAtom() throws IOException, org.helm.chemtoolkit.CTKException, ChemistryException- Throws:
IOExceptionorg.helm.chemtoolkit.CTKExceptionChemistryException
-
fromJSON
-
toJSON
-