From: <ha...@us...> - 2012-03-01 12:41:20
|
Revision: 16844 http://jmol.svn.sourceforge.net/jmol/?rev=16844&view=rev Author: hansonr Date: 2012-03-01 12:41:09 +0000 (Thu, 01 Mar 2012) Log Message: ----------- version=12.3.17_dev # new feature: (JspecView 2.0.10027) overlay of any two compatible spectra # bug fix: draw HELIX fails for residue numbers < 0 # new feature: allows simpler color scheme definition # color property occupancy "myscheme=red green blue" # Var x = ["red","green","blue"]; color property occupancy @{"myscheme=" + x} Modified Paths: -------------- trunk/Jmol/appletweb/JSpecViewApplet.jar trunk/Jmol/appletweb/JSpecViewAppletSigned.jar trunk/Jmol/src/org/jmol/modelsetbio/AminoMonomer.java trunk/Jmol/src/org/jmol/modelsetbio/BioPolymer.java trunk/Jmol/src/org/jmol/util/Measure.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/appletweb/JSpecViewApplet.jar =================================================================== (Binary files differ) Modified: trunk/Jmol/appletweb/JSpecViewAppletSigned.jar =================================================================== (Binary files differ) Modified: trunk/Jmol/src/org/jmol/modelsetbio/AminoMonomer.java =================================================================== --- trunk/Jmol/src/org/jmol/modelsetbio/AminoMonomer.java 2012-03-01 12:36:28 UTC (rev 16843) +++ trunk/Jmol/src/org/jmol/modelsetbio/AminoMonomer.java 2012-03-01 12:41:09 UTC (rev 16844) @@ -243,7 +243,7 @@ aminoHydrogenPoint.add(nitrogenPoint, vNH); nitrogenHydrogenPoint = new Point3f(aminoHydrogenPoint); if (Logger.debugging) - Logger.info("draw pta" + monomerIndex + "_" + nitrogenPoint.index + " " + Logger.info("draw ID \"pta" + monomerIndex + "_" + nitrogenPoint.index + "\" " + Escape.escape(nitrogenPoint) + Escape.escape(aminoHydrogenPoint) + " # " + nitrogenPoint); return true; Modified: trunk/Jmol/src/org/jmol/modelsetbio/BioPolymer.java =================================================================== --- trunk/Jmol/src/org/jmol/modelsetbio/BioPolymer.java 2012-03-01 12:36:28 UTC (rev 16843) +++ trunk/Jmol/src/org/jmol/modelsetbio/BioPolymer.java 2012-03-01 12:41:09 UTC (rev 16844) @@ -615,7 +615,8 @@ * @param calcRamachandranStraightness * @param useQuaternionStraightness * @param writeRamachandranStraightness - * @param quaternionStraightness NOT USED + * @param quaternionStraightness + * NOT USED * @param factor * @param isAmino * @param isRelativeAlias @@ -649,6 +650,8 @@ String strExtra = ""; float val1 = Float.NaN; float val2 = Float.NaN; + Point3f pt = (isDraw ? new Point3f() : null); + int dm = (mStep <= 1 ? 1 : mStep); for (int m = m0; m < p.monomerCount; m += dm) { Monomer monomer = p.monomers[m]; @@ -686,32 +689,37 @@ // standard dihedral/Jmol definitions for anticlockwise positive // angles AminoMonomer aa = (AminoMonomer) monomer; - pdbATOM.append("draw phi" + id + " ARROW ARC ").append( - Escape.escape(aa.getNitrogenAtom())).append( - Escape.escape(a)).append( - Escape.escape(aa.getCarbonylCarbonAtom())).append( - "{" + (-x) + " " + x + " 0.5} \"phi = " + (int) x + "\"") + pt.set(-x, x, 0.5f); + pdbATOM.append("draw ID \"phi").append(id).append("\" ARROW ARC ") + .append(Escape.escape(aa.getNitrogenAtom())) + .append(Escape.escape(a)) + .append(Escape.escape(aa.getCarbonylCarbonAtom())) + .append(Escape.escape(pt)) + .append(" \"phi = ").append(String.valueOf((int) x)).append('\"') .append(" color ").append(qColor[2]).append('\n'); - pdbATOM.append("draw psi" + id + " ARROW ARC ").append( - Escape.escape(a)).append( - Escape.escape(aa.getCarbonylCarbonAtom())).append( - Escape.escape(aa.getNitrogenAtom())).append( - "{0 " + y + " 0.5} \"psi = " + (int) y + "\"") + pt.set(0, y, 0.5f); + pdbATOM.append("draw ID \"psi").append(id).append("\" ARROW ARC ") + .append(Escape.escape(a)) + .append(Escape.escape(aa.getCarbonylCarbonAtom())) + .append(Escape.escape(aa.getNitrogenAtom())) + .append(Escape.escape(pt)) + .append(" \"psi = ").append(String.valueOf((int) y)).append('\"') .append(" color ").append(qColor[1]).append('\n'); - pdbATOM.append("draw planeNCC" + id + " ").append( - Escape.escape(aa.getNitrogenAtom())).append(Escape.escape(a)) - .append(Escape.escape(aa.getCarbonylCarbonAtom())).append( - " color ").append(qColor[0]).append('\n'); - pdbATOM.append("draw planeCNC" + id + " ").append( - Escape.escape(((AminoMonomer) p.monomers[m - 1]) - .getCarbonylCarbonAtom())).append( - Escape.escape(aa.getNitrogenAtom())).append(Escape.escape(a)) + pdbATOM.append("draw ID \"planeNCC").append(id).append("\" ") + .append(Escape.escape(aa.getNitrogenAtom())) + .append(Escape.escape(a)) + .append(Escape.escape(aa.getCarbonylCarbonAtom())) + .append(" color ").append(qColor[0]).append('\n'); + pdbATOM.append("draw ID \"planeCNC").append(id).append("\" ") + .append(Escape.escape(((AminoMonomer) p.monomers[m - 1]).getCarbonylCarbonAtom())) + .append(Escape.escape(aa.getNitrogenAtom())) + .append(Escape.escape(a)) .append(" color ").append(qColor[1]).append('\n'); - pdbATOM.append("draw planeCCN" + id + " ").append(Escape.escape(a)) - .append(Escape.escape(aa.getCarbonylCarbonAtom())).append( - Escape.escape(((AminoMonomer) p.monomers[m + 1]) - .getNitrogenAtom())).append(" color ") - .append(qColor[2]).append('\n'); + pdbATOM.append("draw ID \"planeCCN").append(id).append("\" ") + .append(Escape.escape(a)) + .append(Escape.escape(aa.getCarbonylCarbonAtom())) + .append(Escape.escape(((AminoMonomer) p.monomers[m + 1]).getNitrogenAtom())) + .append(" color ").append(qColor[2]).append('\n'); continue; } if (Float.isNaN(angledeg)) { @@ -883,8 +891,8 @@ Point3f ptH = ((AminoMonomer) monomer) .getNitrogenHydrogenPoint(); if (ptH != null) - pdbATOM.append("draw " + prefix + "nh" + id + " width 0.1 " - + Escape.escape(ptH) + "\n"); + pdbATOM.append("draw ID \"").append(prefix).append("nh").append(id).append('\"') + .append(" width 0.1 ").append(Escape.escape(ptH)).append('\n'); } } if (derivType == 1) { @@ -893,11 +901,13 @@ .append('\n'); continue; } - pdbATOM.append( - "draw " + prefix + "a" + id + " VECTOR " - + Escape.escape(ptCenter) + " {" + (x * 2) + "," + (y * 2) - + "," + (z * 2) + "}" + " \">" + deg + "\"").append( - " color ").append(qColor[derivType]).append('\n'); + pt.set(x * 2, y * 2, z * 2); + pdbATOM.append("draw ID \"").append(prefix).append("a").append(id).append('\"') + .append(" VECTOR ") + .append(Escape.escape(ptCenter)) + .append(Escape.escape(pt)) + .append(" \">").append(String.valueOf(deg)).append('\"') + .append(" color ").append(qColor[derivType]).append('\n'); continue; } strExtra = q.getInfo() Modified: trunk/Jmol/src/org/jmol/util/Measure.java =================================================================== --- trunk/Jmol/src/org/jmol/util/Measure.java 2012-03-01 12:36:28 UTC (rev 16843) +++ trunk/Jmol/src/org/jmol/util/Measure.java 2012-03-01 12:41:09 UTC (rev 16844) @@ -172,7 +172,7 @@ +"measure " + Escape.escape(a) + Escape.escape(pt_a_prime) + Escape.escape(pt_b_prime) + Escape.escape(b)); */ if (tokType == Token.draw) - return "draw ID " + id + " VECTOR " + Escape.escape(pt_a_prime) + return "draw ID \"" + id + "\" VECTOR " + Escape.escape(pt_a_prime) + " " + Escape.escape(n) + " color " + (theta < 0 ? "{255.0 200.0 0.0}" : "{255.0 0.0 128.0}"); if (tokType == Token.measure) Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2012-03-01 12:36:28 UTC (rev 16843) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2012-03-01 12:41:09 UTC (rev 16844) @@ -3,6 +3,8 @@ version=12.3.17_dev +# new feature: (JspecView 2.0.10027) overlay of any two compatible spectra +# bug fix: draw HELIX fails for residue numbers < 0 # new feature: allows simpler color scheme definition # color property occupancy "myscheme=red green blue" # Var x = ["red","green","blue"]; color property occupancy @{"myscheme=" + x} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |