public class ChainImpl extends java.lang.Object implements Chain, java.io.Serializable
GroupType constants.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_CHAIN_ID
The default chain identifier is an empty space.
|
protected java.util.List<Group> |
seqResGroups |
| Constructor and Description |
|---|
ChainImpl()
Constructs a ChainImpl object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGroup(Group group)
add a group to the list of ATOM record group of this chain.
|
protected void |
addSeqResGroup(Group g) |
java.lang.Object |
clone()
Returns an identical copy of this Chain .
|
Group |
getAtomGroup(int position)
return the group at position .
|
java.util.List<Group> |
getAtomGroups()
Return all groups that have been specified in the ATOM section of this chain .
|
java.util.List<Group> |
getAtomGroups(java.lang.String type)
Get the Groups of a certain type, that are listed int the ATOM records of the PDB file.
|
int |
getAtomLength()
Return the number of Groups in the ATOM records of the chain.
|
java.util.List<Group> |
getAtomLigands()
Get all groups that are not polymer groups and that are not solvent groups.
|
java.lang.String |
getAtomSequence()
Return the sequence of amino acids as it has been provided in the ATOM records.
|
Sequence<?> |
getBJSequence()
Convert the SEQRES groups of a Chain to a Biojava Sequence object.
|
java.lang.String |
getChainID()
get and set the name of this chain (Chain id in PDB file ).
|
Group |
getGroup(int position)
Deprecated.
use getAtomGroup or getSeqResGroup instead
|
Group |
getGroupByPDB(ResidueNumber resNum)
Get a group by its PDB residue numbering.
|
Group |
getGroupByPDB(java.lang.String pdbresnum)
get a group by its PDB residue numbering.
|
java.util.List<Group> |
getGroups()
Deprecated.
use getAtomGroups instead
|
java.util.List<Group> |
getGroups(java.lang.String type)
Deprecated.
use getAtomGroups instead
|
Group[] |
getGroupsByPDB(ResidueNumber start,
ResidueNumber end)
Get all groups that are located between two PDB residue numbers.
|
Group[] |
getGroupsByPDB(ResidueNumber start,
ResidueNumber end,
boolean ignoreMissing)
Get all groups that are located between two PDB residue numbers.
|
Group[] |
getGroupsByPDB(java.lang.String pdbresnumStart,
java.lang.String pdbresnumEnd)
Get all groups that are located between two PDB residue numbers.
|
Group[] |
getGroupsByPDB(java.lang.String pdbresnumStart,
java.lang.String pdbresnumEnd,
boolean ignoreMissing)
Get all groups that are located between two PDB residue numbers.
|
Compound |
getHeader()
Returns the Header ( a Compound object) for this chain.
|
java.lang.Long |
getId()
Get the ID used by Hibernate.
|
java.lang.String |
getInternalChainID()
If available, returns the internal chain ID that is used in mmCif files, otherwise null
|
int |
getLength()
Deprecated.
use getAtomLength instead
|
int |
getLengthAminos()
returns the length of the AminoAcids in the ATOM records of this chain.
|
java.lang.String |
getName()
get and set the name of this chain (Chain id in PDB file ).
|
Structure |
getParent()
Returns the parent Structure of this chain.
|
Group |
getSeqResGroup(int position)
return the Group at position X.
|
java.util.List<Group> |
getSeqResGroups()
Return all groups of this chain.
|
java.util.List<Group> |
getSeqResGroups(java.lang.String type)
Return a List of all groups of a special type (e.g.
|
int |
getSeqResLength()
Returns the number of groups in the SEQRES records of the chain.
|
java.lang.String |
getSeqResSequence()
Returns the PDB SEQRES sequence as a one-letter sequence string.
|
java.lang.String |
getSequence()
Deprecated.
use getAtomSequence instead
|
java.lang.String |
getSwissprotId()
get the Swissprot id of this chains .
|
void |
setAtomGroups(java.util.List<Group> groups)
Set all groups that have been specified in the ATOM section of this chain .
|
void |
setChainID(java.lang.String nam)
get and set the name of this chain (Chain id in PDB file ).
|
void |
setHeader(Compound mol)
Set the Header from the PDB file.
|
void |
setId(java.lang.Long id)
Set the ID used by Hibernate.
|
void |
setInternalChainID(java.lang.String internalChainID)
Sets the internal chain ID that is used in mmCif files
|
void |
setName(java.lang.String nam)
get and set the name of this chain (Chain id in PDB file ).
|
void |
setParent(Structure parent)
Set the back-reference to its parent Structure.
|
void |
setSeqResGroups(java.util.List<Group> groups)
Set the list of SeqResGroups for this chain.
|
void |
setSwissprotId(java.lang.String sp_id)
set the Swissprot id of this chains .
|
java.lang.String |
toString()
String representation.
|
public static java.lang.String DEFAULT_CHAIN_ID
protected java.util.List<Group> seqResGroups
public java.lang.Long getId()
getId in interface ChainChain.setId(Long)public void setId(java.lang.Long id)
setId in interface Chainid - assigned by HibernateChain.getId()public void setParent(Structure parent)
setParent in interface Chainparent - the parent Structure object for this ChainChain.getParent()public Structure getParent()
getParent in interface ChainChain.setParent(Structure)public java.lang.Object clone()
public void setHeader(Compound mol)
setHeader in interface Chainmol - the Compound that contains the header information for this chainChain.getHeader()public Compound getHeader()
getHeader in interface ChainChain.setHeader(Compound)public void setSwissprotId(java.lang.String sp_id)
setSwissprotId in interface Chainsp_id - a String specifying the swissprot id valuegetSwissprotId()public java.lang.String getSwissprotId()
getSwissprotId in interface ChainsetSwissprotId(java.lang.String)public void addGroup(Group group)
public Group getGroup(int position)
getGroup in interface Chainposition - an intChain.getAtomGroup(int),
Chain.getSeqResGroup(int)public Group getAtomGroup(int position)
getAtomGroup in interface Chainposition - an intpublic java.util.List<Group> getGroups(java.lang.String type)
GroupType constants.public java.util.List<Group> getAtomGroups(java.lang.String type)
getAtomGroups in interface Chaintype - the type of the groups to return. Can be one of the 3 types defined in the GroupType constantsChain.setAtomGroups(List)public java.util.List<Group> getGroups()
public java.util.List<Group> getAtomGroups()
getAtomGroups in interface ChainChain.setAtomGroups(List)public void setAtomGroups(java.util.List<Group> groups)
setAtomGroups in interface Chaingroups - a List object representing the Groups of this Chain.Chain.getAtomGroups()public Group[] getGroupsByPDB(java.lang.String pdbresnumStart, java.lang.String pdbresnumEnd, boolean ignoreMissing) throws StructureException
getGroupsByPDB in interface ChainpdbresnumStart - PDB residue number of startpdbresnumEnd - PDB residue number of endignoreMissing - ignore missing groups in this range.StructureExceptionpublic Group[] getGroupsByPDB(ResidueNumber start, ResidueNumber end, boolean ignoreMissing) throws StructureException
ChaingetGroupsByPDB in interface Chainstart - PDB residue number of startend - PDB residue number of endignoreMissing - ignore missing groups in this range.StructureExceptionpublic Group getGroupByPDB(java.lang.String pdbresnum) throws StructureException
getGroupByPDB in interface Chainpdbresnum - the PDB residue number of the groupStructureExceptionpublic Group getGroupByPDB(ResidueNumber resNum) throws StructureException
getGroupByPDB in interface ChainresNum - the PDB residue number of the groupStructureExceptionpublic Group[] getGroupsByPDB(java.lang.String pdbresnumStart, java.lang.String pdbresnumEnd) throws StructureException
getGroupsByPDB in interface ChainpdbresnumStart - PDB residue number of startpdbresnumEnd - PDB residue number of endStructureExceptionpublic Group[] getGroupsByPDB(ResidueNumber start, ResidueNumber end) throws StructureException
getGroupsByPDB in interface Chainstart - PDB residue number of startend - PDB residue number of endStructureExceptionpublic int getLength()
ChaingetLength in interface ChainChain.getAtomLength(),
Chain.getSeqResLength()public int getLengthAminos()
getLengthAminos in interface Chainpublic int getSeqResLength()
ChaingetSeqResLength in interface Chainpublic void setName(java.lang.String nam)
ChainsetName in interface Chainnam - a String specifying the name valueChain.getName()public java.lang.String getName()
ChaingetName in interface ChainChain.setName(java.lang.String)public void setChainID(java.lang.String nam)
setChainID in interface Chainnam - a String specifying the name valuegetChainID()public java.lang.String getChainID()
getChainID in interface ChainsetName(java.lang.String)public java.lang.String toString()
public Sequence<?> getBJSequence()
getBJSequence in interface ChainIllegalSymbolExceptionpublic java.lang.String getSequence()
getSequence in interface ChaingetAtomSequence(),
getSeqResSequence()public java.lang.String getAtomSequence()
getAtomSequence in interface ChainChain.getSeqResSequence()public java.lang.String getSeqResSequence()
getSeqResSequence in interface ChainChain.getAtomSequence()public Group getSeqResGroup(int position)
getSeqResGroup in interface Chainposition - an intpublic java.util.List<Group> getSeqResGroups(java.lang.String type)
getSeqResGroups in interface Chaintype - a StringChain.setSeqResGroups(List)public java.util.List<Group> getSeqResGroups()
getSeqResGroups in interface ChainChain.setSeqResGroups(List)public void setSeqResGroups(java.util.List<Group> groups)
setSeqResGroups in interface Chaingroups - a List of Group objects that from the SEQRES groups of this chain.Chain.getSeqResGroups()protected void addSeqResGroup(Group g)
public int getAtomLength()
getAtomLength in interface Chainpublic java.util.List<Group> getAtomLigands()
getAtomLigands in interface Chainpublic java.lang.String getInternalChainID()
ChaingetInternalChainID in interface Chainpublic void setInternalChainID(java.lang.String internalChainID)
ChainsetInternalChainID in interface Chain