return null;
sq = sq.getDatasetSequence();
}
- /**
+ /**
* Remove any existing features for this chain if they exist ?
* SequenceFeature[] seqsfeatures=seq.getSequenceFeatures();
int totfeat=seqsfeatures.length;
//Make a new Residue object with the new atoms vector
residues.addElement(new Residue(resAtoms, resNumber - 1, count));
-
+
Residue tmpres = (Residue) residues.lastElement();
Atom tmpat = (Atom) tmpres.atoms.elementAt(0);
// Make A new SequenceFeature for the current residue numbering
- SequenceFeature sf =
+ SequenceFeature sf =
new SequenceFeature("RESNUM",tmpat.resName+":"+tmpat.resNumIns+" "+pdbid+id,
"",offset+count,offset+count,MCview.PDBChain.PDBFILEFEATURE);
resFeatures.addElement(sf);
if(id.length()<1 || id.equals(" "))
id = "_";
-
- sequence = new Sequence(id, seq.toString(), offset, resNumber-1); // Note: resNumber-offset ~= seq.size()
+
+ sequence = new Sequence(id, seq.toString(), offset, resNumber-1); // Note: resNumber-offset ~= seq.size()
// System.out.println("PDB Sequence is :\nSequence = " + seq);
// System.out.println("No of residues = " + residues.size());
for (i=0,iSize=resFeatures.size(); i<iSize; i++) {
} else if (b.at1.resName.equalsIgnoreCase("CYS")) {
b.startCol = Color.yellow;
} else {
- //int atno = ((Integer) ResidueProperties.getAA3Hash().get(b.at1.resName.toUpperCase())).intValue();
- b.startCol = Color.lightGray;
+ b.startCol = Color.lightGray;
}
if (b.at2.resName.equalsIgnoreCase("ASP") ||
} else if (b.at2.resName.equalsIgnoreCase("CYS")) {
b.endCol = Color.yellow;
} else {
- //int atno = ((Integer) ResidueProperties.getAA3Hash().get(b.at2.resName.toUpperCase())).intValue();
- b.endCol = Color.lightGray;
+ b.endCol = Color.lightGray;
}
} catch (Exception e) {
Bond b = (Bond) bonds.elementAt(i);
public void setChainColours(jalview.schemes.ColourSchemeI cs)
{
Bond b;
+ int index;
for (int i = 0; i < bonds.size(); i++) {
try {
b = (Bond) bonds.elementAt(i);
- /* ( (Bond) bonds.elementAt(i)).startCol = cs.findColour(
- ResidueProperties.codonTranslate(
- ResidueProperties.aa3Hash.get(b.at1.resName).toString().charAt(0)
- );
+ index = ( (Integer) ResidueProperties.aa3Hash.get(b.at1.
+ resName)).intValue();
+ b.startCol = cs.findColour(ResidueProperties.aa[index].charAt(0));
- b.endCol = cs.findColour(
- ResidueProperties.aa[ ( (Integer) ResidueProperties.aa3Hash.
- get(b.at2.resName)).intValue()]
- );*/
+ index = ( (Integer) ResidueProperties.aa3Hash.get(b.at2.resName)).
+ intValue();
+ b.endCol = cs.findColour(ResidueProperties.aa[index].charAt(0));
} catch (Exception e)
{