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 used to be an empty space
|
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 given position,
from within Groups with observed density in the chain, i.e.
|
java.util.List<Group> |
getAtomGroups()
Return all Groups with observed density in the chain, i.e.
|
java.util.List<Group> |
getAtomGroups(GroupType type)
Return a List of all (observed) Groups of a special type, one of:
GroupType.AMINOACID ,
GroupType.HETATM or GroupType.NUCLEOTIDE . |
int |
getAtomLength()
Return the number of Groups with observed density in the chain, i.e.
|
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 the name of this chain (Chain id in PDB file ).
|
Compound |
getCompound()
Return the Compound for this chain.
|
Group |
getGroupByPDB(ResidueNumber resNum)
Get a group by its PDB residue numbering.
|
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)
Deprecated.
|
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
|
Structure |
getParent()
Returns the parent Structure of this chain.
|
Group |
getSeqResGroup(int position)
Return the Group at given position,
from within groups in the SEQRES records of the chain, i.e.
|
java.util.List<Group> |
getSeqResGroups()
Return a list of all groups in SEQRES records of the chain, i.e.
|
java.util.List<Group> |
getSeqResGroups(GroupType type)
Return a List of all SEQRES groups of a special type, one of:
GroupType.AMINOACID ,
GroupType.HETATM or GroupType.NUCLEOTIDE . |
int |
getSeqResLength()
Return the number of groups in the SEQRES records of the chain, i.e.
|
java.lang.String |
getSeqResSequence()
Return the PDB SEQRES sequence as a one-letter sequence string.
|
java.lang.String |
getSwissprotId()
get the Swissprot id of this chains .
|
void |
setAtomGroups(java.util.List<Group> groups)
Set all Groups with observed density in the chain, i.e.
|
void |
setChainID(java.lang.String nam)
Set the name of this chain (Chain id in PDB file ).
|
void |
setCompound(Compound mol)
Set the Compound
|
void |
setId(java.lang.Long id)
Set the ID used by Hibernate.
|
void |
setInternalChainID(java.lang.String internalChainID)
Set the internal chain ID that is used in mmCif files
|
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 |
toPDB()
Convert this Chain to a String in PDB format
|
java.lang.String |
toString()
String representation.
|
public static java.lang.String DEFAULT_CHAIN_ID
public java.lang.Long getId()
getId
in interface Chain
Chain.setId(Long)
public void setId(java.lang.Long id)
setId
in interface Chain
id
- assigned by HibernateChain.getId()
public void setParent(Structure parent)
setParent
in interface Chain
parent
- the parent Structure object for this ChainChain.getParent()
public Structure getParent()
getParent
in interface Chain
Chain.setParent(Structure)
public java.lang.Object clone()
public void setCompound(Compound mol)
setCompound
in interface Chain
mol
- the CompoundChain.getCompound()
public Compound getCompound()
getCompound
in interface Chain
Chain.setCompound(Compound)
public void setSwissprotId(java.lang.String sp_id)
setSwissprotId
in interface Chain
sp_id
- a String specifying the swissprot id valuegetSwissprotId()
public java.lang.String getSwissprotId()
getSwissprotId
in interface Chain
setSwissprotId(java.lang.String)
public void addGroup(Group group)
public Group getAtomGroup(int position)
getAtomGroup
in interface Chain
position
- an intChain.getAtomLength()
,
Chain.getAtomGroups()
,
Chain.getSeqResGroup(int)
public java.util.List<Group> getAtomGroups(GroupType type)
GroupType.AMINOACID
,
GroupType.HETATM
or GroupType.NUCLEOTIDE
.
Note that if a standard aminoacid appears as a HETATM (because it is part of a ligand) then
it is still considered as GroupType.AMINOACID
and not as GroupType.HETATM
.getAtomGroups
in interface Chain
type
- GroupTypeChain.setAtomGroups(List)
public java.util.List<Group> getAtomGroups()
getAtomGroups
in interface Chain
Chain.setAtomGroups(List)
,
Chain.getAtomLength()
,
Chain.getSeqResGroups()
public void setAtomGroups(java.util.List<Group> groups)
setAtomGroups
in interface Chain
groups
- a List object representing the Groups of this Chain.Chain.getAtomGroups()
@Deprecated public Group[] getGroupsByPDB(ResidueNumber start, ResidueNumber end, boolean ignoreMissing) throws StructureException
Chain
getGroupsByPDB
in interface Chain
start
- PDB residue number of startend
- PDB residue number of endignoreMissing
- ignore missing groups in this range.StructureException
public Group getGroupByPDB(ResidueNumber resNum) throws StructureException
getGroupByPDB
in interface Chain
resNum
- the PDB residue number of the groupStructureException
public Group[] getGroupsByPDB(ResidueNumber start, ResidueNumber end) throws StructureException
getGroupsByPDB
in interface Chain
start
- PDB residue number of startend
- PDB residue number of endStructureException
public int getSeqResLength()
getSeqResLength
in interface Chain
Chain.getSeqResGroup(int)
,
Chain.getSeqResGroups()
,
Chain.getAtomLength()
public void setChainID(java.lang.String nam)
setChainID
in interface Chain
nam
- a String specifying the name valueChain.getChainID()
public java.lang.String getChainID()
getChainID
in interface Chain
Chain.setChainID(String)
public java.lang.String toString()
public Sequence<?> getBJSequence()
getBJSequence
in interface Chain
public java.lang.String getAtomSequence()
getAtomSequence
in interface Chain
Chain.getSeqResSequence()
public java.lang.String getSeqResSequence()
getSeqResSequence
in interface Chain
Chain.getAtomSequence()
public Group getSeqResGroup(int position)
getSeqResGroup
in interface Chain
position
- an intChain.getSeqResLength()
,
Chain.getSeqResGroups()
,
Chain.getAtomGroup(int)
public java.util.List<Group> getSeqResGroups(GroupType type)
GroupType.AMINOACID
,
GroupType.HETATM
or GroupType.NUCLEOTIDE
.getSeqResGroups
in interface Chain
type
- a GroupTypeChain.setSeqResGroups(List)
public java.util.List<Group> getSeqResGroups()
getSeqResGroups
in interface Chain
Chain.setSeqResGroups(List)
,
Chain.getSeqResLength()
,
Chain.getAtomGroups()
public void setSeqResGroups(java.util.List<Group> groups)
setSeqResGroups
in interface Chain
groups
- 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 Chain
Chain.getAtomGroup(int)
,
Chain.getAtomGroups()
,
#getSeqResLength())
public java.util.List<Group> getAtomLigands()
getAtomLigands
in interface Chain
public java.lang.String getInternalChainID()
Chain
getInternalChainID
in interface Chain
public void setInternalChainID(java.lang.String internalChainID)
Chain
setInternalChainID
in interface Chain