From: <ha...@us...> - 2006-09-22 20:07:36
|
Revision: 5658 http://svn.sourceforge.net/jmol/?rev=5658&view=rev Author: hansonr Date: 2006-09-22 13:07:27 -0700 (Fri, 22 Sep 2006) Log Message: ----------- command history as a simple vector -- tested using JUnitTest Modified Paths: -------------- trunk/Jmol/src/org/jmol/util/CommandHistory.java trunk/Jmol/test/org/jmol/util/TestCommandHistory.java Modified: trunk/Jmol/src/org/jmol/util/CommandHistory.java =================================================================== --- trunk/Jmol/src/org/jmol/util/CommandHistory.java 2006-09-22 19:01:44 UTC (rev 5657) +++ trunk/Jmol/src/org/jmol/util/CommandHistory.java 2006-09-22 20:07:27 UTC (rev 5658) @@ -23,6 +23,7 @@ */ package org.jmol.util; +import java.util.Vector; /** * Implements a queue for a bash-like command history. */ @@ -31,7 +32,8 @@ /** * Array of commands. */ - private String[] commandList = null; + private Vector commandList = null; + private int maxSize; /** * Position of the next command. @@ -83,7 +85,7 @@ * @return the String value of a command. */ private String getCommand() { - return commandList[cursorPos]; + return (String)commandList.get(cursorPos); } /** @@ -94,16 +96,14 @@ public void addCommand(String command) { if(command == null || command.length() == 0) return; - if (nextCommand >= commandList.length) { - nextCommand = 0; + if (nextCommand >= maxSize) { + commandList.remove(0); + nextCommand = maxSize - 1; } - commandList[nextCommand] = command; + commandList.add(nextCommand, command); nextCommand++; - if (nextCommand >= commandList.length) { - nextCommand = 0; - } cursorPos = nextCommand; - commandList[nextCommand] = ""; + commandList.add(nextCommand, ""); } /** @@ -112,31 +112,14 @@ * @param maxSize maximum size for the command queue. */ void setMaxSize(int maxSize) { - if (maxSize + 1 == commandList.length) { + if (maxSize == this.maxSize) return; + while (this.maxSize > maxSize) { + commandList.remove(0); + this.maxSize--; + nextCommand = cursorPos = this.maxSize; } - String[] tmpCommandList = new String[maxSize + 1]; - int lastCommand = commandList.length - 1; - while ((lastCommand > 0) && (commandList[lastCommand] == null)) { - lastCommand--; - } - if (tmpCommandList.length - 1 > lastCommand) { - for (int i = 0; i < lastCommand; i++) { - tmpCommandList[i] = commandList[i]; - } - return; - } - for (int i = 0; i < tmpCommandList.length; i++) { - tmpCommandList[tmpCommandList.length - i - 1] = commandList[commandList.length - i - 1]; - } - int delta = 0; - if (nextCommand >= tmpCommandList.length) { - delta = nextCommand - tmpCommandList.length + 1; - } - for (int i = 0; i <= nextCommand - delta; i++) { - tmpCommandList[nextCommand - delta - i] = commandList[nextCommand - i]; - } - commandList = tmpCommandList; + this.maxSize = maxSize; } /** @@ -145,9 +128,10 @@ * @param maxSize maximum size for the command queue. */ void reset(int maxSize) { - commandList = new String[maxSize + 1]; + this.maxSize = maxSize; + commandList = new Vector(); nextCommand = 0; - commandList[nextCommand] = ""; + commandList.add(""); cursorPos = 0; } } Modified: trunk/Jmol/test/org/jmol/util/TestCommandHistory.java =================================================================== --- trunk/Jmol/test/org/jmol/util/TestCommandHistory.java 2006-09-22 19:01:44 UTC (rev 5657) +++ trunk/Jmol/test/org/jmol/util/TestCommandHistory.java 2006-09-22 20:07:27 UTC (rev 5658) @@ -58,36 +58,55 @@ assertEquals("c", h.getCommandUp()); assertEquals("b", h.getCommandUp()); assertEquals("a", h.getCommandUp()); - assertEquals("" , h.getCommandUp()); - assertEquals("d", h.getCommandUp()); + assertEquals(null, h.getCommandUp()); // Testing getCommandDown() - assertEquals("" , h.getCommandDown()); - assertEquals("a", h.getCommandDown()); assertEquals("b", h.getCommandDown()); assertEquals("c", h.getCommandDown()); assertEquals("d", h.getCommandDown()); assertEquals("" , h.getCommandDown()); - assertEquals("a", h.getCommandDown()); + assertEquals(null, h.getCommandDown()); // Modifying history size h.setMaxSize(2); // Testing getCommandUp() - assertEquals("" , h.getCommandUp()); assertEquals("d", h.getCommandUp()); assertEquals("c", h.getCommandUp()); - assertEquals("" , h.getCommandUp()); + assertEquals(null, h.getCommandUp()); + assertEquals(null, h.getCommandUp()); + assertEquals(null, h.getCommandUp()); + + // Testing getCommandDown(); + assertEquals("d", h.getCommandDown()); + assertEquals("" , h.getCommandDown()); + assertEquals(null, h.getCommandDown()); + + // Modifying history size + h.setMaxSize(4); + + // Testing getCommandUp() assertEquals("d", h.getCommandUp()); assertEquals("c", h.getCommandUp()); + assertEquals(null, h.getCommandUp()); + assertEquals(null, h.getCommandUp()); + assertEquals(null, h.getCommandUp()); + + h.addCommand("e"); + h.addCommand("f"); + // Testing getCommandUp() + assertEquals("f", h.getCommandUp()); + assertEquals("e", h.getCommandUp()); + assertEquals("d", h.getCommandUp()); + assertEquals("c", h.getCommandUp()); + assertEquals(null, h.getCommandUp()); + // Testing getCommandDown(); assertEquals("d", h.getCommandDown()); + assertEquals("e", h.getCommandDown()); + assertEquals("f", h.getCommandDown()); assertEquals("" , h.getCommandDown()); - assertEquals("c", h.getCommandDown()); - assertEquals("d", h.getCommandDown()); - assertEquals("" , h.getCommandDown()); - assertEquals("c", h.getCommandDown()); - assertEquals("d", h.getCommandDown()); + assertEquals(null, h.getCommandDown()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2006-09-23 19:58:15
|
Revision: 5684 http://svn.sourceforge.net/jmol/?rev=5684&view=rev Author: nicove Date: 2006-09-23 12:57:59 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Fixing i18n (application / applet distinction) Modified Paths: -------------- trunk/Jmol/build-i18n.xml trunk/Jmol/src/org/jmol/translation/Jmol/Jmol.pot trunk/Jmol/src/org/jmol/translation/Jmol/ca.po trunk/Jmol/src/org/jmol/translation/Jmol/de.po trunk/Jmol/src/org/jmol/translation/Jmol/es.po trunk/Jmol/src/org/jmol/translation/Jmol/et.po trunk/Jmol/src/org/jmol/translation/Jmol/fr.po trunk/Jmol/src/org/jmol/translation/Jmol/nl.po trunk/Jmol/src/org/jmol/translation/Jmol/pt.po Modified: trunk/Jmol/build-i18n.xml =================================================================== --- trunk/Jmol/build-i18n.xml 2006-09-23 19:41:22 UTC (rev 5683) +++ trunk/Jmol/build-i18n.xml 2006-09-23 19:57:59 UTC (rev 5684) @@ -35,14 +35,9 @@ <!-- Filesets for the rest of the build --> <fileset id="Jmol.java.files" dir="${basedir}/${src.dir}"> <include name="**/*.java"/> - <exclude name="**/jmol/applet/*.java"/> - <exclude name="org/jmol/popup/*.java"/> + <excludesfile name="applet.classes"/> </fileset> - <fileset id="JmolApplet.java.files" dir="${basedir}/${src.dir}"> - <include name="JmolApplet*.java"/> - <include name="org/jmol/**/*.java"/> - <exclude name="org/jmol/**/cdk/*.java"/> - <include name="org/jmol/popup/*.java"/> + <fileset id="JmolApplet.java.files" dir="${basedir}/${src.dir}" includesfile="applet.classes"> </fileset> <!-- <for list ...> construct needs ant-contrib.jar --> Modified: trunk/Jmol/src/org/jmol/translation/Jmol/Jmol.pot =================================================================== --- trunk/Jmol/src/org/jmol/translation/Jmol/Jmol.pot 2006-09-23 19:41:22 UTC (rev 5683) +++ trunk/Jmol/src/org/jmol/translation/Jmol/Jmol.pot 2006-09-23 19:57:59 UTC (rev 5684) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: jmo...@li...\n" -"POT-Creation-Date: 2006-09-23 11:08+0200\n" +"POT-Creation-Date: 2006-09-23 21:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -16,22 +16,6 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: org/jmol/viewer/PickingManager.java:167 -msgid "pick one more atom in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:168 -msgid "pick two atoms in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:229 -msgid "atoms selected" -msgstr "" - -#: org/jmol/viewer/StatusManager.java:177 -msgid "Jmol executing script ..." -msgstr "" - #: org/openscience/jmol/app/AboutDialog.java:57 #: org/openscience/jmol/app/GuiMap.java:154 msgid "About Jmol" Modified: trunk/Jmol/src/org/jmol/translation/Jmol/ca.po =================================================================== --- trunk/Jmol/src/org/jmol/translation/Jmol/ca.po 2006-09-23 19:41:22 UTC (rev 5683) +++ trunk/Jmol/src/org/jmol/translation/Jmol/ca.po 2006-09-23 19:57:59 UTC (rev 5684) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Jmol\n" "Report-Msgid-Bugs-To: jmo...@li...\n" -"POT-Creation-Date: 2006-09-23 11:08+0200\n" +"POT-Creation-Date: 2006-09-23 21:53+0200\n" "PO-Revision-Date: 2006-01-30 03:35+0100\n" "Last-Translator: Toni Hermoso Pulido <to...@so...>\n" "Language-Team: Catalan <jmo...@li...>\n" @@ -17,24 +17,6 @@ "X-Poedit-Language: Catalan\n" "X-Poedit-Country: ANDORRA\n" -#: org/jmol/viewer/PickingManager.java:167 -msgid "pick one more atom in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:168 -msgid "pick two atoms in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:229 -#, fuzzy -msgid "atoms selected" -msgstr "conjunt d'àtoms" - -#: org/jmol/viewer/StatusManager.java:177 -#, fuzzy -msgid "Jmol executing script ..." -msgstr "S'està executant la seqüència..." - #: org/openscience/jmol/app/AboutDialog.java:57 #: org/openscience/jmol/app/GuiMap.java:154 msgid "About Jmol" @@ -1096,6 +1078,14 @@ msgid "What's New in Jmol" msgstr "Novetats del Jmol" +#, fuzzy +#~ msgid "atoms selected" +#~ msgstr "conjunt d'àtoms" + +#, fuzzy +#~ msgid "Jmol executing script ..." +#~ msgstr "S'està executant la seqüència..." + #~ msgid "Rasmol Scripts" #~ msgstr "Seqüències de RasMol" Modified: trunk/Jmol/src/org/jmol/translation/Jmol/de.po =================================================================== --- trunk/Jmol/src/org/jmol/translation/Jmol/de.po 2006-09-23 19:41:22 UTC (rev 5683) +++ trunk/Jmol/src/org/jmol/translation/Jmol/de.po 2006-09-23 19:57:59 UTC (rev 5684) @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Jmol 10\n" "Report-Msgid-Bugs-To: jmo...@li...\n" -"POT-Creation-Date: 2006-09-23 11:08+0200\n" +"POT-Creation-Date: 2006-09-23 21:53+0200\n" "PO-Revision-Date: 2006-04-14 18:00+0100\n" "Last-Translator: Sebastian Lisken <sebastianlisken at users.sourceforge." "net>\n" @@ -18,24 +18,6 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: org/jmol/viewer/PickingManager.java:167 -msgid "pick one more atom in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:168 -msgid "pick two atoms in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:229 -#, fuzzy -msgid "atoms selected" -msgstr "Atome ausgewählt" - -#: org/jmol/viewer/StatusManager.java:177 -#, fuzzy -msgid "Jmol executing script ..." -msgstr "Skript ausführen..." - #: org/openscience/jmol/app/AboutDialog.java:57 #: org/openscience/jmol/app/GuiMap.java:154 msgid "About Jmol" @@ -1097,6 +1079,14 @@ msgid "What's New in Jmol" msgstr "Neues in Jmol" +#, fuzzy +#~ msgid "atoms selected" +#~ msgstr "Atome ausgewählt" + +#, fuzzy +#~ msgid "Jmol executing script ..." +#~ msgstr "Skript ausführen..." + #~ msgid "Rasmol Scripts" #~ msgstr "Rasmol-Skripte" Modified: trunk/Jmol/src/org/jmol/translation/Jmol/es.po =================================================================== --- trunk/Jmol/src/org/jmol/translation/Jmol/es.po 2006-09-23 19:41:22 UTC (rev 5683) +++ trunk/Jmol/src/org/jmol/translation/Jmol/es.po 2006-09-23 19:57:59 UTC (rev 5684) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Jmol 10\n" "Report-Msgid-Bugs-To: jmo...@li...\n" -"POT-Creation-Date: 2006-09-23 11:08+0200\n" +"POT-Creation-Date: 2006-09-23 21:53+0200\n" "PO-Revision-Date: 2006-09-19 01:09+0100\n" "Last-Translator: Angel Herráez <ang...@ua...>\n" "Language-Team: Spanish <Jmo...@li...>\n" @@ -19,22 +19,6 @@ "X-Poedit-Country: SPAIN\n" "X-Poedit-SourceCharset: utf-8\n" -#: org/jmol/viewer/PickingManager.java:167 -msgid "pick one more atom in order to spin the model around an axis" -msgstr "elige uno o varios átomos para que el modelo gire en torno a un eje" - -#: org/jmol/viewer/PickingManager.java:168 -msgid "pick two atoms in order to spin the model around an axis" -msgstr "elige dos átomos para que el modelo gire en torno a un eje" - -#: org/jmol/viewer/PickingManager.java:229 -msgid "atoms selected" -msgstr "átomos seleccionados" - -#: org/jmol/viewer/StatusManager.java:177 -msgid "Jmol executing script ..." -msgstr "Jmol ejecutando guión..." - #: org/openscience/jmol/app/AboutDialog.java:57 #: org/openscience/jmol/app/GuiMap.java:154 msgid "About Jmol" @@ -1092,6 +1076,18 @@ msgid "What's New in Jmol" msgstr "Novedades en Jmol" +#~ msgid "pick one more atom in order to spin the model around an axis" +#~ msgstr "elige uno o varios átomos para que el modelo gire en torno a un eje" + +#~ msgid "pick two atoms in order to spin the model around an axis" +#~ msgstr "elige dos átomos para que el modelo gire en torno a un eje" + +#~ msgid "atoms selected" +#~ msgstr "átomos seleccionados" + +#~ msgid "Jmol executing script ..." +#~ msgstr "Jmol ejecutando guión..." + #~ msgid "pick " #~ msgstr "elige" Modified: trunk/Jmol/src/org/jmol/translation/Jmol/et.po =================================================================== --- trunk/Jmol/src/org/jmol/translation/Jmol/et.po 2006-09-23 19:41:22 UTC (rev 5683) +++ trunk/Jmol/src/org/jmol/translation/Jmol/et.po 2006-09-23 19:57:59 UTC (rev 5684) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Jmol\n" "Report-Msgid-Bugs-To: jmo...@li...\n" -"POT-Creation-Date: 2006-09-23 11:08+0200\n" +"POT-Creation-Date: 2006-09-23 21:53+0200\n" "PO-Revision-Date: 2006-03-17 20:19+0100\n" "Last-Translator: Ivo Sarak <iv...@ra...>\n" "Language-Team: Estonian <Jmo...@li...>\n" @@ -17,24 +17,6 @@ "X-Poedit-Country: Estonia\n" "X-Poedit-Basepath: ../../../..\n" -#: org/jmol/viewer/PickingManager.java:167 -msgid "pick one more atom in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:168 -msgid "pick two atoms in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:229 -#, fuzzy -msgid "atoms selected" -msgstr "atom set" - -#: org/jmol/viewer/StatusManager.java:177 -#, fuzzy -msgid "Jmol executing script ..." -msgstr "Käivitan skripti ..." - #: org/openscience/jmol/app/AboutDialog.java:57 #: org/openscience/jmol/app/GuiMap.java:154 msgid "About Jmol" @@ -1091,6 +1073,14 @@ msgid "What's New in Jmol" msgstr "Mida on uut Jmol'is" +#, fuzzy +#~ msgid "atoms selected" +#~ msgstr "atom set" + +#, fuzzy +#~ msgid "Jmol executing script ..." +#~ msgstr "Käivitan skripti ..." + #~ msgid "Rasmol Scripts" #~ msgstr "Rasmol skriptid" Modified: trunk/Jmol/src/org/jmol/translation/Jmol/fr.po =================================================================== --- trunk/Jmol/src/org/jmol/translation/Jmol/fr.po 2006-09-23 19:41:22 UTC (rev 5683) +++ trunk/Jmol/src/org/jmol/translation/Jmol/fr.po 2006-09-23 19:57:59 UTC (rev 5684) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Jmol\n" "Report-Msgid-Bugs-To: jmo...@li...\n" -"POT-Creation-Date: 2006-09-23 11:08+0200\n" +"POT-Creation-Date: 2006-09-23 21:53+0200\n" "PO-Revision-Date: 2006-02-19 17:18+0100\n" "Last-Translator: Nicolas Vervelle <ni...@us...>\n" "Language-Team: French <Jmo...@li...>\n" @@ -18,23 +18,6 @@ "X-Poedit-Country: France\n" "X-Poedit-Basepath: ../../../..\n" -#: org/jmol/viewer/PickingManager.java:167 -msgid "pick one more atom in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:168 -msgid "pick two atoms in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:229 -#, fuzzy -msgid "atoms selected" -msgstr "groupe d'atomes" - -#: org/jmol/viewer/StatusManager.java:177 -msgid "Jmol executing script ..." -msgstr "Exécution du script par Jmol..." - #: org/openscience/jmol/app/AboutDialog.java:57 #: org/openscience/jmol/app/GuiMap.java:154 msgid "About Jmol" @@ -1097,6 +1080,13 @@ msgid "What's New in Jmol" msgstr "Les nouveautés de Jmol" +#, fuzzy +#~ msgid "atoms selected" +#~ msgstr "groupe d'atomes" + +#~ msgid "Jmol executing script ..." +#~ msgstr "Exécution du script par Jmol..." + #~ msgid "Rasmol Scripts" #~ msgstr "Scripts Rasmol" Modified: trunk/Jmol/src/org/jmol/translation/Jmol/nl.po =================================================================== --- trunk/Jmol/src/org/jmol/translation/Jmol/nl.po 2006-09-23 19:41:22 UTC (rev 5683) +++ trunk/Jmol/src/org/jmol/translation/Jmol/nl.po 2006-09-23 19:57:59 UTC (rev 5684) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Jmol\n" "Report-Msgid-Bugs-To: jmo...@li...\n" -"POT-Creation-Date: 2006-09-23 11:08+0200\n" +"POT-Creation-Date: 2006-09-23 21:53+0200\n" "PO-Revision-Date: 2006-04-09 11:48+0100\n" "Last-Translator: Egon Willighagen <eg...@jm...>\n" "Language-Team: Dutch <jmo...@li...>\n" @@ -17,24 +17,6 @@ "X-Poedit-Language: Dutch\n" "X-Poedit-Country: The Netherlands\n" -#: org/jmol/viewer/PickingManager.java:167 -msgid "pick one more atom in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:168 -msgid "pick two atoms in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:229 -#, fuzzy -msgid "atoms selected" -msgstr "atoomset" - -#: org/jmol/viewer/StatusManager.java:177 -#, fuzzy -msgid "Jmol executing script ..." -msgstr "Afspelen van script..." - #: org/openscience/jmol/app/AboutDialog.java:57 #: org/openscience/jmol/app/GuiMap.java:154 msgid "About Jmol" @@ -1092,6 +1074,14 @@ msgid "What's New in Jmol" msgstr "Wat is nieuw in Jmol" +#, fuzzy +#~ msgid "atoms selected" +#~ msgstr "atoomset" + +#, fuzzy +#~ msgid "Jmol executing script ..." +#~ msgstr "Afspelen van script..." + #~ msgid "Rasmol Scripts" #~ msgstr "Rasmol-scripts" Modified: trunk/Jmol/src/org/jmol/translation/Jmol/pt.po =================================================================== --- trunk/Jmol/src/org/jmol/translation/Jmol/pt.po 2006-09-23 19:41:22 UTC (rev 5683) +++ trunk/Jmol/src/org/jmol/translation/Jmol/pt.po 2006-09-23 19:57:59 UTC (rev 5684) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Jmol\n" "Report-Msgid-Bugs-To: jmo...@li...\n" -"POT-Creation-Date: 2006-09-23 11:08+0200\n" +"POT-Creation-Date: 2006-09-23 21:53+0200\n" "PO-Revision-Date: 2005-12-20 07:33-0000\n" "Last-Translator: Metro <por...@gm...>\n" "Language-Team: Portugal@Folding <Jmo...@li...>\n" @@ -17,24 +17,6 @@ "X-Poedit-Country: Portugal\n" "X-Poedit-Basepath: ../../../..\n" -#: org/jmol/viewer/PickingManager.java:167 -msgid "pick one more atom in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:168 -msgid "pick two atoms in order to spin the model around an axis" -msgstr "" - -#: org/jmol/viewer/PickingManager.java:229 -#, fuzzy -msgid "atoms selected" -msgstr "Grupo de átomos" - -#: org/jmol/viewer/StatusManager.java:177 -#, fuzzy -msgid "Jmol executing script ..." -msgstr "Executando um script..." - #: org/openscience/jmol/app/AboutDialog.java:57 #: org/openscience/jmol/app/GuiMap.java:154 msgid "About Jmol" @@ -1093,6 +1075,14 @@ msgid "What's New in Jmol" msgstr "O que há de novo no Jmol" +#, fuzzy +#~ msgid "atoms selected" +#~ msgstr "Grupo de átomos" + +#, fuzzy +#~ msgid "Jmol executing script ..." +#~ msgstr "Executando um script..." + #~ msgid "Rasmol Scripts" #~ msgstr "Rasmol Scripts" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-09-25 03:25:26
|
Revision: 5709 http://svn.sourceforge.net/jmol/?rev=5709&view=rev Author: hansonr Date: 2006-09-24 20:25:20 -0700 (Sun, 24 Sep 2006) Log Message: ----------- 10.9.64 - revamped CIF reader - popup menu select-->hetero-->By HETATM - fixed exit;/quit; for script interruption - new D,T colors Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-09-25 03:15:27 UTC (rev 5708) +++ trunk/Jmol/build.xml 2006-09-25 03:25:20 UTC (rev 5709) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.64" /> + <property name="version" value="10.9.65" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-09-25 03:15:27 UTC (rev 5708) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-09-25 03:25:20 UTC (rev 5709) @@ -42,7 +42,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.64"; + public final static String version = "10.9.65"; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); @@ -580,8 +580,8 @@ 0xFFBFA6A6, // Al 13 0xFFFFFF30, // S 16 0xFF57178F, // Cs 55 - 0xFFD9FFFF, // D 2H (He color) - 0xFFCC80FF, // T 3H (Li color) + 0xFFFFFFC0, // D 2H + 0xFFFFFFA0, // T 3H }; /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-09-27 01:28:45
|
Revision: 5741 http://svn.sourceforge.net/jmol/?rev=5741&view=rev Author: hansonr Date: 2006-09-26 18:28:32 -0700 (Tue, 26 Sep 2006) Log Message: ----------- 10.9.67 finis command line absolutely no display action -- first pass isosurface vdw 1.0 molecule #absolute radius for all atoms (useless) isosurface vdw +0.2 molecule #van der Waal radius + 0.2 Angstroms isosurface vdw -0.2 molecule #vdw - 0.2 Angstroms isosurface vdw 90% molecule #at 90% of vdw isosurface vdw 70% molecule #at 70% of vdw isosurface vdw 120% molecule #at 120% of vdw same for isosurface ionic but that does the ionic radius calculation instead of van der Waals "molecule" just sounds better than "solvent" in some contexts, like crystals, but it's the same surface -- the molecule/solvent surface. Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-09-27 01:16:03 UTC (rev 5740) +++ trunk/Jmol/build.xml 2006-09-27 01:28:32 UTC (rev 5741) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.66" /> + <property name="version" value="10.9.67" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-09-27 01:16:03 UTC (rev 5740) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-09-27 01:28:32 UTC (rev 5741) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.66"; + public final static String version = "10.9.67"; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-09-27 18:08:00
|
Revision: 5750 http://svn.sourceforge.net/jmol/?rev=5750&view=rev Author: hansonr Date: 2006-09-27 11:07:51 -0700 (Wed, 27 Sep 2006) Log Message: ----------- This is all I have for today and also for 10.9.67 I can't figure out what I'm doing wrong with that applet console -- Nico? someone? please help me get that layout correct, commit the changes, and send this out. Bob Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/applet/Console.java trunk/Jmol/src/org/jmol/viewer/JmolConstants.java trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-09-27 17:55:12 UTC (rev 5749) +++ trunk/Jmol/build.xml 2006-09-27 18:07:51 UTC (rev 5750) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.67" /> + <property name="version" value="10.9.68" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/applet/Console.java =================================================================== --- trunk/Jmol/src/org/jmol/applet/Console.java 2006-09-27 17:55:12 UTC (rev 5749) +++ trunk/Jmol/src/org/jmol/applet/Console.java 2006-09-27 18:07:51 UTC (rev 5750) @@ -39,8 +39,10 @@ final JFrame jf = new JFrame(GT._("Jmol Script Console")); final JButton runButton = new JButton(GT._("Execute")); - final JButton clearButton = new JButton(GT._("Clear")); + final JButton clearOutButton = new JButton(GT._("Clear Output")); + final JButton clearInButton = new JButton(GT._("Clear Input")); final JButton historyButton = new JButton(GT._("History")); + final JButton loadButton = new JButton(GT._("Load")); final SimpleAttributeSet attributesCommand = new SimpleAttributeSet(); @@ -71,21 +73,28 @@ c.setLayout(new BorderLayout()); c.add(jsp, BorderLayout.CENTER); - JLabel label = new JLabel(GT._("press CTRL-ENTER for new line"), + JLabel label1 = new JLabel(GT._("press CTRL-ENTER for new line or paste model data and press Load"), SwingConstants.CENTER); - label.setHorizontalAlignment(SwingConstants.CENTER); - Container c1 = new Container(); - c1.setLayout(new BorderLayout()); - c1.add(runButton, BorderLayout.WEST); - c1.add(label, BorderLayout.CENTER); - c1.add(clearButton, BorderLayout.EAST); - c1.add(historyButton, BorderLayout.SOUTH); - c.add(c1, BorderLayout.SOUTH); + Container c2 = new Container(); + Container c3 = new Container(); + c3.setLayout(new BoxLayout(c3, BoxLayout.Y_AXIS)); + c2.setLayout(new BoxLayout(c2, BoxLayout.X_AXIS)); + c2.add(runButton); + c2.add(loadButton); + c2.add(clearInButton); + c2.add(clearOutButton); + c2.add(historyButton); + c3.add(c2); + c3.add(label1); + c.add(c3, BorderLayout.SOUTH); + runButton.addActionListener(this); - clearButton.addActionListener(this); + clearInButton.addActionListener(this); + clearOutButton.addActionListener(this); historyButton.addActionListener(this); + loadButton.addActionListener(this); - jf.setSize(400, 400); + jf.setSize(500, 400); jf.addWindowListener(this); } @@ -137,12 +146,18 @@ if (source == runButton) { execute(); } - if (source == clearButton) { + if (source == clearInButton) { + input.setText(""); + } + if (source == clearOutButton) { output.setText(""); } if (source == historyButton) { output.setText(viewer.getSetHistory(Integer.MAX_VALUE)); } + if (source == loadButton) { + viewer.loadInline(input.getText()); + } } void execute() { Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-09-27 17:55:12 UTC (rev 5749) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-09-27 18:07:51 UTC (rev 5750) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.67"; + public final static String version = "10.9.68"; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2006-09-27 17:55:12 UTC (rev 5749) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2006-09-27 18:07:51 UTC (rev 5750) @@ -1038,6 +1038,8 @@ } public void openFile(String name, int[] params) { + if (name == null) + return; if (name.equalsIgnoreCase("string")) { openStringInline(getInlineData(), params); return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2006-09-30 11:17:57
|
Revision: 5777 http://svn.sourceforge.net/jmol/?rev=5777&view=rev Author: nicove Date: 2006-09-30 04:17:31 -0700 (Sat, 30 Sep 2006) Log Message: ----------- Logger Modified Paths: -------------- trunk/Jmol/examples/basic/Integration.java trunk/Jmol/examples/basic/JmolTable.java trunk/Jmol/examples/externalAppletControls/JmolSwingTextAreaControl.java trunk/Jmol/src/org/jmol/popup/JmolPopupSwing.java trunk/Jmol/test/org/jmol/smiles/TestSmilesParser.java trunk/Jmol/test/org/jmol/util/TestInt2ObjHash.java trunk/Jmol/test/org/jmol/util/TestIntInt2ObjHash.java Modified: trunk/Jmol/examples/basic/Integration.java =================================================================== --- trunk/Jmol/examples/basic/Integration.java 2006-09-30 10:42:45 UTC (rev 5776) +++ trunk/Jmol/examples/basic/Integration.java 2006-09-30 11:17:31 UTC (rev 5777) @@ -36,6 +36,7 @@ import org.jmol.adapter.smarter.SmarterJmolAdapter; import org.jmol.api.JmolAdapter; import org.jmol.api.JmolSimpleViewer; +import org.jmol.util.Logger; /** * A example of integrating the Jmol viewer into a java application. @@ -67,7 +68,7 @@ viewer.evalString(strScript); String strError = viewer.getOpenFileError(); if (strError != null) - System.out.println(strError); + Logger.error(strError); } final static String strXyzHOH = Modified: trunk/Jmol/examples/basic/JmolTable.java =================================================================== --- trunk/Jmol/examples/basic/JmolTable.java 2006-09-30 10:42:45 UTC (rev 5776) +++ trunk/Jmol/examples/basic/JmolTable.java 2006-09-30 11:17:31 UTC (rev 5777) @@ -45,6 +45,7 @@ import org.jmol.api.JmolAdapter; import org.jmol.api.JmolViewer; import org.jmol.adapter.smarter.SmarterJmolAdapter; +import org.jmol.util.Logger; /** * A example of integrating the Jmol viewer into a JTable. @@ -73,7 +74,9 @@ JmolViewer v = (JmolViewer)((JmolPanel)data[i][0]).getViewer(); v.openFile(args[i]); String strError = v.getOpenFileError(); - if (strError != null) System.out.println(strError); + if (strError != null) { + Logger.error(strError); + } data[i][1] = new String(args[i]); } Modified: trunk/Jmol/examples/externalAppletControls/JmolSwingTextAreaControl.java =================================================================== --- trunk/Jmol/examples/externalAppletControls/JmolSwingTextAreaControl.java 2006-09-30 10:42:45 UTC (rev 5776) +++ trunk/Jmol/examples/externalAppletControls/JmolSwingTextAreaControl.java 2006-09-30 11:17:31 UTC (rev 5777) @@ -13,6 +13,8 @@ */ import org.jmol.applet.JmolAppletRegistry; +import org.jmol.util.Logger; + import java.awt.*; import java.awt.event.*; import javax.swing.*; @@ -38,7 +40,7 @@ JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)); swingTextArea = new JTextArea(); - System.out.println("here we go with swingTextArea:" + swingTextArea); + Logger.info("here we go with swingTextArea:" + swingTextArea); panel.add(swingTextArea, BorderLayout.CENTER); swingButton = new JButton("Go!"); swingButton.addActionListener(this); Modified: trunk/Jmol/src/org/jmol/popup/JmolPopupSwing.java =================================================================== --- trunk/Jmol/src/org/jmol/popup/JmolPopupSwing.java 2006-09-30 10:42:45 UTC (rev 5776) +++ trunk/Jmol/src/org/jmol/popup/JmolPopupSwing.java 2006-09-30 11:17:31 UTC (rev 5777) @@ -24,6 +24,7 @@ package org.jmol.popup; import org.jmol.api.*; +import org.jmol.util.Logger; import javax.swing.JComponent; import javax.swing.JPopupMenu; @@ -67,12 +68,13 @@ } void addToMenu(Object menu, JComponent item) { - if (menu instanceof JPopupMenu) + if (menu instanceof JPopupMenu) { ((JPopupMenu)menu).add(item); - else if (menu instanceof JMenu) + } else if (menu instanceof JMenu) { ((JMenu)menu).add(item); - else - System.out.println("cannot add object to menu:" + menu); + } else { + Logger.warn("cannot add object to menu: " + menu); + } } //////////////////////////////////////////////////////////////// Modified: trunk/Jmol/test/org/jmol/smiles/TestSmilesParser.java =================================================================== --- trunk/Jmol/test/org/jmol/smiles/TestSmilesParser.java 2006-09-30 10:42:45 UTC (rev 5776) +++ trunk/Jmol/test/org/jmol/smiles/TestSmilesParser.java 2006-09-30 11:17:31 UTC (rev 5777) @@ -4,6 +4,8 @@ package org.jmol.smiles; +import org.jmol.util.Logger; + import junit.framework.TestCase; public class TestSmilesParser extends TestCase { @@ -1309,11 +1311,11 @@ SmilesMolecule molecule1, SmilesMolecule molecule2) { if ((molecule1 == null) || (molecule2 == null)) { - System.out.println("Molecule null"); + Logger.error("Molecule null"); return false; } if (molecule1.getAtomsCount() != molecule2.getAtomsCount()) { - System.out.println( + Logger.error( "Atoms count (" + molecule1.getAtomsCount() + "," + molecule2.getAtomsCount() + ")"); @@ -1323,18 +1325,18 @@ SmilesAtom atom1 = molecule1.getAtom(i); SmilesAtom atom2 = molecule2.getAtom(i); if ((atom1 == null) || (atom2 == null)) { - System.out.println("Atom " + i + " null"); + Logger.error("Atom " + i + " null"); return false; } if (atom1.getAtomicMass() != atom2.getAtomicMass()) { - System.out.println( + Logger.error( "Atom " + i + " atomic mass (" + atom1.getAtomicMass() + "," + atom2.getAtomicMass() + ")"); return false; } if (atom1.getBondsCount() != atom2.getBondsCount()) { - System.out.println( + Logger.error( "Atom " + i + " bonds count (" + atom1.getBondsCount() + "," + atom2.getBondsCount() + ")"); @@ -1344,27 +1346,27 @@ SmilesBond bond1 = atom1.getBond(j); SmilesBond bond2 = atom2.getBond(j); if ((bond1 == null) || (bond2 == null)) { - System.out.println( + Logger.error( "Atom " + i + ", bond " + j + " null (" + bond1 + "," + bond2 + ")"); return false; } if (bond1.getBondType() != bond2.getBondType()) { - System.out.println( + Logger.error( "Atom " + i + ", bond " + j + " bond type (" + bond1.getBondType() + "," + bond2.getBondType() + ")"); return false; } if (bond1.getAtom1().getNumber() != bond2.getAtom1().getNumber()) { - System.out.println( + Logger.error( "Atom " + i + ", bond " + j + " atom1 number (" + bond1.getAtom1().getNumber() + "," + bond2.getAtom1().getNumber() + ")"); return false; } if (bond1.getAtom2().getNumber() != bond2.getAtom2().getNumber()) { - System.out.println( + Logger.error( "Atom " + i + ", bond " + j + " atom2 number (" + bond1.getAtom2().getNumber() + "," + bond2.getAtom2().getNumber() + ")"); @@ -1372,7 +1374,7 @@ } } if (atom1.getCharge() != atom2.getCharge()) { - System.out.println( + Logger.error( "Atom " + i + " charge (" + atom1.getCharge() + "," + atom2.getCharge() + ")"); @@ -1380,28 +1382,28 @@ } if (atom1.getChiralClass() == null) { if (atom2.getChiralClass() != null) { - System.out.println( + Logger.error( "Atom " + i + " chiral class (" + atom1.getChiralClass() + "," + atom2.getChiralClass() + ")"); return false; } } else if (!atom1.getChiralClass().equals(atom2.getChiralClass())) { - System.out.println( + Logger.error( "Atom " + i + " chiral class (" + atom1.getChiralClass() + "," + atom2.getChiralClass() + ")"); return false; } if (atom1.getChiralOrder() != atom2.getChiralOrder()) { - System.out.println( + Logger.error( "Atom " + i + " chiral order (" + atom1.getChiralOrder() + "," + atom2.getChiralOrder() + ")"); return false; } if (!atom1.getSymbol().equals(atom2.getSymbol())) { - System.out.println( + Logger.error( "Atom " + i + " symbol (" + atom1.getSymbol() + "," + atom2.getSymbol() + ")"); Modified: trunk/Jmol/test/org/jmol/util/TestInt2ObjHash.java =================================================================== --- trunk/Jmol/test/org/jmol/util/TestInt2ObjHash.java 2006-09-30 10:42:45 UTC (rev 5776) +++ trunk/Jmol/test/org/jmol/util/TestInt2ObjHash.java 2006-09-30 11:17:31 UTC (rev 5777) @@ -75,15 +75,16 @@ } void dumpHash(Int2ObjHash h) { - System.out.println("dumping hash:" + h); - System.out.println("h.entryCount=" + h.entryCount); + Logger.info("dumping hash:" + h); + Logger.info("h.entryCount=" + h.entryCount); Int2ObjHash.Entry[] entries = h.entries; for (int i = 0; i < entries.length; ++i) { - System.out.print("" + i + ": "); + StringBuffer log = new StringBuffer(); + log.append(i).append(": "); for (Int2ObjHash.Entry e = entries[i]; e != null; e = e.next) { - System.out.print("" + e.key + " "); + log.append(e.key).append(" "); } - System.out.println(""); + Logger.info(log.toString()); } } Modified: trunk/Jmol/test/org/jmol/util/TestIntInt2ObjHash.java =================================================================== --- trunk/Jmol/test/org/jmol/util/TestIntInt2ObjHash.java 2006-09-30 10:42:45 UTC (rev 5776) +++ trunk/Jmol/test/org/jmol/util/TestIntInt2ObjHash.java 2006-09-30 11:17:31 UTC (rev 5777) @@ -75,15 +75,16 @@ } void dumpHash(IntInt2ObjHash h) { - System.out.println("dumping hash:" + h); - System.out.println("h.entryCount=" + h.entryCount); + Logger.info("dumping hash:" + h); + Logger.info("h.entryCount=" + h.entryCount); IntInt2ObjHash.Entry[] entries = h.entries; for (int i = 0; i < entries.length; ++i) { - System.out.print("" + i + ": "); + StringBuffer log = new StringBuffer(); + log.append(i).append(": "); for (IntInt2ObjHash.Entry e = entries[i]; e != null; e = e.next) { - System.out.print("" + e.key1 + "," + e.key2 + " "); + log.append(e.key1).append(",").append(e.key2).append(" "); } - System.out.println(""); + Logger.info(log.toString()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-09 03:42:08
|
Revision: 5880 http://svn.sourceforge.net/jmol/?rev=5880&view=rev Author: hansonr Date: 2006-10-08 20:41:59 -0700 (Sun, 08 Oct 2006) Log Message: ----------- 10.9.73 as soon as possible, please. Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/jmol.bat trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-09 03:39:48 UTC (rev 5879) +++ trunk/Jmol/build.xml 2006-10-09 03:41:59 UTC (rev 5880) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.72" /> + <property name="version" value="10.9.73" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/jmol.bat =================================================================== --- trunk/Jmol/jmol.bat 2006-10-09 03:39:48 UTC (rev 5879) +++ trunk/Jmol/jmol.bat 2006-10-09 03:41:59 UTC (rev 5880) @@ -1,5 +1,7 @@ @echo off rem Set JMOL_HOME to the Jmol installation directory. rem -if "%JMOL_HOME%x"=="x" set JMOL_HOME="." +set JMOL_HOME=. +if "%JMOL_HOME%x"=="x" set JMOL_HOME=.\build +if "%JMOL_HOME%x"==".x" set JMOL_HOME=.\build java -Xmx512m -jar "%JMOL_HOME%\Jmol.jar" %1 %2 %3 %4 %5 %6 %7 %8 %9 Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-09 03:39:48 UTC (rev 5879) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-09 03:41:59 UTC (rev 5880) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.72"; //isosurface speed up for planar slices though molecular surface datasets; fix for nullpointer trap in isosurface; preliminary chem3d c3xml reader + public final static String version = "10.9.73"; //important bug fix for MO and isosurface public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-10 02:20:30
|
Revision: 5887 http://svn.sourceforge.net/jmol/?rev=5887&view=rev Author: hansonr Date: 2006-10-09 19:20:20 -0700 (Mon, 09 Oct 2006) Log Message: ----------- 10.9.74 Just simplified, reorganized popup menu and associated code. request comments Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-10 02:11:14 UTC (rev 5886) +++ trunk/Jmol/build.xml 2006-10-10 02:20:20 UTC (rev 5887) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.73" /> + <property name="version" value="10.9.74" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-10 02:11:14 UTC (rev 5886) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-10 02:20:20 UTC (rev 5887) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.73"; //important bug fix for MO and isosurface + public final static String version = "10.9.74"; //popup menu reorganization; very minor fix for not identifying certain nonstandard spacegroup names; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-12 03:39:51
|
Revision: 5920 http://svn.sourceforge.net/jmol/?rev=5920&view=rev Author: hansonr Date: 2006-10-11 20:39:42 -0700 (Wed, 11 Oct 2006) Log Message: ----------- make that 10.9.75 Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-12 03:35:10 UTC (rev 5919) +++ trunk/Jmol/build.xml 2006-10-12 03:39:42 UTC (rev 5920) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.74" /> + <property name="version" value="10.9.75" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-12 03:35:10 UTC (rev 5919) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-12 03:39:42 UTC (rev 5920) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.74"; //popup menu reorganization; very minor fix for not identifying certain nonstandard spacegroup names; + public final static String version = "10.9.75"; //better animation controls on menu, smoother animation than 10.9.74 public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2006-10-12 17:25:28
|
Revision: 5927 http://svn.sourceforge.net/jmol/?rev=5927&view=rev Author: nicove Date: 2006-10-12 10:25:19 -0700 (Thu, 12 Oct 2006) Log Message: ----------- 10.9.76 Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-12 17:14:42 UTC (rev 5926) +++ trunk/Jmol/build.xml 2006-10-12 17:25:19 UTC (rev 5927) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.75" /> + <property name="version" value="10.9.76" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-12 17:14:42 UTC (rev 5926) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-12 17:25:19 UTC (rev 5927) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.75"; //better animation controls on menu, smoother animation than 10.9.74 + public final static String version = "10.9.76"; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-13 22:34:26
|
Revision: 5942 http://svn.sourceforge.net/jmol/?rev=5942&view=rev Author: hansonr Date: 2006-10-13 15:34:11 -0700 (Fri, 13 Oct 2006) Log Message: ----------- 10.9.77 - dynamic language translation - translation protection for pages using message callback - optional Jmol.js jmolSetTranslation(T/F) [not in this bundle] adds set languageTranslation T/F - Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/applet/Jmol.java trunk/Jmol/src/org/jmol/i18n/GT.java trunk/Jmol/src/org/jmol/popup/JmolPopup.java trunk/Jmol/src/org/jmol/popup/PopupResourceBundle.java trunk/Jmol/src/org/jmol/viewer/JmolConstants.java trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-13 20:12:05 UTC (rev 5941) +++ trunk/Jmol/build.xml 2006-10-13 22:34:11 UTC (rev 5942) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.76" /> + <property name="version" value="10.9.77" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/applet/Jmol.java =================================================================== --- trunk/Jmol/src/org/jmol/applet/Jmol.java 2006-10-13 20:12:05 UTC (rev 5941) +++ trunk/Jmol/src/org/jmol/applet/Jmol.java 2006-10-13 22:34:11 UTC (rev 5942) @@ -319,8 +319,8 @@ if (!haveTranslateFlag) { doTranslate = false; Logger - .warn("Note -- language translation disabled due to the presence of the message callback function; " - + "to enable language translation, use jmolSetTranslation(true) prior to jmolApplet()"); + .warn("Note -- Presence of message callback will disable translation; " + + "unless you use jmolSetTranslation(true) prior to jmolApplet()"); } if (doTranslate) Logger Modified: trunk/Jmol/src/org/jmol/i18n/GT.java =================================================================== --- trunk/Jmol/src/org/jmol/i18n/GT.java 2006-10-13 20:12:05 UTC (rev 5941) +++ trunk/Jmol/src/org/jmol/i18n/GT.java 2006-10-13 22:34:11 UTC (rev 5942) @@ -126,45 +126,13 @@ public static void setDoTranslate(boolean TF) { doTranslate = (TF ? Boolean.TRUE : Boolean.FALSE); +// System.out.println("setDoTranslate " + doTranslate.booleanValue()); } public static boolean getDoTranslate() { return doTranslate.booleanValue(); } - public static String T(String string) { - return T(string, (Object[])null); - } - - public static String T(String string, String item) { - return T(string, new Object[] { item }); - } - - public static String T(String string, int item) { - return T(string, new Object[] { new Integer(item) }); - } - - public static String T(String string, Object[] objects) { - if (doTranslate.booleanValue()) - forceTranslate(true); - String str = (objects == null ? _(string) : _(string, objects)); - if (tempDoTranslate.booleanValue()) - forceTranslate(false); - return str; - } - - static Boolean tempDoTranslate = Boolean.TRUE; - private synchronized static void forceTranslate(boolean TF) { - if (TF) { - tempDoTranslate = (doTranslate.booleanValue() ? Boolean.TRUE - : Boolean.FALSE); - doTranslate = Boolean.FALSE; - } else { - doTranslate = (tempDoTranslate.booleanValue() ? Boolean.TRUE - : Boolean.FALSE); - } - } - public static String _(String string) { return getTextWrapper().getString(string); } @@ -182,7 +150,34 @@ return getTextWrapper().getString(string, objects); } + //forced translations + + public static String _(String string, boolean t) { + return _(string, (Object[])null, t); + } + + public static String _(String string, String item, boolean t) { + return _(string, new Object[] { item }); + } + + public static String _(String string, int item, boolean t) { + return _(string, new Object[] { new Integer(item) }); + } + + public static synchronized String _(String string, Object[] objects, boolean t) { + boolean wasTranslating; + if (!(wasTranslating = doTranslate.booleanValue())) + setDoTranslate(true); + String str = (objects == null ? _(string) : _(string, objects)); + if (!wasTranslating) + setDoTranslate(false); + return str; + } + private String getString(String string) { + System.out.println("translating " + string + " " + doTranslate.booleanValue()); + if (!doTranslate.booleanValue()) + return string; for (int bundle = 0; bundle < translationResourcesCount; bundle++) { try { String trans = translationResources[bundle].getString(string); @@ -199,6 +194,7 @@ private String getString(String string, Object[] objects) { String trans = null; + System.out.println("translating " + string + " " + doTranslate.booleanValue()); if (!doTranslate.booleanValue()) return MessageFormat.format(string, objects); for (int bundle = 0; bundle < translationResourcesCount; bundle++) { Modified: trunk/Jmol/src/org/jmol/popup/JmolPopup.java =================================================================== --- trunk/Jmol/src/org/jmol/popup/JmolPopup.java 2006-10-13 20:12:05 UTC (rev 5941) +++ trunk/Jmol/src/org/jmol/popup/JmolPopup.java 2006-10-13 22:34:11 UTC (rev 5942) @@ -146,7 +146,7 @@ void updateSelectMenu() { if (selectMenu == null) return; - setLabel(selectMenu, GT.T("Select ({0})", viewer.getSelectionCount())); + setLabel(selectMenu, GT._("Select ({0})", viewer.getSelectionCount(), true)); } void updateElementsComputedMenu(BitSet elementsPresentBitSet) { @@ -239,11 +239,11 @@ return; int modelCount = viewer.getModelCount(); enableMenu(FRAMESbyModelComputedMenu, (modelCount > 1)); - setLabel(FRAMESbyModelComputedMenu, (modelIndex < 0 ? GT.T("All {0} models", viewer.getModelCount()) : getModelLabel())); + setLabel(FRAMESbyModelComputedMenu, (modelIndex < 0 ? GT._("All {0} models", viewer.getModelCount(), true) : getModelLabel())); removeAll(FRAMESbyModelComputedMenu); if (modelCount < 2) return; - addCheckboxMenuItem(FRAMESbyModelComputedMenu, GT.T("all"), "frame 0 #", null, (modelIndex < 0)); + addCheckboxMenuItem(FRAMESbyModelComputedMenu, GT._("all", true), "frame 0 #", null, (modelIndex < 0)); for (int i = 0; i < modelCount; i++) { String script = "" + viewer.getModelNumber(i); String entryName = viewer.getModelName(i); @@ -262,11 +262,11 @@ return; String altlocs = viewer.getAltLocListInModel(modelIndex); int nAltLocs = altlocs.length(); - setLabel(CONFIGURATIONComputedMenu, GT.T("Configurations ({0})", nAltLocs)); + setLabel(CONFIGURATIONComputedMenu, GT._("Configurations ({0})", nAltLocs, true)); enableMenu(CONFIGURATIONComputedMenu, true); removeAll(CONFIGURATIONComputedMenu); String script = "hide none #CONFIG"; - addCheckboxMenuItem(CONFIGURATIONComputedMenu, GT.T("all"), script, null, + addCheckboxMenuItem(CONFIGURATIONComputedMenu, GT._("all", true), script, null, (updateMode == UPDATE_CONFIG && configurationSelected.equals(script))); for (int i = 0; i < nAltLocs; i++) { script = "configuration " + (i + 1) + "; hide not selected #CONFIG"; @@ -299,24 +299,24 @@ addMenuSubMenu(modelSetComputedMenu, CONFIGURATIONComputedMenu); } addMenuSeparator(modelSetComputedMenu); - addMenuItem(modelSetComputedMenu, GT.T("atoms: {0}", viewer - .getAtomCountInModel(modelIndex))); - addMenuItem(modelSetComputedMenu, GT.T("bonds: {0}", viewer - .getBondCountInModel(modelIndex))); + addMenuItem(modelSetComputedMenu, GT._("atoms: {0}", viewer + .getAtomCountInModel(modelIndex), true)); + addMenuItem(modelSetComputedMenu, GT._("bonds: {0}", viewer + .getBondCountInModel(modelIndex), true)); addMenuSeparator(modelSetComputedMenu); if (isPDB) { - addMenuItem(modelSetComputedMenu, GT.T("groups: {0}", viewer - .getGroupCountInModel(modelIndex))); - addMenuItem(modelSetComputedMenu, GT.T("chains: {0}", viewer - .getChainCountInModel(modelIndex))); - addMenuItem(modelSetComputedMenu, GT.T("polymers: {0}", viewer - .getPolymerCountInModel(modelIndex))); + addMenuItem(modelSetComputedMenu, GT._("groups: {0}", viewer + .getGroupCountInModel(modelIndex), true)); + addMenuItem(modelSetComputedMenu, GT._("chains: {0}", viewer + .getChainCountInModel(modelIndex), true)); + addMenuItem(modelSetComputedMenu, GT._("polymers: {0}", viewer + .getPolymerCountInModel(modelIndex), true)); addMenuSeparator(modelSetComputedMenu); } if (isApplet && viewer.showModelSetDownload() && !viewer.getBooleanProperty("hideNameInPopup")) { - addMenuItem(modelSetComputedMenu, GT.T("View {0}", viewer - .getModelSetFileName()), viewer.getModelSetPathName(), null); + addMenuItem(modelSetComputedMenu, GT._("View {0}", viewer + .getModelSetFileName(), true), viewer.getModelSetPathName(), null); } } @@ -338,7 +338,7 @@ } String getModelLabel() { - return GT.T("model {0}",(modelIndex + 1) + "/" + viewer.getModelCount()); + return GT._("model {0}",(modelIndex + 1) + "/" + viewer.getModelCount(), true); } private void updateAboutSubmenu() { @@ -353,25 +353,25 @@ addMenuItem(aboutComputedMenu, viewer.getJavaVendor()); addMenuItem(aboutComputedMenu, viewer.getJavaVersion()); addMenuSeparator(aboutComputedMenu); - addMenuItem(aboutComputedMenu, GT.T("Java memory usage")); + addMenuItem(aboutComputedMenu, GT._("Java memory usage", true)); Runtime runtime = Runtime.getRuntime(); runtime.gc(); long mbTotal = convertToMegabytes(runtime.totalMemory()); long mbFree = convertToMegabytes(runtime.freeMemory()); long mbMax = convertToMegabytes(maxMemoryForNewerJvm()); - addMenuItem(aboutComputedMenu, GT.T("{0} MB total", new Object[] { new Long(mbTotal) })); - addMenuItem(aboutComputedMenu, GT.T("{0} MB free", new Object[] { new Long(mbFree) })); + addMenuItem(aboutComputedMenu, GT._("{0} MB total", new Object[] { new Long(mbTotal) }, true)); + addMenuItem(aboutComputedMenu, GT._("{0} MB free", new Object[] { new Long(mbFree) }, true)); if (mbMax > 0) - addMenuItem(aboutComputedMenu, GT.T("{0} MB maximum", new Object[] { new Long(mbMax) })); + addMenuItem(aboutComputedMenu, GT._("{0} MB maximum", new Object[] { new Long(mbMax) }, true)); else - addMenuItem(aboutComputedMenu, GT.T("unknown maximum")); + addMenuItem(aboutComputedMenu, GT._("unknown maximum", true)); int availableProcessors = availableProcessorsForNewerJvm(); if (availableProcessors > 0) addMenuItem(aboutComputedMenu, (availableProcessors == 1) ? - GT.T("1 processor") : - GT.T("{0} processors", availableProcessors)); + GT._("1 processor", true) : + GT._("{0} processors", availableProcessors, true)); else - addMenuItem(aboutComputedMenu, GT.T("unknown processor count")); + addMenuItem(aboutComputedMenu, GT._("unknown processor count", true)); } private long convertToMegabytes(long num) { Modified: trunk/Jmol/src/org/jmol/popup/PopupResourceBundle.java =================================================================== --- trunk/Jmol/src/org/jmol/popup/PopupResourceBundle.java 2006-10-13 20:12:05 UTC (rev 5941) +++ trunk/Jmol/src/org/jmol/popup/PopupResourceBundle.java 2006-10-13 22:34:11 UTC (rev 5942) @@ -453,226 +453,226 @@ { "translatingUrl", "http://wiki.jmol.org/index.php/Internationalisation" }, }; private static final String[][] wordContents = { - { "modelSetComputedMenu", GT.T("No atoms loaded") }, - { "CONFIGURATIONComputedMenu", GT.T("Configurations") }, - { "hiddenModelSetName", GT.T("Model information") }, + { "modelSetComputedMenu", GT._("No atoms loaded", true) }, + { "CONFIGURATIONComputedMenu", GT._("Configurations", true) }, + { "hiddenModelSetName", GT._("Model information", true) }, - { "selectMenu", GT.T("Select") }, - { "elementsComputedMenu", GT.T("Element") }, - { "selectAll", GT.T("All") }, - { "selectNone", GT.T("None") }, - { "hideNotSelected;hide(none)Checkbox", GT.T("Display Selected Only") }, - { "invertSelection", GT.T("Invert Selection") }, + { "selectMenu", GT._("Select", true) }, + { "elementsComputedMenu", GT._("Element", true) }, + { "selectAll", GT._("All", true) }, + { "selectNone", GT._("None", true) }, + { "hideNotSelected;hide(none)Checkbox", GT._("Display Selected Only", true) }, + { "invertSelection", GT._("Invert Selection", true) }, - { "PDBproteinMenu", GT.T("Protein") }, - { "allProtein", GT.T("All") }, - { "proteinBackbone", GT.T("Backbone") }, - { "proteinSideChains", GT.T("Side Chains") }, - { "polar", GT.T("Polar Residues") }, - { "nonpolar", GT.T("Nonpolar Residues") }, - { "positiveCharge", GT.T("Basic Residues (+)") }, - { "negativeCharge", GT.T("Acidic Residues (-)") }, - { "noCharge", GT.T("Uncharged Residues") }, - { "aaresiduesComputedMenu", GT.T("By Residue Name") }, - { "heteroComputedMenu", GT.T("By HETATM") }, - { "PDBnucleicMenu", GT.T("Nucleic") }, - { "allNucleic", GT.T("All") }, - { "DNA", GT.T("DNA") }, - { "RNA", GT.T("RNA") }, - { "nucleicBackbone", GT.T("Backbone") }, - { "nucleicBases", GT.T("Bases") }, - { "atPairs", GT.T("AT pairs") }, - { "gcPairs", GT.T("GC pairs") }, - { "auPairs", GT.T("AU pairs") }, + { "PDBproteinMenu", GT._("Protein", true) }, + { "allProtein", GT._("All", true) }, + { "proteinBackbone", GT._("Backbone", true) }, + { "proteinSideChains", GT._("Side Chains", true) }, + { "polar", GT._("Polar Residues", true) }, + { "nonpolar", GT._("Nonpolar Residues", true) }, + { "positiveCharge", GT._("Basic Residues (+)", true) }, + { "negativeCharge", GT._("Acidic Residues (-)", true) }, + { "noCharge", GT._("Uncharged Residues", true) }, + { "aaresiduesComputedMenu", GT._("By Residue Name", true) }, + { "heteroComputedMenu", GT._("By HETATM", true) }, + { "PDBnucleicMenu", GT._("Nucleic", true) }, + { "allNucleic", GT._("All", true) }, + { "DNA", GT._("DNA", true) }, + { "RNA", GT._("RNA", true) }, + { "nucleicBackbone", GT._("Backbone", true) }, + { "nucleicBases", GT._("Bases", true) }, + { "atPairs", GT._("AT pairs", true) }, + { "gcPairs", GT._("GC pairs", true) }, + { "auPairs", GT._("AU pairs", true) }, { "A", "A" }, { "C", "C" }, { "G", "G" }, { "T", "T" }, { "U", "U" }, - { "PDBheteroMenu", GT.T("Hetero") }, - { "allHetero", GT.T("All PDB \"HETATM\"") }, - { "Solvent", GT.T("All Solvent") }, - { "Water", GT.T("All Water") }, + { "PDBheteroMenu", GT._("Hetero", true) }, + { "allHetero", GT._("All PDB \"HETATM\"", true) }, + { "Solvent", GT._("All Solvent", true) }, + { "Water", GT._("All Water", true) }, { "nonWaterSolvent", - GT.T("Nonaqueous Solvent") + " (solvent and not water)" }, - { "exceptWater", GT.T("Nonaqueous HETATM") + " (hetero and not water)" }, - { "Ligand", GT.T("Ligand") + " (hetero and not solvent)" }, - { "PDBcarbohydrate", GT.T("Carbohydrate") }, - { "PDBnoneOfTheAbove", GT.T("None of the above") }, + GT._("Nonaqueous Solvent") + " (solvent and not water)" }, + { "exceptWater", GT._("Nonaqueous HETATM") + " (hetero and not water)" }, + { "Ligand", GT._("Ligand") + " (hetero and not solvent)" }, + { "PDBcarbohydrate", GT._("Carbohydrate", true) }, + { "PDBnoneOfTheAbove", GT._("None of the above", true) }, - { "FRAMESbyModelComputedMenu", GT.T("Model/Frame") }, + { "FRAMESbyModelComputedMenu", GT._("Model/Frame", true) }, - { "renderMenu", GT.T("Style") }, - { "renderSchemeMenu", GT.T("Scheme") }, - { "renderCpkSpacefill", GT.T("CPK Spacefill") }, - { "renderBallAndStick", GT.T("Ball and Stick") }, - { "renderSticks", GT.T("Sticks") }, - { "renderWireframe", GT.T("Wireframe") }, - { "renderBackbone", GT.T("Backbone") }, + { "renderMenu", GT._("Style", true) }, + { "renderSchemeMenu", GT._("Scheme", true) }, + { "renderCpkSpacefill", GT._("CPK Spacefill", true) }, + { "renderBallAndStick", GT._("Ball and Stick", true) }, + { "renderSticks", GT._("Sticks", true) }, + { "renderWireframe", GT._("Wireframe", true) }, + { "renderBackbone", GT._("Backbone", true) }, - { "atomMenu", GT.T("Atoms") }, - { "atomNone", GT.T("Off") }, - { "atom15", GT.T("{0}% van der Waals", "15") }, - { "atom20", GT.T("{0}% van der Waals", "20") }, - { "atom25", GT.T("{0}% van der Waals", "25") }, - { "atom50", GT.T("{0}% van der Waals", "50") }, - { "atom75", GT.T("{0}% van der Waals", "75") }, - { "atom100", GT.T("{0}% van der Waals", "100") }, + { "atomMenu", GT._("Atoms", true) }, + { "atomNone", GT._("Off", true) }, + { "atom15", GT._("{0}% van der Waals", "15", true) }, + { "atom20", GT._("{0}% van der Waals", "20", true) }, + { "atom25", GT._("{0}% van der Waals", "25", true) }, + { "atom50", GT._("{0}% van der Waals", "50", true) }, + { "atom75", GT._("{0}% van der Waals", "75", true) }, + { "atom100", GT._("{0}% van der Waals", "100", true) }, - { "bondMenu", GT.T("Bonds") }, - { "bondNone", GT.T("Off") }, - { "bondWireframe", GT.T("On") }, - { "bond100", GT.T("{0} \u00C5", "0.10") }, - { "bond150", GT.T("{0} \u00C5", "0.15") }, - { "bond200", GT.T("{0} \u00C5", "0.20") }, - { "bond250", GT.T("{0} \u00C5", "0.25") }, - { "bond300", GT.T("{0} \u00C5", "0.30") }, + { "bondMenu", GT._("Bonds", true) }, + { "bondNone", GT._("Off", true) }, + { "bondWireframe", GT._("On", true) }, + { "bond100", GT._("{0} \u00C5", "0.10", true) }, + { "bond150", GT._("{0} \u00C5", "0.15", true) }, + { "bond200", GT._("{0} \u00C5", "0.20", true) }, + { "bond250", GT._("{0} \u00C5", "0.25", true) }, + { "bond300", GT._("{0} \u00C5", "0.30", true) }, - { "hbondMenu", GT.T("Hydrogen Bonds") }, - { "hbondNone", GT.T("Off") }, - { "PDBhbondCalc", GT.T("Calculate") }, - { "hbondWireframe", GT.T("On") }, - { "PDBhbondSidechain", GT.T("Set H-Bonds Side Chain") }, - { "PDBhbondBackbone", GT.T("Set H-Bonds Backbone") }, - { "hbond100", GT.T("{0} \u00C5", "0.10") }, - { "hbond150", GT.T("{0} \u00C5", "0.15") }, - { "hbond200", GT.T("{0} \u00C5", "0.20") }, - { "hbond250", GT.T("{0} \u00C5", "0.25") }, - { "hbond300", GT.T("{0} \u00C5", "0.30") }, + { "hbondMenu", GT._("Hydrogen Bonds", true) }, + { "hbondNone", GT._("Off", true) }, + { "PDBhbondCalc", GT._("Calculate", true) }, + { "hbondWireframe", GT._("On", true) }, + { "PDBhbondSidechain", GT._("Set H-Bonds Side Chain", true) }, + { "PDBhbondBackbone", GT._("Set H-Bonds Backbone") }, + { "hbond100", GT._("{0} \u00C5", "0.10", true) }, + { "hbond150", GT._("{0} \u00C5", "0.15", true) }, + { "hbond200", GT._("{0} \u00C5", "0.20", true) }, + { "hbond250", GT._("{0} \u00C5", "0.25", true) }, + { "hbond300", GT._("{0} \u00C5", "0.30", true) }, - { "ssbondMenu", GT.T("Disulfide Bonds") }, - { "ssbondNone", GT.T("Off") }, - { "ssbondWireframe", GT.T("On") }, - { "PDBssbondSidechain", GT.T("Set SS-Bonds Side Chain") }, - { "PDBssbondBackbone", GT.T("Set SS-Bonds Backbone") }, - { "ssbond100", GT.T("{0} \u00C5", "0.10") }, - { "ssbond150", GT.T("{0} \u00C5", "0.15") }, - { "ssbond200", GT.T("{0} \u00C5", "0.20") }, - { "ssbond250", GT.T("{0} \u00C5", "0.25") }, - { "ssbond300", GT.T("{0} \u00C5", "0.30") }, + { "ssbondMenu", GT._("Disulfide Bonds", true) }, + { "ssbondNone", GT._("Off", true) }, + { "ssbondWireframe", GT._("On", true) }, + { "PDBssbondSidechain", GT._("Set SS-Bonds Side Chain", true) }, + { "PDBssbondBackbone", GT._("Set SS-Bonds Backbone", true) }, + { "ssbond100", GT._("{0} \u00C5", "0.10", true) }, + { "ssbond150", GT._("{0} \u00C5", "0.15", true) }, + { "ssbond200", GT._("{0} \u00C5", "0.20", true) }, + { "ssbond250", GT._("{0} \u00C5", "0.25", true) }, + { "ssbond300", GT._("{0} \u00C5", "0.30", true) }, - { "PDBstructureMenu", GT.T("Structures") }, - { "structureNone", GT.T("Off") }, - { "backbone", GT.T("Backbone") }, - { "cartoon", GT.T("Cartoon") }, - { "cartoonRockets", GT.T("Cartoon Rockets") }, - { "ribbons", GT.T("Ribbons") }, - { "rockets", GT.T("Rockets") }, - { "strands", GT.T("Strands") }, - { "trace", GT.T("Trace") }, + { "PDBstructureMenu", GT._("Structures", true) }, + { "structureNone", GT._("Off", true) }, + { "backbone", GT._("Backbone", true) }, + { "cartoon", GT._("Cartoon", true) }, + { "cartoonRockets", GT._("Cartoon Rockets", true) }, + { "ribbons", GT._("Ribbons", true) }, + { "rockets", GT._("Rockets", true) }, + { "strands", GT._("Strands", true) }, + { "trace", GT._("Trace", true) }, - { "VIBRATIONMenu", GT.T("Vibration") }, - { "vibrationOff", GT.T("Off") }, - { "vibrationOn", GT.T("On") }, - { "vectorMenu", GT.T("Vectors") }, - { "vectorOff", GT.T("Off") }, - { "vectorOn", GT.T("On") }, - { "vector3", GT.T("{0} pixels", "3") }, - { "vector005", GT.T("{0} \u00C5", "0.05") }, - { "vector01", GT.T("{0} \u00C5", "0.10") }, - { "vectorScale02", GT.T("Scale {0}", "0.2") }, - { "vectorScale05", GT.T("Scale {0}", "0.5") }, - { "vectorScale1", GT.T("Scale {0}", "1") }, - { "vectorScale2", GT.T("Scale {0}", "2") }, - { "vectorScale5", GT.T("Scale {0}", "5") }, + { "VIBRATIONMenu", GT._("Vibration", true) }, + { "vibrationOff", GT._("Off", true) }, + { "vibrationOn", GT._("On", true) }, + { "vectorMenu", GT._("Vectors", true) }, + { "vectorOff", GT._("Off", true) }, + { "vectorOn", GT._("On", true) }, + { "vector3", GT._("{0} pixels", "3", true) }, + { "vector005", GT._("{0} \u00C5", "0.05", true) }, + { "vector01", GT._("{0} \u00C5", "0.10", true) }, + { "vectorScale02", GT._("Scale {0}", "0.2", true) }, + { "vectorScale05", GT._("Scale {0}", "0.5", true) }, + { "vectorScale1", GT._("Scale {0}", "1", true) }, + { "vectorScale2", GT._("Scale {0}", "2", true) }, + { "vectorScale5", GT._("Scale {0}", "5", true) }, - { "stereoMenu", GT.T("Stereographic") }, - { "stereoNone", GT.T("None") }, - { "stereoRedCyan", GT.T("Red+Cyan glasses") }, - { "stereoRedBlue", GT.T("Red+Blue glasses") }, - { "stereoRedGreen", GT.T("Red+Green glasses") }, - { "stereoCrossEyed", GT.T("Cross-eyed viewing") }, - { "stereoWallEyed", GT.T("Wall-eyed viewing") }, + { "stereoMenu", GT._("Stereographic", true) }, + { "stereoNone", GT._("None", true) }, + { "stereoRedCyan", GT._("Red+Cyan glasses", true) }, + { "stereoRedBlue", GT._("Red+Blue glasses", true) }, + { "stereoRedGreen", GT._("Red+Green glasses", true) }, + { "stereoCrossEyed", GT._("Cross-eyed viewing", true) }, + { "stereoWallEyed", GT._("Wall-eyed viewing", true) }, - { "labelMenu", GT.T("Labels") }, + { "labelMenu", GT._("Labels", true) }, - { "labelNone", GT.T("None") }, - { "labelSymbol", GT.T("With Element Symbol") }, - { "labelName", GT.T("With Atom Name") }, - { "labelNumber", GT.T("With Atom Number") }, + { "labelNone", GT._("None", true) }, + { "labelSymbol", GT._("With Element Symbol", true) }, + { "labelName", GT._("With Atom Name", true) }, + { "labelNumber", GT._("With Atom Number", true) }, - { "labelPositionMenu", GT.T("Position Label on Atom") }, - { "labelCentered", GT.T("Centered") }, - { "labelUpperRight", GT.T("Upper Right") }, - { "labelLowerRight", GT.T("Lower Right") }, - { "labelUpperLeft", GT.T("Upper Left") }, - { "labelLowerLeft", GT.T("Lower Left") }, + { "labelPositionMenu", GT._("Position Label on Atom", true) }, + { "labelCentered", GT._("Centered", true) }, + { "labelUpperRight", GT._("Upper Right", true) }, + { "labelLowerRight", GT._("Lower Right", true) }, + { "labelUpperLeft", GT._("Upper Left", true) }, + { "labelLowerLeft", GT._("Lower Left", true) }, - { "colorMenu", GT.T("Color") }, - { "colorAtomsMenu", GT.T("Atoms") }, + { "colorMenu", GT._("Color", true) }, + { "colorAtomsMenu", GT._("Atoms", true) }, - { "SchemeMenu", GT.T("By Scheme") }, - { "cpk", GT.T("Element (CPK)") }, - { "altloc", GT.T("Alternative Location") }, - { "molecule", GT.T("Molecule") }, - { "formalcharge", GT.T("Formal Charge") }, - { "partialCHARGE", GT.T("Partial Charge") }, + { "SchemeMenu", GT._("By Scheme", true) }, + { "cpk", GT._("Element (CPK)", true) }, + { "altloc", GT._("Alternative Location", true) }, + { "molecule", GT._("Molecule", true) }, + { "formalcharge", GT._("Formal Charge", true) }, + { "partialCHARGE", GT._("Partial Charge", true) }, - { "amino#PDB", GT.T("Amino Acid") }, - { "structure#PDB", GT.T("Secondary Structure") }, - { "chain#PDB", GT.T("Chain") }, + { "amino#PDB", GT._("Amino Acid", true) }, + { "structure#PDB", GT._("Secondary Structure", true) }, + { "chain#PDB", GT._("Chain", true) }, - { "none", GT.T("Inherit") }, - { "black", GT.T("Black") }, - { "white", GT.T("White") }, - { "cyan", GT.T("Cyan") }, + { "none", GT._("Inherit", true) }, + { "black", GT._("Black", true) }, + { "white", GT._("White", true) }, + { "cyan", GT._("Cyan", true) }, - { "red", GT.T("Red") }, - { "orange", GT.T("Orange") }, - { "yellow", GT.T("Yellow") }, - { "green", GT.T("Green") }, - { "blue", GT.T("Blue") }, - { "indigo", GT.T("Indigo") }, - { "violet", GT.T("Violet") }, + { "red", GT._("Red", true) }, + { "orange", GT._("Orange", true) }, + { "yellow", GT._("Yellow", true) }, + { "green", GT._("Green", true) }, + { "blue", GT._("Blue", true) }, + { "indigo", GT._("Indigo", true) }, + { "violet", GT._("Violet", true) }, - { "salmon", GT.T("Salmon") }, - { "olive", GT.T("Olive") }, - { "maroon", GT.T("Maroon") }, - { "gray", GT.T("Gray") }, - { "slateblue", GT.T("Slate Blue") }, - { "gold", GT.T("Gold") }, - { "orchid", GT.T("Orchid") }, + { "salmon", GT._("Salmon", true) }, + { "olive", GT._("Olive", true) }, + { "maroon", GT._("Maroon", true) }, + { "gray", GT._("Gray", true) }, + { "slateblue", GT._("Slate Blue", true) }, + { "gold", GT._("Gold", true) }, + { "orchid", GT._("Orchid", true) }, - { "opaque", GT.T("Make Opaque") }, - { "translucent", GT.T("Make Translucent") }, + { "opaque", GT._("Make Opaque", true) }, + { "translucent", GT._("Make Translucent", true) }, - { "colorBondsMenu", GT.T("Bonds") }, - { "colorHbondsMenu", GT.T("Hydrogen Bonds") }, - { "colorSSbondsMenu", GT.T("Disulfide Bonds") }, - { "colorPDBstructuresMenu", GT.T("Structure") }, - { "colorBackboneMenu", GT.T("Backbone") }, - { "colorTraceMenu", GT.T("Trace") }, - { "colorCartoonsMenu", GT.T("Cartoon") }, - { "colorRibbonsMenu", GT.T("Ribbons") }, - { "colorRocketsMenu", GT.T("Rockets") }, - { "colorStrandsMenu", GT.T("Strands") }, - { "colorLabelsMenu", GT.T("Labels") }, - { "colorBackgroundMenu", GT.T("Background") }, - { "colorIsoSurfaceMenu", GT.T("Surface") }, - { "colorVectorsMenu", GT.T("Vectors") }, - { "colorAxesMenu", GT.T("Axes") }, - { "colorBoundBoxMenu", GT.T("Boundbox") }, - { "colorUnitCellMenu", GT.T("Unitcell") }, + { "colorBondsMenu", GT._("Bonds", true) }, + { "colorHbondsMenu", GT._("Hydrogen Bonds", true) }, + { "colorSSbondsMenu", GT._("Disulfide Bonds", true) }, + { "colorPDBstructuresMenu", GT._("Structure", true) }, + { "colorBackboneMenu", GT._("Backbone", true) }, + { "colorTraceMenu", GT._("Trace", true) }, + { "colorCartoonsMenu", GT._("Cartoon", true) }, + { "colorRibbonsMenu", GT._("Ribbons", true) }, + { "colorRocketsMenu", GT._("Rockets", true) }, + { "colorStrandsMenu", GT._("Strands", true) }, + { "colorLabelsMenu", GT._("Labels", true) }, + { "colorBackgroundMenu", GT._("Background", true) }, + { "colorIsoSurfaceMenu", GT._("Surface", true) }, + { "colorVectorsMenu", GT._("Vectors", true) }, + { "colorAxesMenu", GT._("Axes", true) }, + { "colorBoundBoxMenu", GT._("Boundbox", true) }, + { "colorUnitCellMenu", GT._("Unitcell", true) }, - { "zoomMenu", GT.T("Zoom") }, + { "zoomMenu", GT._("Zoom", true) }, { "zoom50", "50%" }, { "zoom100", "100%" }, { "zoom150", "150%" }, { "zoom200", "200%" }, { "zoom400", "400%" }, { "zoom800", "800%" }, - { "zoomIn", GT.T("Zoom In") }, - { "zoomOut", GT.T("Zoom Out") }, + { "zoomIn", GT._("Zoom In", true) }, + { "zoomOut", GT._("Zoom Out", true) }, - { "spinMenu", GT.T("Spin") }, - { "spinOn", GT.T("On") }, - { "spinOff", GT.T("Off") }, + { "spinMenu", GT._("Spin", true) }, + { "spinOn", GT._("On", true) }, + { "spinOff", GT._("Off", true) }, - { "setSpinXMenu", GT.T("Set X Rate") }, - { "setSpinYMenu", GT.T("Set Y Rate") }, - { "setSpinZMenu", GT.T("Set Z Rate") }, - { "setSpinFpsMenu", GT.T("Set FPS") }, + { "setSpinXMenu", GT._("Set X Rate", true) }, + { "setSpinYMenu", GT._("Set Y Rate", true) }, + { "setSpinZMenu", GT._("Set Z Rate", true) }, + { "setSpinFpsMenu", GT._("Set FPS", true) }, { "s0", "0" }, { "s5", "5" }, @@ -682,118 +682,118 @@ { "s40", "40" }, { "s50", "50" }, - { "FRAMESanimateMenu", GT.T("Animate") }, - { "animModeMenu", GT.T("Animation Mode") }, - { "onceThrough", GT.T("Play Once") }, - { "palindrome", GT.T("Palindrome") }, - { "loop", GT.T("Loop") }, + { "FRAMESanimateMenu", GT._("Animate", true) }, + { "animModeMenu", GT._("Animation Mode", true) }, + { "onceThrough", GT._("Play Once", true) }, + { "palindrome", GT._("Palindrome", true) }, + { "loop", GT._("Loop", true) }, - { "play", GT.T("Play") }, - { "pause", GT.T("Pause") }, - { "resume", GT.T("Resume") }, - { "stop", GT.T("Stop") }, - { "nextframe", GT.T("Next Frame") }, - { "prevframe", GT.T("Previous Frame") }, - { "rewind", GT.T("Rewind") }, + { "play", GT._("Play", true) }, + { "pause", GT._("Pause", true) }, + { "resume", GT._("Resume", true) }, + { "stop", GT._("Stop", true) }, + { "nextframe", GT._("Next Frame", true) }, + { "prevframe", GT._("Previous Frame", true) }, + { "rewind", GT._("Rewind", true) }, - { "playrev", GT.T("Reverse") }, - { "animOn", GT.T("Restart") }, + { "playrev", GT._("Reverse", true) }, + { "animOn", GT._("Restart", true) }, - { "animFpsMenu", GT.T("Set FPS") }, + { "animFpsMenu", GT._("Set FPS", true) }, { "animfps5", "5" }, { "animfps10", "10" }, { "animfps20", "20" }, { "animfps30", "30" }, { "animfps50", "50" }, - { "measureMenu", GT.T("Measurement") }, - { "measureOff", GT.T("Double-Click begins and ends all measurements") }, - { "measureDistance", GT.T("Click for distance measurement") }, - { "measureAngle", GT.T("Click for angle measurement") }, - { "measureTorsion", GT.T("Click for torsion (dihedral) measurement") }, - { "measureDelete", GT.T("Delete measurements") }, - { "measureList", GT.T("List measurements") }, - { "distanceNanometers", GT.T("Distance units nanometers") }, - { "distanceAngstroms", GT.T("Distance units Angstroms") }, - { "distancePicometers", GT.T("Distance units picometers") }, + { "measureMenu", GT._("Measurement", true) }, + { "measureOff", GT._("Double-Click begins and ends all measurements", true) }, + { "measureDistance", GT._("Click for distance measurement", true) }, + { "measureAngle", GT._("Click for angle measurement", true) }, + { "measureTorsion", GT._("Click for torsion (dihedral) measurement", true) }, + { "measureDelete", GT._("Delete measurements", true) }, + { "measureList", GT._("List measurements", true) }, + { "distanceNanometers", GT._("Distance units nanometers", true) }, + { "distanceAngstroms", GT._("Distance units Angstroms", true) }, + { "distancePicometers", GT._("Distance units picometers", true) }, - { "pickingMenu", GT.T("Set picking") }, - { "pickOff", GT.T("Off") }, - { "pickCenter", GT.T("Center") }, - // { "pickDraw" , GT.T("moves arrows") }, - { "pickLabel", GT.T("Label") }, - { "pickAtom", GT.T("Select atom") }, - { "pickChain", GT.T("Select chain") }, - { "pickElement", GT.T("Select element") }, - { "pickGroup", GT.T("Select group") }, - { "pickMolecule", GT.T("Select molecule") }, - { "pickSite", GT.T("Select site") }, - { "pickSpin", GT.T("Spin") }, + { "pickingMenu", GT._("Set picking", true) }, + { "pickOff", GT._("Off", true) }, + { "pickCenter", GT._("Center", true) }, + // { "pickDraw" , GT._("moves arrows", true) }, + { "pickLabel", GT._("Label", true) }, + { "pickAtom", GT._("Select atom", true) }, + { "pickChain", GT._("Select chain", true) }, + { "pickElement", GT._("Select element", true) }, + { "pickGroup", GT._("Select group", true) }, + { "pickMolecule", GT._("Select molecule", true) }, + { "pickSite", GT._("Select site", true) }, + { "pickSpin", GT._("Spin", true) }, - { "showMenu", GT.T("Show") }, - { "showConsole", GT.T("Console") }, - { "showFile", GT.T("File Contents") }, - { "showFileHeader", GT.T("File Header") }, - { "showHistory", GT.T("History") }, - { "showIsosurface", GT.T("Isosurface JVXL data") }, - { "showMeasure", GT.T("Measure") }, - { "showMo", GT.T("Molecular orbital JVXL data") }, - { "showModel", GT.T("Model") }, - { "showOrient", GT.T("Orientation") }, - { "showSpacegroup", GT.T("Space group") }, - { "SYMMETRYshowSymmetry", GT.T("Symmetry") }, - { "showUnitCell", GT.T("Unit cell") }, - { "extractMOL", GT.T("Extract MOL data") }, + { "showMenu", GT._("Show", true) }, + { "showConsole", GT._("Console", true) }, + { "showFile", GT._("File Contents", true) }, + { "showFileHeader", GT._("File Header", true) }, + { "showHistory", GT._("History", true) }, + { "showIsosurface", GT._("Isosurface JVXL data", true) }, + { "showMeasure", GT._("Measure", true) }, + { "showMo", GT._("Molecular orbital JVXL data", true) }, + { "showModel", GT._("Model", true) }, + { "showOrient", GT._("Orientation", true) }, + { "showSpacegroup", GT._("Space group", true) }, + { "SYMMETRYshowSymmetry", GT._("Symmetry", true) }, + { "showUnitCell", GT._("Unit cell", true) }, + { "extractMOL", GT._("Extract MOL data", true) }, - { "surfaceMenu", GT.T("Surfaces") }, - { "surfDots", GT.T("Dot Surface") }, - { "surfVDW", GT.T("van der Waals Surface") }, - { "surfMolecular", GT.T("Molecular Surface") }, - { "surfSolvent14", GT.T("Solvent Surface ({0}-Angstrom probe)", "1.4") }, + { "surfaceMenu", GT._("Surfaces", true) }, + { "surfDots", GT._("Dot Surface", true) }, + { "surfVDW", GT._("van der Waals Surface", true) }, + { "surfMolecular", GT._("Molecular Surface", true) }, + { "surfSolvent14", GT._("Solvent Surface ({0}-Angstrom probe)", "1.4", true) }, { "surfSolventAccessible14", - GT.T("Solvent-Accessible Surface (VDW + {0} Angstrom)", "1.4") }, - { "CHARGEsurfMEP", GT.T("Molecular Electrostatic Potential") }, - { "surfMoComputedMenu", GT.T("Molecular Orbitals") }, - { "surfOpaque", GT.T("Make Opaque") }, - { "surfTranslucent", GT.T("Make Translucent") }, - { "surfOff", GT.T("Off") }, + GT._("Solvent-Accessible Surface (VDW + {0} Angstrom)", "1.4", true) }, + { "CHARGEsurfMEP", GT._("Molecular Electrostatic Potential", true) }, + { "surfMoComputedMenu", GT._("Molecular Orbitals", true) }, + { "surfOpaque", GT._("Make Opaque", true) }, + { "surfTranslucent", GT._("Make Translucent", true) }, + { "surfOff", GT._("Off", true) }, - { "SYMMETRYunitCellMenu", GT.T("Symmetry") }, - { "oneUnitCell", GT.T("Reload {0}", "{1 1 1}") }, - { "fourUnitCells", GT.T("Reload {0}", "{2 2 2}") }, - { "nineUnitCells", GT.T("Reload {0}", "{3 3 3}") }, - { "nineUnitCellsRestricted", GT.T("Reload {0}", "Polyhedra") }, + { "SYMMETRYunitCellMenu", GT._("Symmetry", true) }, + { "oneUnitCell", GT._("Reload {0}", "{1 1 1}", true) }, + { "fourUnitCells", GT._("Reload {0}", "{2 2 2}", true) }, + { "nineUnitCells", GT._("Reload {0}", "{3 3 3}", true) }, + { "nineUnitCellsRestricted", GT._("Reload {0}", "Polyhedra", true) }, - { "_AxesMenu", GT.T("Axes") }, { "_BoundBoxMenu", GT.T("Boundbox") }, - { "_UnitCellMenu", GT.T("Unitcell") }, + { "_AxesMenu", GT._("Axes", true) }, { "_BoundBoxMenu", GT._("Boundbox", true) }, + { "_UnitCellMenu", GT._("Unitcell", true) }, - { "off", GT.T("Hide") }, { "dotted", GT.T("Dotted") }, + { "off", GT._("Hide", true) }, { "dotted", GT._("Dotted", true) }, - { "byPixelMenu", GT.T("Pixel Width") }, { "1p", GT.T("{0} px", "1") }, - { "3p", GT.T("{0} px", "3") }, { "5p", GT.T("{0} px", "5") }, - { "10p", GT.T("{0} px", "10") }, + { "byPixelMenu", GT._("Pixel Width", true) }, { "1p", GT._("{0} px", "1", true) }, + { "3p", GT._("{0} px", "3", true) }, { "5p", GT._("{0} px", "5", true) }, + { "10p", GT._("{0} px", "10", true) }, - { "byAngstromMenu", GT.T("Angstrom Width") }, - { "10a", GT.T("{0} \u00C5", "0.10") }, - { "20a", GT.T("{0} \u00C5", "0.20") }, - { "25a", GT.T("{0} \u00C5", "0.25") }, - { "50a", GT.T("{0} \u00C5", "0.50") }, - { "100a", GT.T("{0} \u00C5", "1.0") }, + { "byAngstromMenu", GT._("Angstrom Width", true) }, + { "10a", GT._("{0} \u00C5", "0.10", true) }, + { "20a", GT._("{0} \u00C5", "0.20", true) }, + { "25a", GT._("{0} \u00C5", "0.25", true) }, + { "50a", GT._("{0} \u00C5", "0.50", true) }, + { "100a", GT._("{0} \u00C5", "1.0", true) }, - { "optionsMenu", GT.T("Compatibility") }, - { "showSelectionsCheckbox", GT.T("Selection Halos") }, - { "showHydrogensCheckbox", GT.T("Show Hydrogens") }, - { "showMeasurementsCheckbox", GT.T("Show Measurements") }, - { "perspectiveDepthCheckbox", GT.T("Perspective Depth") }, - { "rasmolChimeCompatibility", GT.T("RasMol/Chime Settings") }, - { "colorrasmolCheckbox", GT.T("RasMol Colors") }, - { "axesOrientationRasmolCheckbox", GT.T("Axes RasMol/Chime") }, - { "zeroBasedXyzRasmolCheckbox", GT.T("Zero-Based Xyz Rasmol") }, + { "optionsMenu", GT._("Compatibility", true) }, + { "showSelectionsCheckbox", GT._("Selection Halos", true) }, + { "showHydrogensCheckbox", GT._("Show Hydrogens", true) }, + { "showMeasurementsCheckbox", GT._("Show Measurements", true) }, + { "perspectiveDepthCheckbox", GT._("Perspective Depth", true) }, + { "rasmolChimeCompatibility", GT._("RasMol/Chime Settings", true) }, + { "colorrasmolCheckbox", GT._("RasMol Colors", true) }, + { "axesOrientationRasmolCheckbox", GT._("Axes RasMol/Chime", true) }, + { "zeroBasedXyzRasmolCheckbox", GT._("Zero-Based Xyz Rasmol", true) }, - { "aboutComputedMenu", GT.T("About Jmol") }, + { "aboutComputedMenu", GT._("About Jmol", true) }, { "jmolUrl", "http://www.jmol.org" }, - { "mouseManualUrl", GT.T("Mouse Manual") }, - { "translatingUrl", GT.T("Translations") }, }; + { "mouseManualUrl", GT._("Mouse Manual", true) }, + { "translatingUrl", GT._("Translations", true) }, }; // Initialize properties static { Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-13 20:12:05 UTC (rev 5941) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-13 22:34:11 UTC (rev 5942) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.76"; + public final static String version = "10.9.77"; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2006-10-13 20:12:05 UTC (rev 5941) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2006-10-13 22:34:11 UTC (rev 5942) @@ -2811,7 +2811,11 @@ public void setBooleanProperty(String key, boolean value) { //Eval while (true) { - if (key.equalsIgnoreCase("hideNotSelected")) { + if (key.equalsIgnoreCase("languageTranslation")) { + GT.setDoTranslate(value); + break; + } + if (key.equalsIgnoreCase("hideNotSelected")) { setHideNotSelected(value); break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-15 13:58:34
|
Revision: 5952 http://svn.sourceforge.net/jmol/?rev=5952&view=rev Author: hansonr Date: 2006-10-15 06:58:27 -0700 (Sun, 15 Oct 2006) Log Message: ----------- 10.9.78 -- improved popup menu/new frank menu --dynamically adds and disables PDB protein/nucleic submenus --SIMPLE click on frank pulls up most recent drill-down set. needs testing and comment Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-15 13:55:34 UTC (rev 5951) +++ trunk/Jmol/build.xml 2006-10-15 13:58:27 UTC (rev 5952) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.77" /> + <property name="version" value="10.9.78" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-15 13:55:34 UTC (rev 5951) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-15 13:58:27 UTC (rev 5952) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.77"; + public final static String version = "10.9.78"; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-15 22:38:21
|
Revision: 5958 http://svn.sourceforge.net/jmol/?rev=5958&view=rev Author: hansonr Date: 2006-10-15 15:38:15 -0700 (Sun, 15 Oct 2006) Log Message: ----------- 10.9.78 more popup menu adjustments; cif/pdb hetero name reading upgrade Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-15 22:34:01 UTC (rev 5957) +++ trunk/Jmol/build.xml 2006-10-15 22:38:15 UTC (rev 5958) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.78" /> + <property name="version" value="10.9.79" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-15 22:34:01 UTC (rev 5957) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-15 22:38:15 UTC (rev 5958) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.78"; + public final static String version = "10.9.79"; //full dynamic menu support public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-18 14:17:50
|
Revision: 5984 http://svn.sourceforge.net/jmol/?rev=5984&view=rev Author: hansonr Date: 2006-10-18 07:17:41 -0700 (Wed, 18 Oct 2006) Log Message: ----------- 10.9.80 Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-18 14:15:58 UTC (rev 5983) +++ trunk/Jmol/build.xml 2006-10-18 14:17:41 UTC (rev 5984) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.79" /> + <property name="version" value="10.9.80" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-18 14:15:58 UTC (rev 5983) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-18 14:17:41 UTC (rev 5984) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.79"; //full dynamic menu support + public final static String version = "10.9.80"; //zoomTo; moveTo; smooth centering; symmetry bug fix; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-22 01:40:25
|
Revision: 5994 http://svn.sourceforge.net/jmol/?rev=5994&view=rev Author: hansonr Date: 2006-10-21 18:40:18 -0700 (Sat, 21 Oct 2006) Log Message: ----------- 10.9.81 -- adds ADF reader -- adds CIF crystallographica support -- allows scientific notation for decimal numbers Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-22 01:38:16 UTC (rev 5993) +++ trunk/Jmol/build.xml 2006-10-22 01:40:18 UTC (rev 5994) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.80" /> + <property name="version" value="10.9.81" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-22 01:38:16 UTC (rev 5993) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-22 01:40:18 UTC (rev 5994) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.80"; //zoomTo; moveTo; smooth centering; symmetry bug fix; + public final static String version = "10.9.81"; //zoomTo; moveTo; smooth centering; symmetry bug fix; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-23 02:15:37
|
Revision: 6001 http://svn.sourceforge.net/jmol/?rev=6001&view=rev Author: hansonr Date: 2006-10-22 19:15:27 -0700 (Sun, 22 Oct 2006) Log Message: ----------- 10.9.82 critical update; replaces 10.9.81 don't ask. Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-23 01:58:32 UTC (rev 6000) +++ trunk/Jmol/build.xml 2006-10-23 02:15:27 UTC (rev 6001) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.81" /> + <property name="version" value="10.9.82" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-23 01:58:32 UTC (rev 6000) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-23 02:15:27 UTC (rev 6001) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.81"; //zoomTo; moveTo; smooth centering; symmetry bug fix; + public final static String version = "10.9.82"; //zoomTo; moveTo; smooth centering; symmetry bug fix; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-23 05:34:50
|
Revision: 6006 http://svn.sourceforge.net/jmol/?rev=6006&view=rev Author: hansonr Date: 2006-10-22 22:34:40 -0700 (Sun, 22 Oct 2006) Log Message: ----------- 10.9.83 -- general reader cleanup; V3000 multifile; Spartan compound document bug fix; nothing else notable Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-23 05:11:14 UTC (rev 6005) +++ trunk/Jmol/build.xml 2006-10-23 05:34:40 UTC (rev 6006) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.82" /> + <property name="version" value="10.9.83" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-23 05:11:14 UTC (rev 6005) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-23 05:34:40 UTC (rev 6006) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.82"; //zoomTo; moveTo; smooth centering; symmetry bug fix; + public final static String version = "10.9.83"; //zoomTo; moveTo; smooth centering; symmetry bug fix; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-25 14:13:06
|
Revision: 6020 http://svn.sourceforge.net/jmol/?rev=6020&view=rev Author: hansonr Date: 2006-10-25 07:13:00 -0700 (Wed, 25 Oct 2006) Log Message: ----------- 10.9.84 set labelPointerBackground set labelPointerBox set labelPointerNoBox polyhedra restrict fix Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-25 13:59:46 UTC (rev 6019) +++ trunk/Jmol/build.xml 2006-10-25 14:13:00 UTC (rev 6020) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.83" /> + <property name="version" value="10.9.84" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-25 13:59:46 UTC (rev 6019) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-25 14:13:00 UTC (rev 6020) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.83"; //zoomTo; moveTo; smooth centering; symmetry bug fix; + public final static String version = "10.9.84"; //set labelPointer business; minor bug fixes - polyhedra restrict; public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2006-10-25 21:36:31
|
Revision: 6023 http://svn.sourceforge.net/jmol/?rev=6023&view=rev Author: nicove Date: 2006-10-25 14:35:56 -0700 (Wed, 25 Oct 2006) Log Message: ----------- Update of docbook-xml Modified Paths: -------------- trunk/Jmol/build.xml Added Paths: ----------- trunk/Jmol/doc/docbook-xsl-1.71.1.tar.gz Removed Paths: ------------- trunk/Jmol/doc/docbook-xsl-1.71.0.tar.gz Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-25 21:13:29 UTC (rev 6022) +++ trunk/Jmol/build.xml 2006-10-25 21:35:56 UTC (rev 6023) @@ -30,7 +30,7 @@ <property name="javadoc.dir" value="build/javadoc" /> <property name="jmol.applet.build.dir" value="build" /> <property name="jmol.build.dir" value="build" /> - <property name="docbook-xsl" value="docbook-xsl-1.71.0" /> + <property name="docbook-xsl" value="docbook-xsl-1.71.1" /> <property name="docbook-xml" value="docbook-xml-4.4" /> <property name="vecmath.jar" value="vecmath1.2-1.14.jar" /> <property name="itext.jar" value="itext-1.4.5.jar" /> Deleted: trunk/Jmol/doc/docbook-xsl-1.71.0.tar.gz =================================================================== (Binary files differ) Added: trunk/Jmol/doc/docbook-xsl-1.71.1.tar.gz =================================================================== (Binary files differ) Property changes on: trunk/Jmol/doc/docbook-xsl-1.71.1.tar.gz ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-26 04:29:43
|
Revision: 6030 http://svn.sourceforge.net/jmol/?rev=6030&view=rev Author: hansonr Date: 2006-10-25 21:29:37 -0700 (Wed, 25 Oct 2006) Log Message: ----------- 10.9.85 -move command zoom fixed -"o" for unitcell axes -3D positionable echos Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-26 03:56:32 UTC (rev 6029) +++ trunk/Jmol/build.xml 2006-10-26 04:29:37 UTC (rev 6030) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.84" /> + <property name="version" value="10.9.85" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-26 03:56:32 UTC (rev 6029) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-26 04:29:37 UTC (rev 6030) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.84"; //set labelPointer business; minor bug fixes - polyhedra restrict; + public final static String version = "10.9.85"; //3D labels; 0 origin for unitcell; move command zoom fix public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-27 01:49:06
|
Revision: 6041 http://svn.sourceforge.net/jmol/?rev=6041&view=rev Author: hansonr Date: 2006-10-26 18:48:58 -0700 (Thu, 26 Oct 2006) Log Message: ----------- 10.9.86 see JmolConstants line for changes Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-27 01:42:55 UTC (rev 6040) +++ trunk/Jmol/build.xml 2006-10-27 01:48:58 UTC (rev 6041) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.85" /> + <property name="version" value="10.9.86" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-27 01:42:55 UTC (rev 6040) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-27 01:48:58 UTC (rev 6041) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.85"; //3D labels; 0 origin for unitcell; move command zoom fix + public final static String version = "10.9.86"; //minor fixes mostly -- draw, isosurface;new high zoom option allows nearly infinite zoom;fix minor selected/hidden bug public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-27 13:15:40
|
Revision: 6043 http://svn.sourceforge.net/jmol/?rev=6043&view=rev Author: hansonr Date: 2006-10-27 06:15:23 -0700 (Fri, 27 Oct 2006) Log Message: ----------- jmolLoadInlineFiles([strModel1, strModel2, ...],script,target) Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/JmolApplet.java trunk/Jmol/src/org/jmol/api/JmolAppletInterface.java trunk/Jmol/src/org/jmol/api/JmolViewer.java trunk/Jmol/src/org/jmol/applet/Jmol.java trunk/Jmol/src/org/jmol/viewer/FileManager.java trunk/Jmol/src/org/jmol/viewer/JmolConstants.java trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-27 04:28:42 UTC (rev 6042) +++ trunk/Jmol/build.xml 2006-10-27 13:15:23 UTC (rev 6043) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.86" /> + <property name="version" value="10.9.87" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/JmolApplet.java =================================================================== --- trunk/Jmol/src/JmolApplet.java 2006-10-27 04:28:42 UTC (rev 6042) +++ trunk/Jmol/src/JmolApplet.java 2006-10-27 13:15:23 UTC (rev 6043) @@ -131,6 +131,14 @@ ((JmolAppletInterface)wrappedApplet).loadInline(""+strModel, ""+script); } + public void loadInline(String[] strModels, String script) { + String[] converted = new String[strModels.length]; + for (int i = strModels.length; --i >= 0;) + converted[i] = "" + strModels[i]; + if (wrappedApplet != null) + ((JmolAppletInterface)wrappedApplet).loadInline(converted, ""+script); + } + public void loadNodeId(String nodeId) { if (wrappedApplet != null) ((JmolAppletInterface)wrappedApplet).loadNodeId(""+nodeId); Modified: trunk/Jmol/src/org/jmol/api/JmolAppletInterface.java =================================================================== --- trunk/Jmol/src/org/jmol/api/JmolAppletInterface.java 2006-10-27 04:28:42 UTC (rev 6042) +++ trunk/Jmol/src/org/jmol/api/JmolAppletInterface.java 2006-10-27 13:15:23 UTC (rev 6043) @@ -44,6 +44,7 @@ public Object getProperty(String infoType, String paramInfo); public void loadInline(String strModel); public void loadInline(String strModel, String script); + public void loadInline(String[] strModels, String script); public void loadNodeId(String nodeId); public void loadDOMNode(JSObject DOMNode); public void script(String script); Modified: trunk/Jmol/src/org/jmol/api/JmolViewer.java =================================================================== --- trunk/Jmol/src/org/jmol/api/JmolViewer.java 2006-10-27 04:28:42 UTC (rev 6042) +++ trunk/Jmol/src/org/jmol/api/JmolViewer.java 2006-10-27 13:15:23 UTC (rev 6043) @@ -104,6 +104,8 @@ abstract public String scriptWait(String script); abstract public Object scriptWaitStatus(String script, String statusList); abstract public void loadInline(String strModel); + abstract public void loadInline(String[] arrayModels); + abstract public void loadInline(String strModel, char newLine); abstract public String evalStringQuiet(String script); abstract public boolean isScriptExecuting(); Modified: trunk/Jmol/src/org/jmol/applet/Jmol.java =================================================================== --- trunk/Jmol/src/org/jmol/applet/Jmol.java 2006-10-27 04:28:42 UTC (rev 6042) +++ trunk/Jmol/src/org/jmol/applet/Jmol.java 2006-10-27 13:15:23 UTC (rev 6043) @@ -332,9 +332,9 @@ } String loadParam; String scriptParam = getValue("script", ""); - if ((loadParam = getValue("loadInline", null)) != null) - loadInline(loadParam, (scriptParam.length() > 0 ? scriptParam : null)); - else { + if ((loadParam = getValue("loadInline", null)) != null) { + loadInlineSeparated(loadParam, (scriptParam.length() > 0 ? scriptParam : null)); + } else { if ((loadParam = getValue("load", null)) != null) scriptParam = "load \"" + loadParam + "\";" + scriptParam; if (scriptParam.length() > 0) @@ -636,7 +636,7 @@ public void loadInline(String strModel) { if (strModel == null) return; - viewer.loadInline(strModel); + viewer.loadInline(strModel, (char) 0); } public void loadInline(String strModel, String script) { @@ -644,10 +644,20 @@ script(script); } - public void loadInline(String[] arrayModel, String script) { - // not implemented + public void loadInline(String[] arrayModels, String script) { + if (arrayModels == null || arrayModels.length == 0) + return; + viewer.loadInline(arrayModels); + script(script); } + private void loadInlineSeparated(String strModel, String script) { + if (strModel == null) + return; + viewer.loadInline(strModel); + script(script); + } + public void loadDOMNode(JSObject DOMNode) { // This should provide a route to pass in a browser DOM node // directly as a JSObject. Unfortunately does not seem to work with Modified: trunk/Jmol/src/org/jmol/viewer/FileManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/FileManager.java 2006-10-27 04:28:42 UTC (rev 6042) +++ trunk/Jmol/src/org/jmol/viewer/FileManager.java 2006-10-27 13:15:23 UTC (rev 6043) @@ -70,6 +70,7 @@ private String fullPathName; String fileName; String inlineData; + String[] inlineDataArray; boolean isInline; boolean isDOM; @@ -151,6 +152,27 @@ fileOpenThread.run(); } + void openStringInline(String[] arrayModels, int[] params) { + String sp = ""; + if (params != null) + for (int i = 0; i < params.length; i++) + sp += "," + params[i]; + Logger.info("FileManager.openStringInline(string[]" + sp + ")"); + openErrorMessage = null; + fullPathName = fileName = "string[]"; + inlineDataArray = arrayModels; + isInline = true; + isDOM = false; + String[] fullPathNames = new String[arrayModels.length]; + StringReader[] readers = new StringReader[arrayModels.length]; + for (int i = 0; i < arrayModels.length; i++) { + fullPathNames[i] = "string["+i+"]"; + readers[i] = new StringReader(arrayModels[i]); + } + filesOpenThread = new FilesOpenThread(fullPathNames, readers); + filesOpenThread.run(); + } + void openDOM(Object DOMNode) { openErrorMessage = null; fullPathName = fileName = "JSNode"; Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-27 04:28:42 UTC (rev 6042) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-27 13:15:23 UTC (rev 6043) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.86"; //minor fixes mostly -- draw, isosurface;new high zoom option allows nearly infinite zoom;fix minor selected/hidden bug + public final static String version = "10.9.87"; //jmolLoadInlineFiles() public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2006-10-27 04:28:42 UTC (rev 6042) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2006-10-27 13:15:23 UTC (rev 6043) @@ -84,7 +84,7 @@ // these are all private now so we are certain they are not // being accesed by any other classes - + private Component display; private Graphics3D g3d; private JmolAdapter modelAdapter; @@ -106,12 +106,12 @@ private StyleManager styleManager; private TempManager tempManager; private TransformManager transformManager; - + private String strJavaVendor; private String strJavaVersion; private String strOSName; private String htmlName = ""; - + private boolean jvm11orGreater = false; private boolean jvm12orGreater = false; private boolean jvm14orGreater = false; @@ -247,7 +247,7 @@ styleManager.setCrystallographicDefaults(); refresh(1, "Viewer:homePosition()"); } - + public void homePosition() { script("reset"); } @@ -361,15 +361,17 @@ transformManager.move(dRot, dZoom, dTrans, dSlab, floatSecondsTotal, fps); } - public void moveTo(float floatSecondsTotal, Point3f center, Point3f pt, float degrees, - float zoom, float xTrans, float yTrans, float rotationRadius) { + public void moveTo(float floatSecondsTotal, Point3f center, Point3f pt, + float degrees, float zoom, float xTrans, float yTrans, + float rotationRadius) { //from Eval - transformManager.moveTo(floatSecondsTotal, center, pt, degrees, zoom, xTrans, - yTrans, rotationRadius); + transformManager.moveTo(floatSecondsTotal, center, pt, degrees, zoom, + xTrans, yTrans, rotationRadius); } public void moveTo(float floatSecondsTotal, Matrix3f rotationMatrix, - Point3f center, float zoom, float xTrans, float yTrans, float rotationRadius) { + Point3f center, float zoom, float xTrans, float yTrans, + float rotationRadius) { //from StateManager transformManager.moveTo(floatSecondsTotal, rotationMatrix, center, zoom, xTrans, yTrans, rotationRadius); @@ -484,11 +486,11 @@ float getZoomPercentSetting() { return transformManager.getZoomPercentSetting(); } - + float getMaxZoomPercent() { return TransformManager.MAXIMUM_ZOOM_PERCENTAGE; } - + void zoomToPercent(float percent) { transformManager.zoomToPercent(percent); refresh(1, "Viewer:zoomToPercent()"); @@ -1001,9 +1003,13 @@ if (name == null) return; if (name.equalsIgnoreCase("string")) { - openStringInline(getInlineData(), params); + openStringInline(fileManager.inlineData, params); return; } + if (name.equalsIgnoreCase("string[]")) { + openStringInline(fileManager.inlineDataArray, params); + return; + } clear(); long timeBegin = System.currentTimeMillis(); fileManager.openFile(name, params); @@ -1046,8 +1052,14 @@ null, null); } - public String getInlineData() { - return fileManager.inlineData; + private void openStringInline(String[] arrayModels, int[] params) { + //loadInline, openFile, openStringInline + clear(); + fileManager.openStringInline(arrayModels, params); + String errorMsg = getOpenFileError(); + if (errorMsg == null) + setStatusFileLoaded(1, "string[]", "", modelManager.getModelSetName(), + null, null); } public char getInlineChar() { @@ -1078,6 +1090,15 @@ openStringInline(strModel, A); } + public void loadInline(String[] arrayModels) { + //Eval data + //loadInline + if (arrayModels == null || arrayModels.length == 0) + return; + int[] A = global.getDefaultLattice(); + openStringInline(arrayModels, A); + } + public void openDOM(Object DOMNode) { //applet.loadDOMNode clear(); @@ -1147,6 +1168,12 @@ if (getFullPathName() == "string") { return fileManager.inlineData; } + if (getFullPathName() == "string[]") { + int modelIndex = getDisplayModelIndex(); + if (modelIndex < 0) + return ""; + return fileManager.inlineDataArray[modelIndex]; + } if (getFullPathName() == "JSNode") { return "<DOM NODE>"; } @@ -1668,7 +1695,7 @@ } public String getAltLocListInModel(int modelIndex) { - return modelManager.getAltLocListInModel(modelIndex); + return modelManager.getAltLocListInModel(modelIndex); } public BitSet setConformation() { @@ -1721,7 +1748,6 @@ modelManager.setUnitCellOffset(getDisplayModelIndex(), pt); } - /* **************************************************************************** * delegated to MeasurementManager ****************************************************************************/ @@ -1810,7 +1836,7 @@ setShapeProperty(JmolConstants.SHAPE_MEASURES, "toggle", atomCountPlusIndices); } - + // /////////////////////////////////////////////////////////////// // delegated to RepaintManager // /////////////////////////////////////////////////////////////// @@ -1819,7 +1845,7 @@ //from RepaintManager display.repaint(); } - + void setAnimationDirection(int direction) {// 1 or -1 //Eval repaintManager.setAnimationDirection(direction); @@ -1830,7 +1856,6 @@ repaintManager.reverseAnimation(); } - int getAnimationDirection() { return repaintManager.animationDirection; } @@ -1852,7 +1877,7 @@ void setAnimationReplayMode(int replay, float firstFrameDelay, float lastFrameDelay) { //Eval - + // 0 means once // 1 means loop // 2 means palindrome @@ -2006,7 +2031,7 @@ } ////////////// screen/image methods /////////////// - + final Dimension dimScreen = new Dimension(); final Rectangle rectClip = new Rectangle(); @@ -2192,7 +2217,7 @@ boolean usingScriptQueue() { return scriptManager.useQueue; } - + public void clearScriptQueue() { //Eval //checkHalt ** @@ -2239,7 +2264,7 @@ scriptManager.waitForQueue(); boolean doTranslateTemp = GT.getDoTranslate(); GT.setDoTranslate(false); - String str=(String) evalStringWaitStatus("JSON", strScript, + String str = (String) evalStringWaitStatus("JSON", strScript, "+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated", false, false, null); GT.setDoTranslate(doTranslateTemp); @@ -2250,8 +2275,8 @@ scriptManager.waitForQueue(); boolean doTranslateTemp = GT.getDoTranslate(); GT.setDoTranslate(false); - Object ret = evalStringWaitStatus("object", strScript, statusList, false, false, - null); + Object ret = evalStringWaitStatus("object", strScript, statusList, false, + false, null); GT.setDoTranslate(doTranslateTemp); return ret; } @@ -2736,23 +2761,23 @@ while (true) { if (key.equalsIgnoreCase("zoomLarge")) { setZoomLarge(value); - break; + break; } if (key.equalsIgnoreCase("labelPointerBackground")) { setLabelPointerBackground(value); - break; + break; } if (key.equalsIgnoreCase("labelPointerNoBox")) { setLabelPointerNoBox(value); - break; + break; } if (key.equalsIgnoreCase("labelPointerBox")) { setLabelPointerBox(value); - break; + break; } if (key.equalsIgnoreCase("languageTranslation")) { GT.setDoTranslate(value); - break; + break; } if (key.equalsIgnoreCase("hideNotSelected")) { setHideNotSelected(value); @@ -3094,7 +3119,7 @@ public void setSelectionHalos(boolean TF) { //app DisplayPanel if (getSelectionHaloEnabled() != TF) - script("selectionHalos "+ TF); + script("selectionHalos " + TF); } void setSelectionHaloEnabled(boolean selectionHaloEnabled) { @@ -3642,7 +3667,7 @@ } ////////////////////////////////////////////////// - + void setModelVisibility() { //Eval modelManager.setModelVisibility(); @@ -3859,9 +3884,9 @@ setModelVisibility(); statusManager.createImage(file, type, quality); } - + //////////unimplemented - + public void setSyncDriver(int syncMode) { //it was an idea... Logger.debug(htmlName + " viewer setting sync driver " + syncMode); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-30 20:48:42
|
Revision: 6057 http://svn.sourceforge.net/jmol/?rev=6057&view=rev Author: hansonr Date: 2006-10-30 12:48:20 -0800 (Mon, 30 Oct 2006) Log Message: ----------- cartoon helixes and rockets: -new, more conservative assignment of helix structure -atom properties psi, phi can be tested in "select" -new psi and phi in getproperty polymerInfo -means Ramachandran plotting would be easy Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/AlphaPolymer.java trunk/Jmol/src/org/jmol/viewer/AminoPolymer.java trunk/Jmol/src/org/jmol/viewer/Atom.java trunk/Jmol/src/org/jmol/viewer/CartoonRenderer.java trunk/Jmol/src/org/jmol/viewer/Compiler.java trunk/Jmol/src/org/jmol/viewer/Eval.java trunk/Jmol/src/org/jmol/viewer/Group.java trunk/Jmol/src/org/jmol/viewer/JmolConstants.java trunk/Jmol/src/org/jmol/viewer/ModelManager.java trunk/Jmol/src/org/jmol/viewer/Monomer.java trunk/Jmol/src/org/jmol/viewer/Polymer.java trunk/Jmol/src/org/jmol/viewer/ProteinStructure.java trunk/Jmol/src/org/jmol/viewer/Token.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/build.xml 2006-10-30 20:48:20 UTC (rev 6057) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.87" /> + <property name="version" value="10.9.88" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/AlphaPolymer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/AlphaPolymer.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/AlphaPolymer.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -55,14 +55,17 @@ switch(type) { case JmolConstants.PROTEIN_STRUCTURE_HELIX: proteinstructure = new Helix(this, indexStart, structureCount); + proteinstructure.index = ++structureCount; break; case JmolConstants.PROTEIN_STRUCTURE_SHEET: if (this instanceof AminoPolymer) proteinstructure = new Sheet((AminoPolymer)this, indexStart, structureCount); + proteinstructure.index = ++structureCount; break; case JmolConstants.PROTEIN_STRUCTURE_TURN: proteinstructure = new Turn(this, indexStart, structureCount); + proteinstructure.index = ++structureCount; break; default: Logger.error("unrecognized secondary structure type"); Modified: trunk/Jmol/src/org/jmol/viewer/AminoPolymer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/AminoPolymer.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/AminoPolymer.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -258,7 +258,7 @@ * * miguel 2004 06 16 */ - + /* * New code for assigning secondary structure based on * phi-psi angles instead of hydrogen bond patterns. @@ -270,86 +270,96 @@ */ void calculateStructures() { - //deprecated: calcHydrogenBonds(); + //deprecated: calcHydrogenBonds(); char[] structureTags = new char[monomerCount]; - float[] phi_psi = new float[2]; - for (int i = 0; i < monomerCount-1; ++i) { - AminoMonomer leadingResidue = (AminoMonomer)monomers[i]; - AminoMonomer trailingResidue = (AminoMonomer)monomers[i+1]; - calcPhiPsiAngles(leadingResidue, trailingResidue, phi_psi); - if ( isHelix(phi_psi) ) { - structureTags[i] = '4'; - //structureTags[i+1] = '4'; - } else if (isSheet(phi_psi)) { + for (int i = 0; i < monomerCount - 1; ++i) { + AminoMonomer leadingResidue = (AminoMonomer) monomers[i]; + AminoMonomer trailingResidue = (AminoMonomer) monomers[i + 1]; + calcPhiPsiAngles(leadingResidue, trailingResidue); + if (isHelix(leadingResidue.psi, trailingResidue.phi)) { + //this next is just Bob's attempt to separate different helices + //it is CONSERVATIVE -- it displays fewer helices than before + //thus allowing more turns and (presumably) better rockets. + + structureTags[i] = (trailingResidue.phi < 0 && leadingResidue.psi < 25 ? '4' : '3'); + } else if (isSheet(leadingResidue.psi, trailingResidue.phi)) { structureTags[i] = 's'; - //structureTags[i+1] = 's'; - } else if (isTurn(phi_psi)) { + } else if (isTurn(leadingResidue.psi, trailingResidue.phi)) { structureTags[i] = 't'; - //structureTags[i+1] = 't'; + } else { + structureTags[i] = 'n'; } - else { - structureTags[i] = '\0'; - //structureTags[i+1] = '\0'; - } + + if (Logger.isActiveLevel(Logger.LEVEL_DEBUG)) + Logger.debug(this.monomers[0].chain.chainID + " aminopolymer:" + i + + " " + trailingResidue.phi + "," + leadingResidue.psi + " " + structureTags[i]); } - + // build alpha helix stretches for (int start = 0; start < monomerCount; ++start) { - if (structureTags[start] == '4') { - int end; - for (end = start + 1; - end < monomerCount && structureTags[end] == '4'; - ++end) - {} - end--; - if (end >= start+3) { - addSecondaryStructure(JmolConstants.PROTEIN_STRUCTURE_HELIX, - start, end); - } - start = end; - } - } - + if (structureTags[start] == '4') { + int end; + for (end = start + 1; end < monomerCount && structureTags[end] == '4'; ++end) { + } + end--; + if (end >= start + 3) { + addSecondaryStructure(JmolConstants.PROTEIN_STRUCTURE_HELIX, start, + end); + } + start = end; + } + } + + for (int start = 0; start < monomerCount; ++start) { + if (structureTags[start] == '3') { + int end; + for (end = start + 1; end < monomerCount && structureTags[end] == '3'; ++end) { + } + end--; + if (end >= start + 3) { + addSecondaryStructure(JmolConstants.PROTEIN_STRUCTURE_HELIX, start, + end); + } + start = end; + } + } + // build beta sheet stretches for (int start = 0; start < monomerCount; ++start) { - if (structureTags[start] == 's') { - int end; - for (end = start + 1; - end < monomerCount && structureTags[end] == 's'; - ++end) - {} - end--; - if (end >= start+2) { - addSecondaryStructure(JmolConstants.PROTEIN_STRUCTURE_SHEET, - start, end); - } - start = end; - } - } - + if (structureTags[start] == 's') { + int end; + for (end = start + 1; end < monomerCount && structureTags[end] == 's'; ++end) { + } + end--; + if (end >= start + 2) { + addSecondaryStructure(JmolConstants.PROTEIN_STRUCTURE_SHEET, start, + end); + } + start = end; + } + } + // build turns for (int start = 0; start < monomerCount; ++start) { - if (structureTags[start] == 't') { - int end; - for (end = start + 1; - end < monomerCount && structureTags[end] == 't'; - ++end) - {} - end--; - if (end >= start+2) { - addSecondaryStructure(JmolConstants.PROTEIN_STRUCTURE_TURN, - start, end); - } - start = end; - } - } + if (structureTags[start] == 't') { + int end; + for (end = start + 1; end < monomerCount && structureTags[end] == 't'; ++end) { + } + end--; + if (end >= start + 2) { + addSecondaryStructure(JmolConstants.PROTEIN_STRUCTURE_TURN, start, + end); + } + start = end; + } + } } void calcPhiPsiAngles(AminoMonomer leadingResidue, - AminoMonomer trailingResidue, float[] phi_psi) { + AminoMonomer trailingResidue) { Point3f nitrogen1 = leadingResidue.getNitrogenAtomPoint(); Point3f alphacarbon1 = leadingResidue.getLeadAtomPoint(); Point3f carbon1 = leadingResidue.getCarbonylCarbonAtomPoint(); @@ -357,31 +367,31 @@ Point3f alphacarbon2 = trailingResidue.getLeadAtomPoint(); Point3f carbon2 = trailingResidue.getCarbonylCarbonAtomPoint(); - phi_psi[0] = Measurement.computeTorsion(carbon1, nitrogen2, + trailingResidue.phi = Measurement.computeTorsion(carbon1, nitrogen2, alphacarbon2, carbon2); - phi_psi[1] = Measurement.computeTorsion(nitrogen1, alphacarbon1, + leadingResidue.psi = Measurement.computeTorsion(nitrogen1, alphacarbon1, carbon1, nitrogen2); } - boolean isHelix(float[] phi_psi) { - float phi = phi_psi[0]; - float psi = phi_psi[1]; + /** + * + * @param psi N-C-CA-N torsion for NEXT group + * @param phi C-CA-N-C torsion for THIS group + * @return whether this corresponds to a helix + */ + static boolean isHelix(float psi, float phi) { return (phi >= -160) && (phi <= 0) && (psi >= -100) && (psi <= 45); } - boolean isSheet(float[] phi_psi) { - float phi = phi_psi[0]; - float psi = phi_psi[1]; + static boolean isSheet(float psi, float phi) { return ( (phi >= -180) && (phi <= -10) && (psi >= 70) && (psi <= 180) ) || ( (phi >= -180) && (phi <= -45) && (psi >= -180) && (psi <= -130) ) || ( (phi >= 140) && (phi <= 180) && (psi >= 90) && (psi <= 180) ); } - boolean isTurn(float[] phi_psi) { - float phi = phi_psi[0]; - float psi = phi_psi[1]; + static boolean isTurn(float psi, float phi) { return (phi >= 30) && (phi <= 90) && (psi >= -15) && (psi <= 95); } @@ -396,10 +406,10 @@ findHelixes(structureTags); for (int iStart = 0; iStart < monomerCount; ++iStart) { - if (structureTags[iStart] != '\0') { + if (structureTags[iStart] != 'n') { int iMax; for (iMax = iStart + 1; - iMax < monomerCount && structureTags[iMax] != '\0'; + iMax < monomerCount && structureTags[iMax] != 'n'; ++iMax) {} int iLast = iMax - 1; @@ -413,7 +423,7 @@ // for some reason if these are not reset, all helices are classified // as sheets. - tim 2205 10 12 for (int i = monomerCount; --i >= 0; ) - structureTags[i] = '\0'; + structureTags[i] = 'n'; findSheets(structureTags); @@ -422,10 +432,10 @@ Logger.debug("" + i + ":" + structureTags[i] + " " + min1Indexes[i] + " " + min2Indexes[i]); for (int iStart = 0; iStart < monomerCount; ++iStart) { - if (structureTags[iStart] != '\0') { + if (structureTags[iStart] != 'n') { int iMax; for (iMax = iStart + 1; - iMax < monomerCount && structureTags[iMax] != '\0'; + iMax < monomerCount && structureTags[iMax] != 'n'; ++iMax) {} int iLast = iMax - 1; Modified: trunk/Jmol/src/org/jmol/viewer/Atom.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Atom.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/Atom.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -607,6 +607,14 @@ return madAtom / (1000f * 2); } + float getGroupPhi() { + return group.phi; + } + + float getGroupPsi() { + return group.psi; + } + char getChainID() { if (group == null) return 0; @@ -773,6 +781,12 @@ return group.getSeqcodeString(); } + int getSeqNumber() { + if (group == null) + return 0; + return group.getSeqNumber(); + } + char getInsertionCode() { if (group == null) return '\0'; Modified: trunk/Jmol/src/org/jmol/viewer/CartoonRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/CartoonRenderer.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/CartoonRenderer.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -184,6 +184,8 @@ void render1Chain() { boolean lastWasSheet = false; boolean lastWasHelix = false; + ProteinStructure previousStructure = null; + ProteinStructure thisStructure = null; // this code is REALLY BAD, I admit. Key structures that must render properly // include 1crn and 7hvp @@ -191,6 +193,12 @@ for (int i = monomerCount; --i >= 0;) { // runs backwards, so it can render the heads first Monomer group = monomers[i]; + thisStructure = group.getProteinStructure(); + if (thisStructure != previousStructure) { + lastWasHelix = false; + lastWasSheet = false; + } + previousStructure = thisStructure; if ((group.shapeVisibilityFlags & myVisibilityFlag) != 0 && !frame.bsHidden.get(group.getLeadAtomIndex())) { short colix = Graphics3D.inheritColix(colixes[i], @@ -230,14 +238,19 @@ if (renderAsRockets && !isNucleicPolymer && !isCarbohydratePolymer) { lastWasHelix = false; + boolean isVisible; + //error here is that one helix might connect with the next helix, in which case + //multiple helixes will be seen as one. That's a SERIOUS problem, because + //currently we don't recognize the structure NUMBER only the TYPE + for (int i = 0; i < monomerCount; ++i) { - if ((monomers[i].shapeVisibilityFlags & myVisibilityFlag) == 0) - continue; Monomer group = monomers[i]; - if ((group.shapeVisibilityFlags & myVisibilityFlag) != 0) { + boolean isHelix = isHelixes[i]; + isVisible = ((group.shapeVisibilityFlags & myVisibilityFlag) != 0 + && !frame.bsHidden.get(group.getLeadAtomIndex())); + if (isVisible) { short colix = Graphics3D.inheritColix(colixes[i], group.getLeadAtom().colixAtom); - boolean isHelix = isHelixes[i]; if (isHelix) { renderHelixAsRocket(group, colix, mads[i], i > 0 && isHelixes[i-1]); if (newRockets && i > 0 && !isSpecials[i-1]) { @@ -253,8 +266,8 @@ renderRopeSegment(colix, mads, i, monomerCount, monomers, screens, isSpecials); } + } lastWasHelix = isHelix; - } } renderPendingRocketSegment(true); viewer.freeTempScreens(screens); Modified: trunk/Jmol/src/org/jmol/viewer/Compiler.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Compiler.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/Compiler.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -1145,6 +1145,9 @@ if ((tokenComparator.tok & Token.comparator) == 0) return comparisonOperatorExpected(); Token tokenValue = tokenNext(); + boolean isNegative = (tokenValue.tok == Token.hyphen); + if (isNegative) + tokenValue = tokenNext(); int val = Integer.MAX_VALUE; if (tokenValue.tok == Token.decimal) { float vf = ((Float) tokenValue.value).floatValue(); @@ -1173,7 +1176,7 @@ if (val == Integer.MAX_VALUE) return numberExpected(); return addTokenToPostfix(new Token(tokenComparator.tok, - tokenAtomProperty.tok, new Integer(val))); + tokenAtomProperty.tok, new Integer(val * (isNegative ? -1 : 1)))); } boolean clauseCell() { Modified: trunk/Jmol/src/org/jmol/viewer/Eval.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -1218,6 +1218,12 @@ case Token.radius: propertyValue = atom.getRasMolRadius(); break; + case Token.psi: + propertyValue = atom.getGroupPsi(); + break; + case Token.phi: + propertyValue = atom.getGroupPhi(); + break; case Token._bondedcount: propertyValue = atom.getCovalentBondCount(); break; Modified: trunk/Jmol/src/org/jmol/viewer/Group.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Group.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/Group.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -38,6 +38,8 @@ int lastAtomIndex; int shapeVisibilityFlags = 0; int minZ; + float phi = Float.NaN; + float psi = Float.NaN; Group(Chain chain, String group3, int seqcode, int firstAtomIndex, int lastAtomIndex) { @@ -188,6 +190,10 @@ return seqcode; } + final int getSeqNumber() { + return seqcode >> 8; + } + final String getSeqcodeString() { return getSeqcodeString(seqcode); } Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.87"; //jmolLoadInlineFiles() + public final static String version = "10.9.88"; //jmolLoadInlineFiles() public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); Modified: trunk/Jmol/src/org/jmol/viewer/ModelManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/ModelManager.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/ModelManager.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -963,14 +963,14 @@ info.put("vibVector", new Vector3f(frame.vibrationVectors[i])); } info.put("bondCount", new Integer(atom.getCovalentBondCount())); - info.put("radius", new Float((atom.getRasMolRadius()/120.0))); + info.put("radius", new Float((atom.getRasMolRadius() / 120.0))); info.put("model", new Integer(atom.getModelTagNumber())); info.put("visible", new Boolean(getAtomVisibility(i))); info.put("clickabilityFlags", new Integer(atom.clickabilityFlags)); info.put("visibilityFlags", new Integer(atom.shapeVisibilityFlags)); info.put("spacefill", new Integer(atom.madAtom >> 3)); String strColor = viewer.getHexColorFromIndex(atom.colixAtom); - if(strColor != null) + if (strColor != null) info.put("color", strColor); info.put("colix", new Integer(atom.colixAtom)); boolean isTranslucent = atom.isTranslucent(); @@ -980,25 +980,27 @@ info.put("partialCharge", new Float(atom.getPartialCharge())); float d = atom.getSurfaceDistance(); if (d >= 0) - info.put("surfaceDistance", new Float(d)); + info.put("surfaceDistance", new Float(d)); if (isPDB(atom.modelIndex)) { info.put("resname", atom.getGroup3()); - info.put("resno", atom.getSeqcodeString()); + int seqNum = atom.getSeqNumber(); + char insCode = atom.getInsertionCode(); + if (seqNum > 0) + info.put("resno", new Integer(seqNum)); + if (insCode != 0) + info.put("insertionCode", "" + insCode); char chainID = atom.getChainID(); info.put("name", getAtomName(i)); - info.put("chain", (chainID == '\0' ? "" : "" + chainID )); + info.put("chain", (chainID == '\0' ? "" : "" + chainID)); info.put("atomID", new Integer(atom.getSpecialAtomID())); info.put("groupID", new Integer(atom.getGroupID())); if (atom.alternateLocationID != '\0') - info.put("altLocation", new String(""+atom.alternateLocationID)); - char ch = atom.getInsertionCode(); - if (ch != '\0') - info.put("insertionCode", new String(""+ch)); + info.put("altLocation", new String("" + atom.alternateLocationID)); info.put("structure", new Integer(atom.getProteinStructureType())); info.put("polymerLength", new Integer(atom.getPolymerLength())); info.put("occupancy", new Integer(atom.getOccupancy())); int temp = atom.getBfactor100(); - info.put("temp", new Integer((temp<0 ? 0 : temp/100))); + info.put("temp", new Integer((temp < 0 ? 0 : temp / 100))); } return info; } Modified: trunk/Jmol/src/org/jmol/viewer/Monomer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Monomer.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/Monomer.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -228,18 +228,32 @@ Hashtable getMyInfo() { Hashtable info = new Hashtable(); - info.put("seqcode",getSeqcodeString()); + info.put("chain", ""+chain.chainID); + + int seqNum = getSeqNumber(); + char insCode = getInsertionCode(); + if (seqNum > 0) + info.put("sequenceNumber",new Integer(seqNum)); + if (insCode != 0) + info.put("insertionCode","" + insCode); info.put("atomInfo1", chain.frame.atoms[firstAtomIndex].getInfo()); info.put("atomInfo2", chain.frame.atoms[lastAtomIndex].getInfo()); info.put("_apt1", new Integer(firstAtomIndex)); info.put("_apt2", new Integer(lastAtomIndex)); + if (!Float.isNaN(phi)) + info.put("phi", new Float(phi)); + if (!Float.isNaN(psi)) + info.put("psi", new Float(psi)); + ProteinStructure structure = getProteinStructure(); + if(structure != null) { + info.put("structureIndex", new Integer(structure.index)); + info.put("structureType", getStructureTypeName(structure.type)); + } info.put("shapeVisibilityFlags", new Integer(shapeVisibilityFlags)); - ProteinStructure structure = getProteinStructure(); - if(structure != null)info.put("structure", getStructureTypeName(structure.type)); return info; } - String getStructureTypeName(byte type) { + static String getStructureTypeName(byte type) { switch(type) { case JmolConstants.PROTEIN_STRUCTURE_HELIX: return "helix"; Modified: trunk/Jmol/src/org/jmol/viewer/Polymer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Polymer.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/Polymer.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -34,6 +34,7 @@ Model model; Monomer[] monomers; int monomerCount; + int structureCount; private int[] atomIndices; Modified: trunk/Jmol/src/org/jmol/viewer/ProteinStructure.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/ProteinStructure.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/ProteinStructure.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -25,6 +25,7 @@ import javax.vecmath.Point3f; import javax.vecmath.Vector3f; +import org.jmol.util.Logger; abstract class ProteinStructure { @@ -36,14 +37,16 @@ Point3f axisA, axisB; Vector3f axisUnitVector; Point3f[] segments; + int index; ProteinStructure(AlphaPolymer apolymer, byte type, int monomerIndex, int monomerCount) { this.apolymer = apolymer; this.type = type; - //Logger.debug("Creating ProteinStructure" + type); - + if(Logger.isActiveLevel(Logger.LEVEL_DEBUG)) + Logger.debug("Creating ProteinStructure" + type + " from " + monomerIndex + " through "+(monomerIndex+monomerCount -1)); + this.monomerIndex = monomerIndex; this.monomerCount = monomerCount; } Modified: trunk/Jmol/src/org/jmol/viewer/Token.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Token.java 2006-10-30 20:42:13 UTC (rev 6056) +++ trunk/Jmol/src/org/jmol/viewer/Token.java 2006-10-30 20:48:20 UTC (rev 6057) @@ -345,6 +345,8 @@ final static int surfacedistance = atomproperty | 17; final static int atomIndex = atomproperty | 18; final static int formalCharge = atomproperty | 19 | setparam ; + final static int phi = atomproperty | 20; + final static int psi = atomproperty | 21; final static int opGT = comparator | 0; final static int opGE = comparator | 1; @@ -638,6 +640,8 @@ "formalcharge", new Token(formalCharge, "formalcharge"), "charge", null, "partialcharge",new Token(partialCharge, "partialcharge"), + "phi", new Token(phi, "phi"), + "psi", new Token(psi, "psi"), // show parameters "information", new Token(information, "information"), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-11-01 01:22:30
|
Revision: 6065 http://svn.sourceforge.net/jmol/?rev=6065&view=rev Author: hansonr Date: 2006-10-31 17:22:14 -0800 (Tue, 31 Oct 2006) Log Message: ----------- 10.9.89 - fixes a minor bug in atom specification when [] are not used involving insertion codes - minor internal reorganization and cleaning of Compiler/Eval/Frame code - draw bugs introduced in 10.9.88 fixed Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/Compiler.java trunk/Jmol/src/org/jmol/viewer/Eval.java trunk/Jmol/src/org/jmol/viewer/Frame.java trunk/Jmol/src/org/jmol/viewer/JmolConstants.java trunk/Jmol/src/org/jmol/viewer/ModelManager.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-10-31 18:19:14 UTC (rev 6064) +++ trunk/Jmol/build.xml 2006-11-01 01:22:14 UTC (rev 6065) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.88" /> + <property name="version" value="10.9.89" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/Compiler.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Compiler.java 2006-10-31 18:19:14 UTC (rev 6064) +++ trunk/Jmol/src/org/jmol/viewer/Compiler.java 2006-11-01 01:22:14 UTC (rev 6065) @@ -550,13 +550,13 @@ int pt0 = ichT; boolean digitSeen = false; char ch = 'X'; - while (ichT < cchScript && isDigit(ch = script.charAt(ichT))) { + while (ichT < cchScript && Character.isDigit(ch = script.charAt(ichT))) { ++ichT; digitSeen = true; } if (ichT < cchScript && ch == '.') ++ichT; - while (ichT < cchScript && isDigit(ch = script.charAt(ichT))) { + while (ichT < cchScript && Character.isDigit(ch = script.charAt(ichT))) { ++ichT; digitSeen = true; } @@ -578,7 +578,7 @@ ichT++; factor = (ch == '-'? -1 : 1); } - while (ichT < cchScript && isDigit(ch = script.charAt(ichT))) { + while (ichT < cchScript && Character.isDigit(ch = script.charAt(ichT))) { ichT++; exp = (exp * 10 + ch - '0'); } @@ -598,7 +598,7 @@ ++ichT; boolean digitSeen = false; char ch = 'X'; - while (ichT < cchScript && isDigit(ch = script.charAt(ichT))) { + while (ichT < cchScript && Character.isDigit(ch = script.charAt(ichT))) { ++ichT; digitSeen = true; } @@ -607,15 +607,15 @@ // to support 1.ca, let's check the character after the dot // to determine if it is an alpha if (ch == '.' && (ichT + 1 < cchScript) && - (isAlphabetic(script.charAt(ichT + 1)) || script.charAt(ichT + 1) == '?')) + (Character.isLetter(script.charAt(ichT + 1)) || script.charAt(ichT + 1) == '?')) return false; //well, guess what? we also have to look for 86.1Na, so... if (ch == '.' && (ichT + 2 < cchScript) && - (isAlphabetic(script.charAt(ichT + 2)) || script.charAt(ichT + 2) == '?')) + (Character.isLetter(script.charAt(ichT + 2)) || script.charAt(ichT + 2) == '?')) return false; ++ichT; - while (ichT < cchScript && isDigit(script.charAt(ichT))) { + while (ichT < cchScript && Character.isDigit(script.charAt(ichT))) { ++ichT; digitSeen = true; } @@ -623,14 +623,6 @@ return digitSeen; } - static boolean isAlphabetic(char ch) { - return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); - } - - static boolean isDigit(char ch) { - return ch >= '0' && ch <= '9'; - } - boolean lookingAtSeqcode() { int ichT = ichToken; char ch = ' '; @@ -639,13 +631,13 @@ ch = '^'; ++ichT; } else { - while (ichT < cchScript && isDigit(ch = script.charAt(ichT))) + while (ichT < cchScript && Character.isDigit(ch = script.charAt(ichT))) ++ichT; } if (ichT == ichToken || ichT + 2 > cchScript || ch != '^') return false; ch = script.charAt(++ichT); - if (ch != '*' && ch != '?' && !isAlphabetic(ch)) + if (ch != '*' && ch != '?' && !Character.isLetter(ch)) return false; ++ichT; cchToken = ichT - ichToken; @@ -659,7 +651,7 @@ if (allowNegative && script.charAt(ichToken) == '-') ++ichT; int ichBeginDigits = ichT; - while (ichT < cchScript && isDigit(script.charAt(ichT))) + while (ichT < cchScript && Character.isDigit(script.charAt(ichT))) ++ichT; if (ichBeginDigits == ichT) return false; @@ -713,16 +705,15 @@ ++ichT; break; default: - if ((ch < 'a' || ch > 'z') && (ch < 'A' && ch > 'Z') && ch != '_') + if (!Character.isLetter(ch) && ch != '_') return false; case '?': // include question marks in identifier for atom expressions while (ichT < cchScript && - (isAlphabetic(ch = script.charAt(ichT)) || - isDigit(ch) || - ch == '_' || ch == '?') || + (Character.isLetterOrDigit(ch = script.charAt(ichT)) + || ch == '_' || ch == '?') || // hack for insertion codes embedded in an atom expression :-( // select c3^a - (ch == '^' && ichT > ichToken && isDigit(script.charAt(ichT - 1))) + (ch == '^' && ichT > ichToken && Character.isDigit(script.charAt(ichT - 1))) ) ++ichT; break; Modified: trunk/Jmol/src/org/jmol/viewer/Eval.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-10-31 18:19:14 UTC (rev 6064) +++ trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-11-01 01:22:14 UTC (rev 6065) @@ -936,38 +936,37 @@ case Token.pyrimidine: stack[sp++] = viewer.getAtomBits((String) instruction.value); break; + case Token.spec_atom: + stack[sp++] = viewer + .getAtomBits("SpecAtom", (String) instruction.value); + break; case Token.spec_name_pattern: stack[sp++] = viewer .getAtomBits("SpecName", (String) instruction.value); break; + case Token.spec_alternate: + stack[sp++] = viewer.getAtomBits("SpecAlternate", + (String) instruction.value); + break; + case Token.spec_model: + stack[sp++] = viewer.getAtomBits("SpecModel", + (String) instruction.value); + break; case Token.spec_resid: stack[sp++] = viewer.getAtomBits("SpecResid", instruction.intValue); break; case Token.spec_seqcode: stack[sp++] = viewer.getAtomBits("SpecSeqcode", instruction.intValue); break; + case Token.spec_chain: + stack[sp++] = viewer.getAtomBits("SpecChain", instruction.intValue); + break; case Token.spec_seqcode_range: int seqcodeA = instruction.intValue; int seqcodeB = ((Integer) instruction.value).intValue(); stack[sp++] = viewer.getAtomBits("SpecSeqcodeRange", new int[] { seqcodeA, seqcodeB }); break; - - case Token.spec_chain: - stack[sp++] = viewer.getAtomBits("SpecChain", instruction.intValue); - break; - case Token.spec_atom: - stack[sp++] = viewer - .getAtomBits("SpecAtom", (String) instruction.value); - break; - case Token.spec_alternate: - stack[sp++] = viewer.getAtomBits("SpecAlternate", - (String) instruction.value); - break; - case Token.spec_model: - stack[sp++] = viewer.getAtomBits("SpecModel", - (String) instruction.value); - break; case Token.cell: Point3f pt = (Point3f) instruction.value; stack[sp++] = viewer.getAtomBits("Cell", new int[] { @@ -1025,64 +1024,14 @@ // identifiers must be handled as a hack // the expression 'select c1a' might be [c]1:a or might be a 'define c1a // ...' - BitSet bsDefinedSet = lookupValue(identifier, false); - if (bsDefinedSet != null) - return copyBitSet(bsDefinedSet); // identifier had been previously - // defined - // Logger.error("undefined & trying specname with:" + identifier); - // determine number of leading alpha characters - int alphaLen = 0; - int len = identifier.length(); - while (alphaLen < len && Compiler.isAlphabetic(identifier.charAt(alphaLen))) - ++alphaLen; - if (alphaLen > 3) + + // defined sets: + BitSet bs = lookupValue(identifier, false); + if (bs != null) // identifier had been previously defined + return copyBitSet(bs); + if ((bs = viewer.getAtomBits("IdentifierOrNull", identifier)) == null) undefinedVariable(identifier); - String potentialGroupName = identifier.substring(0, alphaLen); - // Logger.debug("potentialGroupName=" + potentialGroupName); - // undefinedVariable(); - BitSet bsName = viewer - .getAtomBits("PotentialGroupName", potentialGroupName); - if (bsName == null) - undefinedVariable(identifier); - if (alphaLen == len) - return bsName; - // - // look for a sequence code - // for now, only support a sequence number - // - int seqcodeEnd = alphaLen; - while (seqcodeEnd < len && Compiler.isDigit(identifier.charAt(seqcodeEnd))) - ++seqcodeEnd; - int seqNumber = 0; - try { - seqNumber = Integer.parseInt(identifier.substring(alphaLen, seqcodeEnd)); - } catch (NumberFormatException nfe) { - undefinedVariable(identifier); -// evalError("identifier parser error #373"); - } - char insertionCode = ' '; - if (seqcodeEnd < len && identifier.charAt(seqcodeEnd) == '^') { - ++seqcodeEnd; - if (seqcodeEnd == len) - evalError(GT._("invalid insertion code")); - insertionCode = identifier.charAt(seqcodeEnd++); - } - int seqcode = Group.getSeqcode(seqNumber, insertionCode); - BitSet bsSequence = viewer.getAtomBits("SpecSeqcode", seqcode); - BitSet bsNameSequence = bsName; - bsNameSequence.and(bsSequence); - if (seqcodeEnd == len) - return bsNameSequence; - // - // look for a chain spec ... also alpha & part of an identifier ... :-( - // - char chainID = identifier.charAt(seqcodeEnd); - if (++seqcodeEnd != len) - undefinedVariable(identifier); - BitSet bsChain = viewer.getAtomBits("SpecChain", (int) chainID); - BitSet bsNameSequenceChain = bsNameSequence; - bsNameSequenceChain.and(bsChain); - return bsNameSequenceChain; + return bs; } BitSet lookupValue(String variable, boolean plurals) throws ScriptException { Modified: trunk/Jmol/src/org/jmol/viewer/Frame.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Frame.java 2006-10-31 18:19:14 UTC (rev 6064) +++ trunk/Jmol/src/org/jmol/viewer/Frame.java 2006-11-01 01:22:14 UTC (rev 6065) @@ -772,6 +772,23 @@ mmset.calculateStructures(); mmset.freeze(); } + + BitSet setConformation(int modelIndex, int conformationIndex) { + BitSet bs = new BitSet(); + String altLocs = getAltLocListInModel(modelIndex); + if (altLocs.length() > 0) { + BitSet bsConformation = getModelAtomBitSet(modelIndex); + if (conformationIndex >= 0) + for (int c = getAltLocCountInModel(modelIndex); --c >= 0;) + if (c != conformationIndex) + bsConformation.andNot(getSpecAlternate(altLocs.substring(c, c + 1))); + if (bsConformation.length() > 0) { + setConformation(modelIndex, bsConformation); + bs.or(bsConformation); + } + } + return bs; + } void setConformation(int modelIndex, BitSet bsConformation) { mmset.setConformation(modelIndex, bsConformation); @@ -1856,6 +1873,13 @@ return null; } + ///// this set of methods is used by Eval + + /** + * general unqualified lookup of atom set type + * @param setType + * @return BitSet; or null if we mess up the type + */ BitSet getAtomBits(String setType) { if (setType.equals("specialPosition")) return getSpecialPosition(); @@ -1884,41 +1908,18 @@ return null; } - BitSet getAtomBits(String setType, String specInfo) { - if (setType.equals("SpecAtom")) - return getSpecAtom(specInfo); - if (setType.equals("SpecName")) - return getSpecName(specInfo); - if (setType.equals("SpecResidueWildcard")) //never called? - return getResidueWildcard(specInfo); - if (setType.equals("SpecAlternate")) - return getSpecAlternate(specInfo); - if (setType.equals("SpecModel")) - return getSpecModel(specInfo); - if (setType.equals("PotentialGroupName")) - return lookupPotentialGroupName(specInfo); - return null; + private BitSet getSpecialPosition() { + BitSet bs = new BitSet(atomCount); + for (int i = atomCount; --i >= 0;) { + BitSet bsSym = atoms[i].getAtomSymmetry(); + if (bsSym != null && viewer.cardinalityOf(bsSym) > 1) + bs.set(i); + } + return bs; } - BitSet getAtomBits(String setType, int[] specInfo) { - if (setType.equals("SpecSeqcodeRange")) - return getSpecSeqcodeRange(specInfo[0], specInfo[1]); - if (setType.equals("Cell")) - return getCellSet(specInfo[0], specInfo[1], specInfo[2]); - return null; - } - - BitSet getCellSet(int ix, int jy, int kz) { + private BitSet getUnitCellSet() { BitSet bsCell = new BitSet(); - Point3f cell = new Point3f(ix / 1000f, jy / 1000f, kz / 1000f); - for (int i = atomCount; --i >= 0;) - if (atoms[i].isInLatticeCell(cell)) - bsCell.set(i); - return bsCell; - } - - BitSet getUnitCellSet() { - BitSet bsCell = new BitSet(); UnitCell unitcell = viewer.getCurrentUnitCell(); if (unitcell == null) return bsCell; @@ -1932,25 +1933,7 @@ return bsCell; } - BitSet getHeteroSet() { - BitSet bsHetero = new BitSet(); - for (int i = atomCount; --i >= 0;) - if (atoms[i].isHetero()) - bsHetero.set(i); - return bsHetero; - } - - BitSet getSpecialPosition() { - BitSet bs = new BitSet(atomCount); - for (int i = atomCount; --i >= 0;) { - BitSet bsSym = atoms[i].getAtomSymmetry(); - if (bsSym != null && viewer.cardinalityOf(bsSym) > 1) - bs.set(i); - } - return bs; - } - - BitSet getSymmetrySet() { + private BitSet getSymmetrySet() { //presumption here is that one cannot DELETE atoms BitSet bs = new BitSet(atomCount); for (int i = atomCount; --i >= 0;) @@ -1966,122 +1949,258 @@ return bs; } - - BitSet getHydrogenSet() { - BitSet bsHydrogen = new BitSet(); + private BitSet getHeteroSet() { + BitSet bs = new BitSet(); + for (int i = atomCount; --i >= 0;) + if (atoms[i].isHetero()) + bs.set(i); + return bs; + } + + private BitSet getHydrogenSet() { + BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) { if (atoms[i].getElementNumber() == 1) - bsHydrogen.set(i); + bs.set(i); } - return bsHydrogen; + return bs; } - BitSet getProteinSet() { - BitSet bsProtein = new BitSet(); + private BitSet getProteinSet() { + BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) if (atoms[i].isProtein()) - bsProtein.set(i); - return bsProtein; + bs.set(i); + return bs; } - BitSet getCarbohydrateSet() { - BitSet bsCHO = new BitSet(); + private BitSet getCarbohydrateSet() { + BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) if (atoms[i].isCarbohydrate()) - bsCHO.set(i); - return bsCHO; + bs.set(i); + return bs; } - BitSet getNucleicSet() { - BitSet bsNucleic = new BitSet(); + private BitSet getNucleicSet() { + BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) if (atoms[i].isNucleic()) - bsNucleic.set(i); - return bsNucleic; + bs.set(i); + return bs; } - BitSet getDnaSet() { - BitSet bsDna = new BitSet(); + private BitSet getDnaSet() { + BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) if (atoms[i].isDna()) - bsDna.set(i); - return bsDna; + bs.set(i); + return bs; } - BitSet getRnaSet() { - BitSet bsRna = new BitSet(); + private BitSet getRnaSet() { + BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) if (atoms[i].isRna()) - bsRna.set(i); - return bsRna; + bs.set(i); + return bs; } - BitSet getPurineSet() { - BitSet bsPurine = new BitSet(); + private BitSet getPurineSet() { + BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) if (atoms[i].isPurine()) - bsPurine.set(i); - return bsPurine; + bs.set(i); + return bs; } - BitSet getPyrimidineSet() { - BitSet bsPyrimidine = new BitSet(); + private BitSet getPyrimidineSet() { + BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) if (atoms[i].isPyrimidine()) - bsPyrimidine.set(i); - return bsPyrimidine; + bs.set(i); + return bs; } + + /** + * general lookup for String type + * @param setType + * @param specInfo + * @return BitSet or null in certain cases + */ + BitSet getAtomBits(String setType, String specInfo) { + if (setType.equals("IdentifierOrNull")) + return getIdentifierOrNull(specInfo); + if (setType.equals("SpecAtom")) + return getSpecAtom(specInfo, true); + if (setType.equals("SpecName")) + return getSpecName(specInfo); + if (setType.equals("SpecAlternate")) + return getSpecAlternate(specInfo); + if (setType.equals("SpecModel")) + return getSpecModel(specInfo); + return null; + } - BitSet getAtomBits(String setType, int specInfo) { - if (setType.equals("SpecResid")) - return getSpecResid(specInfo); - if (setType.equals("SpecSeqcode")) - return getSpecSeqcode(specInfo); - if (setType.equals("SpecChain")) - return getSpecChain((char) specInfo); - if (setType.equals("atomno")) - return getSpecAtomNumber(specInfo); + private BitSet getIdentifierOrNull(String identifier) { + //a primitive lookup scheme when [ ] are not used + //nam + //nam45 + //nam45C + //nam45^A + //nam45^AC -- note, no colon here -- if present, handled separately + + BitSet bs; + int pt = 0; + int len = identifier.length(); + while (pt < len && Character.isLetter(identifier.charAt(pt))) + ++pt; + if (pt > 3) + return null; + if ((bs = getSpecGroupNameOrNull(identifier.substring(0, pt))) == null) { + if ((bs = getSpecAtom(identifier, false)) != null) + return bs; + return null; + } + if (pt == len) + return bs; + // + // look for a sequence code + // for now, only support a sequence number + // + int pt0 = pt; + while (pt < len && Character.isDigit(identifier.charAt(pt))) + ++pt; + int seqNumber = 0; + try { + seqNumber = Integer.parseInt(identifier.substring(pt0, pt)); + } catch (NumberFormatException nfe) { + return null; + } + char insertionCode = ' '; + if (pt < len && identifier.charAt(pt) == '^') { + if (++pt == len) + return null; + insertionCode = identifier.charAt(pt); + } + int seqcode = Group.getSeqcode(seqNumber, insertionCode); + BitSet bsInsert = getSpecSeqcode(seqcode, false); + if (bsInsert == null) { + if (insertionCode != ' ') + bsInsert = getSpecSeqcode( + (identifier.toUpperCase()).charAt(pt), false); + if (bsInsert == null) + return null; + pt++; + } + bs.and(bsInsert); + if (pt == len) + return bs; + // + // look for a chain spec -- no colon + // + char chainID = identifier.charAt(pt++); + bs.and(getSpecChain(chainID)); + if (pt == len) + return bs; + // + // not applicable + // return null; } - BitSet getSpecName(String resNameSpec) { - BitSet bsRes = new BitSet(); + private BitSet getSpecAtom(String atomSpec, boolean returnEmpty) { + BitSet bs = new BitSet(); + boolean isEmpty = true; for (int i = atomCount; --i >= 0;) { + if (atoms[i].isAtomNameMatch(atomSpec)) { + bs.set(i); + isEmpty = false; + } + } + return (!isEmpty || returnEmpty ? bs : null); + } + + private BitSet getSpecName(String resNameSpec) { + BitSet bs = new BitSet(); + for (int i = atomCount; --i >= 0;) { if (atoms[i].isGroup3Match(resNameSpec)) - bsRes.set(i); + bs.set(i); } - return bsRes; + return bs; } - BitSet getSpecAtomNumber(int atomno) { - BitSet bsRes = new BitSet(); + private BitSet getSpecAlternate(String alternateSpec) { + BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) { - if (atoms[i].getAtomNumber() == atomno) - bsRes.set(i); + if (atoms[i].isAlternateLocationMatch(alternateSpec)) + bs.set(i); } - return bsRes; + return bs; } - BitSet getSpecResid(int resid) { - BitSet bsRes = new BitSet(); + private BitSet getSpecModel(String modelTag) { + int modelNumber = -1; + try { + modelNumber = Integer.parseInt(modelTag); + } catch (NumberFormatException nfe) { + } + return getModelAtomBitSet(getModelNumberIndex(modelNumber)); + } + + private BitSet getSpecGroupNameOrNull(String groupName) { + BitSet bs = null; for (int i = atomCount; --i >= 0;) { + if (atoms[i].isGroup3(groupName)) { + if (bs == null) + bs = new BitSet(i + 1); + bs.set(i); + } + } + return bs; + } + + /** + * general lookup for integer type -- from Eval + * @param setType + * @param specInfo + * @return bitset; null only if we mess up with name + */ + BitSet getAtomBits(String setType, int specInfo) { + if (setType.equals("SpecResid")) + return getSpecResid(specInfo); + if (setType.equals("SpecSeqcode")) + return getSpecSeqcode(specInfo, true); + if (setType.equals("SpecChain")) + return getSpecChain((char) specInfo); + if (setType.equals("atomno")) + return getSpecAtomNumber(specInfo); + return null; + } + + private BitSet getSpecResid(int resid) { + BitSet bs = new BitSet(); + for (int i = atomCount; --i >= 0;) { if (atoms[i].getGroupID() == resid) - bsRes.set(i); + bs.set(i); } - return bsRes; + return bs; } - BitSet getSpecSeqcode(int seqcode) { - BitSet bsResno = new BitSet(); + private BitSet getSpecSeqcode(int seqcode, boolean returnEmpty) { + BitSet bs = new BitSet(); int seqNum = (seqcode >> 8); + boolean isEmpty = true; char insCode = Group.getInsertionCode(seqcode); switch (insCode) { case '?': for (int i = atomCount; --i >= 0;) { int atomSeqcode = atoms[i].getSeqcode(); if ((seqNum == 0 || seqNum == (atomSeqcode >> 8)) - && (atomSeqcode & 0xFF) != 0) - bsResno.set(i); + && (atomSeqcode & 0xFF) != 0) { + bs.set(i); + isEmpty = false; + } } break; default: @@ -2089,100 +2208,65 @@ int atomSeqcode = atoms[i].getSeqcode(); if (seqcode == atomSeqcode || seqNum == 0 && seqcode == (atomSeqcode & 0xFF) || insCode == '*' - && seqNum == (atomSeqcode >> 8)) - bsResno.set(i); + && seqNum == (atomSeqcode >> 8)) { + bs.set(i); + isEmpty = false; + } } } - return bsResno; + return (!isEmpty || returnEmpty ? bs : null); } - BitSet getSpecChain(char chain) { + private BitSet getSpecChain(char chain) { boolean caseSensitive = viewer.getChainCaseSensitive(); if (!caseSensitive) chain = Character.toUpperCase(chain); - BitSet bsChain = new BitSet(); + BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) { char ch = atoms[i].getChainID(); if (!caseSensitive) ch = Character.toUpperCase(ch); if (chain == ch) - bsChain.set(i); + bs.set(i); } - return bsChain; + return bs; } - BitSet getSpecSeqcodeRange(int seqcodeA, int seqcodeB) { - BitSet bsResidue = new BitSet(); - selectSeqcodeRange(seqcodeA, seqcodeB, bsResidue); - return bsResidue; - } - - BitSet getSpecAtom(String atomSpec) { - BitSet bsAtom = new BitSet(); - for (int i = atomCount; --i >= 0;) { - if (atoms[i].isAtomNameMatch(atomSpec)) - bsAtom.set(i); - } - return bsAtom; - } - - BitSet getResidueWildcard(String strWildcard) { - BitSet bsResidue = new BitSet(); - for (int i = atomCount; --i >= 0;) { - if (atoms[i].isGroup3Match(strWildcard)) - bsResidue.set(i); - } - return bsResidue; - } - - BitSet getSpecAlternate(String alternateSpec) { + private BitSet getSpecAtomNumber(int atomno) { BitSet bs = new BitSet(); for (int i = atomCount; --i >= 0;) { - if (atoms[i].isAlternateLocationMatch(alternateSpec)) + if (atoms[i].getAtomNumber() == atomno) bs.set(i); } return bs; } - BitSet getSpecModel(String modelTag) { - int modelNumber = -1; - try { - modelNumber = Integer.parseInt(modelTag); - } catch (NumberFormatException nfe) { - } - return getModelAtomBitSet(getModelNumberIndex(modelNumber)); + /** + * general lookup involving a range + * @param setType + * @param specInfo + * @return BitSet; or null if mess up with type + */ + BitSet getAtomBits(String setType, int[] specInfo) { + if (setType.equals("SpecSeqcodeRange")) + return getSpecSeqcodeRange(specInfo[0], specInfo[1]); + if (setType.equals("Cell")) + return getCellSet(specInfo[0], specInfo[1], specInfo[2]); + return null; } - BitSet lookupPotentialGroupName(String potentialGroupName) { - BitSet bsResult = null; - for (int i = atomCount; --i >= 0;) { - if (atoms[i].isGroup3(potentialGroupName)) { - if (bsResult == null) - bsResult = new BitSet(i + 1); - bsResult.set(i); - } - } - return bsResult; - } - - BitSet getVisibleSiteBitSet(int atomIndex) { - // only from user picking - BitSet bs = getVisibleSet(); - int atomSite = atoms[atomIndex].atomSite; - for (int i = 0; i < atomCount; i++) - if (bs.get(i) && (atoms[i].atomSite != atomSite || atoms[i].madAtom == 0)) - bs.clear(i); + private BitSet getSpecSeqcodeRange(int seqcodeA, int seqcodeB) { + BitSet bs = new BitSet(); + mmset.selectSeqcodeRange(seqcodeA, seqcodeB, bs); return bs; } - BitSet getVisibleElementBitSet(int atomIndex) { - // only from user picking - BitSet bs = getVisibleSet(); - int n = atoms[atomIndex].getElementNumber(); - for (int i = 0; i < atomCount; i++) - if (bs.get(i) - && (atoms[i].getElementNumber() != n || atoms[i].madAtom == 0)) - bs.clear(i); + private BitSet getCellSet(int ix, int jy, int kz) { + BitSet bs = new BitSet(); + Point3f cell = new Point3f(ix / 1000f, jy / 1000f, kz / 1000f); + for (int i = atomCount; --i >= 0;) + if (atoms[i].isInLatticeCell(cell)) + bs.set(i); return bs; } @@ -2610,22 +2694,6 @@ return n; } - BitSet getGroupBitSet(int atomIndex) { - BitSet bsGroup = new BitSet(); - atoms[atomIndex].group.selectAtoms(bsGroup); - return bsGroup; - } - - BitSet getChainBitSet(int atomIndex) { - BitSet bsChain = new BitSet(); - atoms[atomIndex].group.chain.selectAtoms(bsChain); - return bsChain; - } - - void selectSeqcodeRange(int seqcodeA, int seqcodeB, BitSet bs) { - mmset.selectSeqcodeRange(seqcodeA, seqcodeB, bs); - } - //////////////////////////////////////////////////////////////// final static int MAX_BONDS_LENGTH_TO_CACHE = 5; Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-10-31 18:19:14 UTC (rev 6064) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-11-01 01:22:14 UTC (rev 6065) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.88"; //jmolLoadInlineFiles() + public final static String version = "10.9.89"; //mostly minor fixes public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); Modified: trunk/Jmol/src/org/jmol/viewer/ModelManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/ModelManager.java 2006-10-31 18:19:14 UTC (rev 6064) +++ trunk/Jmol/src/org/jmol/viewer/ModelManager.java 2006-11-01 01:22:14 UTC (rev 6065) @@ -1405,21 +1405,7 @@ BitSet setConformation(int modelIndex, int conformationIndex) { if (frame == null) return null; - BitSet bsResult = new BitSet(); - String altLocs = getAltLocListInModel(modelIndex); - if (altLocs.length() > 0) { - BitSet bsConformation = getModelAtomBitSet(modelIndex); - if (conformationIndex >= 0) - for (int c = frame.getAltLocCountInModel(modelIndex); --c >= 0;) - if (c != conformationIndex) - bsConformation.andNot(frame.getSpecAlternate(altLocs.substring(c, - c + 1))); - if (bsConformation.length() > 0) { - frame.setConformation(modelIndex, bsConformation); - bsResult.or(bsConformation); - } - } - return bsResult; + return frame.setConformation(modelIndex, conformationIndex); } String getAltLocListInModel(int modelIndex) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-11-02 04:33:10
|
Revision: 6077 http://svn.sourceforge.net/jmol/?rev=6077&view=rev Author: hansonr Date: 2006-11-01 20:32:59 -0800 (Wed, 01 Nov 2006) Log Message: ----------- 10.9.90 new features: adds (experimental) set traceAlpha adds full * wildcard support for PDB residue names (not atom names) select H* and not HIS select [H*] and not HOH adds atom name support for non-PDB files, with wildcards: select C23 select C* select C? select C?? standard for ALL filetypes excluding mmCIF and PDB. Basically, mmCIF/PDB unbracketed designations are for residues; other files use atom names. This means that the default label you see on hover and atom labels and in pick callbacks can be used in all file formats for selecting atoms. bug fixes: re-enabling ~ in defined sets code: -compiler/eval/frame clean up Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2006-11-02 04:12:36 UTC (rev 6076) +++ trunk/Jmol/build.xml 2006-11-02 04:32:59 UTC (rev 6077) @@ -15,7 +15,7 @@ <property name="deprecation" value="off" /> <property name="optimization" value="off" /> - <property name="version" value="10.9.89" /> + <property name="version" value="10.9.90" /> <property name="tests.source.dir" value="source-tests" /> <property name="lib.dir" value="jars" /> Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-11-02 04:12:36 UTC (rev 6076) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2006-11-02 04:32:59 UTC (rev 6077) @@ -43,7 +43,7 @@ // for now, just update this by hand // perhaps use ant filter later ... but mth doesn't like it :-( public final static String copyright = "(C) 2006 Jmol Development"; - public final static String version = "10.9.89"; //mostly minor fixes + public final static String version = "10.9.90"; //mostly minor fixes public final static String cvsDate = "$Date$"; public final static String date = cvsDate.substring(7, 23); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |