From: <ha...@us...> - 2006-03-06 12:41:17
|
Revision: 4547 Author: hansonr Date: 2006-03-06 04:41:07 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/jmol/?rev=4547&view=rev Log Message: ----------- adds single-character %m amino acid label identifier format see http://www.biochem.ucl.ac.uk/bsm/dbbrowser/jj/aacode.html Modified Paths: -------------- trunk/Jmol/src/org/jmol/viewer/Atom.java trunk/Jmol/src/org/jmol/viewer/Group.java trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/src/org/jmol/viewer/Atom.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Atom.java 2006-03-06 03:51:42 UTC (rev 4546) +++ trunk/Jmol/src/org/jmol/viewer/Atom.java 2006-03-06 12:41:07 UTC (rev 4547) @@ -410,6 +410,12 @@ return group.getGroup3(); } + String getGroup1() { + if (group == null) + return null; + return group.getGroup1(); + } + boolean isGroup3(String group3) { if (group == null) return false; @@ -928,7 +934,7 @@ strT = "" + getModelTagNumber(); break; case 'm': - strT = "<X>"; + strT = getGroup1(); break; case 'n': strT = getGroup3(); Modified: trunk/Jmol/src/org/jmol/viewer/Group.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Group.java 2006-03-06 03:51:42 UTC (rev 4546) +++ trunk/Jmol/src/org/jmol/viewer/Group.java 2006-03-06 12:41:07 UTC (rev 4547) @@ -66,6 +66,12 @@ return group3Names[groupID]; } + final String getGroup1() { + if (groupID >= JmolConstants.predefinedGroup1Names.length) + return "?"; + return JmolConstants.predefinedGroup1Names[groupID]; + } + final int getSeqcode() { return seqcode; } @@ -140,12 +146,14 @@ static String[] group3Names = new String[128]; static short group3NameCount = 0; - + static { - for (int i = 0; i < JmolConstants.predefinedGroup3Names.length; ++i) + int i; + for (i = 0; i < JmolConstants.predefinedGroup3Names.length; ++i) { addGroup3Name(JmolConstants.predefinedGroup3Names[i]); + } } - + synchronized static short addGroup3Name(String group3) { if (group3NameCount == group3Names.length) group3Names = Util.doubleLength(group3Names); Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-03-06 03:51:42 UTC (rev 4546) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-03-06 12:41:07 UTC (rev 4547) @@ -2000,6 +2000,44 @@ }; + public final static String[] predefinedGroup1Names = { + /* rmh + * + * G Glycine Gly P Proline Pro + * A Alanine Ala V Valine Val + * L Leucine Leu I Isoleucine Ile + * M Methionine Met C Cysteine Cys + * F Phenylalanine Phe Y Tyrosine Tyr + * W Tryptophan Trp H Histidine His + * K Lysine Lys R Arginine Arg + * Q Glutamine Gln N Asparagine Asn + * E Glutamic Acid Glu D Aspartic Acid Asp + * S Serine Ser T Threonine Thr + */ + "", // 0 this is the null group + + "A", // 1 + "R", + "N", + "D", + "C", + "Q", + "E", + "G", + "H", + "I", + "L", + "K", + "M", + "F", + "P", // 15 Proline + "S", + "T", + "W", + "Y", + "V", + }; + //////////////////////////////////////////////////////////////// // predefined sets //////////////////////////////////////////////////////////////// This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |