Revision: 20252 http://sourceforge.net/p/jmol/code/20252 Author: hansonr Date: 2015-01-28 17:04:11 +0000 (Wed, 28 Jan 2015) Log Message: ----------- Jmol.___JmolVersion="14.3.12_2015.01.28"
new feature: MUTATE command -- replaces one amino acid group with another -- can read from RCSB or from user-specified file -- examples: mutate 33 lys // uses last occurrence of resno=33 mutate @@3 arg // replaces group of atom 3 in current model mutate @r @g // replaces resno in variable r with group in variable g mutate {r} his // same as above; r must be an atom selection mutate 22 "myfile.cif" // user-defined replacement bug fix: write "t.pdb" now correctly sequences groups and atoms, even after mutation new feature: resno is user settable Modified Paths: -------------- trunk/Jmol/src/org/jmol/modelsetbio/Resolver.java trunk/Jmol/src/org/jmol/viewer/FileManager.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/modelsetbio/Resolver.java =================================================================== --- trunk/Jmol/src/org/jmol/modelsetbio/Resolver.java 2015-01-28 16:16:02 UTC (rev 20251) +++ trunk/Jmol/src/org/jmol/modelsetbio/Resolver.java 2015-01-28 17:04:11 UTC (rev 20252) @@ -1736,6 +1736,7 @@ @Override public boolean mutate(int iatom, String fileName) { + String[] info = vwr.fm.getFileInfo(); boolean b = vwr.getBoolean(T.appendnew); Group g = vwr.ms.at[iatom].group; //try { @@ -1812,6 +1813,7 @@ // System.out.println("" + e); // } vwr.setBooleanProperty("appendNew", b); + vwr.fm.setFileInfo(info); return true; } Modified: trunk/Jmol/src/org/jmol/viewer/FileManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/FileManager.java 2015-01-28 16:16:02 UTC (rev 20251) +++ trunk/Jmol/src/org/jmol/viewer/FileManager.java 2015-01-28 17:04:11 UTC (rev 20252) @@ -102,7 +102,19 @@ private String nameAsGiven = JC.ZAP_TITLE, fullPathName, lastFullPathName, lastNameAsGiven = JC.ZAP_TITLE, fileName; + /** + * Set fullPathName, fileName, and nameAsGiven + * + * @param fileInfo if null, replace fullPathName and nameAsGiven with last version of such + * + * + */ public void setFileInfo(String[] fileInfo) { + if (fileInfo == null) { + fullPathName = lastFullPathName; + nameAsGiven = lastNameAsGiven; + return; + } // used by ScriptEvaluator dataFrame and load methods to temporarily save the state here fullPathName = fileInfo[0]; fileName = fileInfo[Math.min(1, fileInfo.length - 1)]; Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-01-28 16:16:02 UTC (rev 20251) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-01-28 17:04:11 UTC (rev 20252) @@ -26,6 +26,8 @@ mutate @r @g // replaces resno in variable r with group in variable g mutate {r} his // same as above; r must be an atom selection mutate 22 "myfile.cif" // user-defined replacement + +bug fix: write "t.pdb" now correctly sequences groups and atoms, even after mutation new feature: resno is user settable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits