From: <ha...@us...> - 2010-10-07 23:01:14
|
Revision: 14425 http://jmol.svn.sourceforge.net/jmol/?rev=14425&view=rev Author: hansonr Date: 2010-10-07 23:01:06 +0000 (Thu, 07 Oct 2010) Log Message: ----------- dssp summary insertion codes for checkDssp() Modified Paths: -------------- trunk/Jmol/src/org/jmol/modelsetbio/AminoPolymer.java Modified: trunk/Jmol/src/org/jmol/modelsetbio/AminoPolymer.java =================================================================== --- trunk/Jmol/src/org/jmol/modelsetbio/AminoPolymer.java 2010-10-07 22:51:21 UTC (rev 14424) +++ trunk/Jmol/src/org/jmol/modelsetbio/AminoPolymer.java 2010-10-07 23:01:06 UTC (rev 14425) @@ -1222,17 +1222,25 @@ String prefix = monomers[0].getLeadAtom().getChainID() + ":"; StringBuffer sb = new StringBuffer(); char lastChar = '\0'; + char insCode1 = '\0'; + char insCode2 = '\0'; int firstResno = -1, lastResno = -1; for (int i = 0; i <= monomerCount; i++) { if (i == monomerCount || labels[i] != lastChar) { if (lastChar != '\0') - sb.append('\n').append(lastChar).append(" : ").append(prefix).append(firstResno).append("_").append(prefix).append(lastResno); + sb.append('\n').append(lastChar).append(" : ").append(prefix).append(firstResno) + .append(insCode1 == '\0' ? "" : String.valueOf(insCode1)) + .append("_").append(prefix).append(lastResno) + .append(insCode2 == '\0' ? "" : String.valueOf(insCode2)); if (i == monomerCount) break; lastChar = labels[i]; firstResno = monomers[i].getResno(); + insCode1 = monomers[i].getInsertionCode(); + } lastResno = monomers[i].getResno(); + insCode2 = monomers[i].getInsertionCode(); } return sb.toString(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |