{
int count = 0;
Object symbol;
+ boolean deoxyn=false;
boolean nucleotide = false;
StringBuffer seq = new StringBuffer();
Vector resFeatures = new Vector();
if ((symbol = ResidueProperties.getAA3Hash().get(tmpat.resName)) == null)
{
String nucname = tmpat.resName.trim();
+ // use the aaIndex rather than call 'toLower' - which would take a bit more time.
+ deoxyn=nucname.length()==2 && ResidueProperties.aaIndex[nucname.charAt(0)]==ResidueProperties.aaIndex['D'];
if (tmpat.name.equalsIgnoreCase("CA")
- || ResidueProperties.nucleotideIndex[nucname.charAt(0)] == -1)
+ || ResidueProperties.nucleotideIndex[nucname.charAt((deoxyn ? 1 : 0))] == -1)
{
seq.append("X");
// System.err.println("PDBReader:Null aa3Hash for " +
{
// nucleotide flag
nucleotide = true;
- seq.append(nucname.charAt(0));
+ seq.append(nucname.charAt((deoxyn ? 1 : 0)));
}
}
else