modelIndex++;
for (BioPolymer bp : ((BioModel) model).bioPolymers)
{
- int _lastChainId = 0;
+ int lastChainId = 0; // int value of character e.g. 65 for A
+ String lastChainIdAlpha = "";
+
int[] groups = bp.getLeadAtomIndices();
char seq[] = new char[groups.length], secstr[] = new char[groups.length], secstrcode[] = new char[groups.length];
int groupc = 0, len = 0, firstrnum = 1, lastrnum = 0;
do
{
if (groupc >= groups.length
- || ms.at[groups[groupc]].group.chain.chainID != _lastChainId)
+ || ms.at[groups[groupc]].group.chain.chainID != lastChainId)
{
/*
* on change of chain (or at end), construct the sequence and
String modelTitle = (String) ms
.getInfo(modelIndex, "title");
SequenceI sq = new Sequence("" + getDataName() + "|"
- + modelTitle + "|" + _lastChainId, newseq,
+ + modelTitle + "|" + lastChainIdAlpha, newseq,
firstrnum, lastrnum);
PDBEntry pdbe = new PDBEntry();
pdbe.setFile(getDataName());
pdbe.setId(getDataName());
pdbe.setProperty(new Hashtable());
// pdbe.getProperty().put("CHAIN", "" + _lastChainId);
- pdbe.setChainCode(String.valueOf(_lastChainId));
+ pdbe.setChainCode(lastChainIdAlpha);
sq.addPDBId(pdbe);
// JAL-1533
// Need to put the number of models for this polymer somewhere
{
String mt = modelTitle == null ? getDataName()
: modelTitle;
- if (_lastChainId >= ' ')
+ if (lastChainId >= ' ')
{
- mt += _lastChainId;
+ mt += lastChainIdAlpha;
}
AlignmentAnnotation ann = new AlignmentAnnotation(
"Secondary Structure", "Secondary Structure for "
if (len == 0)
{
firstrnum = group.getResno();
- _lastChainId = group.chain.chainID;
+ lastChainId = group.chain.chainID;
+ lastChainIdAlpha = group.chain.getIDStr();
}
else
{