Revision: 20849
          http://sourceforge.net/p/jmol/code/20849
Author:   hansonr
Date:     2015-10-28 03:41:32 +0000 (Wed, 28 Oct 2015)
Log Message:
-----------


Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/adapter/readers/xml/XmlOdysseyReader.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/jmol/adapter/readers/xml/XmlOdysseyReader.java
===================================================================
--- trunk/Jmol/src/org/jmol/adapter/readers/xml/XmlOdysseyReader.java   
2015-10-28 03:40:52 UTC (rev 20848)
+++ trunk/Jmol/src/org/jmol/adapter/readers/xml/XmlOdysseyReader.java   
2015-10-28 03:41:32 UTC (rev 20849)
@@ -43,8 +43,11 @@
   private String[] myAttributes = { "id", "label", //general 
       "xyz", "element", "hybrid", //atoms
       "a", "b", "order", //bond
+      "charge", // group 
+      "entity", // member
       "box" // boundary
   };
+  private int formalCharge = Integer.MIN_VALUE;
 
   public XmlOdysseyReader() {
   }
@@ -63,11 +66,11 @@
     }
 
     if ("atom".equals(localName)) {
-      atom = new Atom();
-      if (atts.containsKey("label"))
-        atom.atomName = atts.get("label");
-      else
-        atom.atomName = atts.get("id");
+      String id = atts.get("id");
+      (atom = new Atom()).atomName = atts
+          .get(atts.containsKey("label") ? "label" : "id");
+      if (id != null && stateScriptVersionInt >= 140400)
+        asc.atomSymbolicMap.put(id, atom);
       if (atts.containsKey("xyz")) {
         String xyz = atts.get("xyz");
         String[] tokens = PT.getTokens(xyz);
@@ -77,7 +80,6 @@
       if (atts.containsKey("element")) {
         atom.elementSymbol = atts.get("element");
       }
-
       return;
     }
     if ("bond".equals(localName)) {
@@ -89,7 +91,19 @@
       asc.addNewBondFromNames(atom1, atom2, order);
       return;
     }
-
+    if ("group".equals(localName)) {
+      String charge = atts.get("charge");
+      if (charge != null && charge.indexOf(".") < 0) {
+        formalCharge = PT.parseInt(charge);
+      }
+      return;
+    }
+    if ("member".equals(localName) && formalCharge != Integer.MIN_VALUE) {
+      Atom atom = asc.getAtomFromName(atts.get("entity"));
+      if (atom != null)
+        atom.formalCharge = formalCharge;
+      return;
+    }
     if ("boundary".equals(localName)) {
       String[] boxDim = PT.getTokens(atts.get("box"));
       float x = parseFloatStr(boxDim[0]);
@@ -115,7 +129,6 @@
       parent.applySymmetryAndSetTrajectory();
       return;
     }
-
     if ("odyssey_simulation".equals(localName)) {
       if (modelName != null && phase != null)
         modelName += " - " + phase;
@@ -155,13 +168,13 @@
       atom = null;
       return;
     }
-    if ("title".equals(localName)) {
+    if ("group".equals(localName)) {
+      formalCharge = Integer.MIN_VALUE;
+    } else if ("title".equals(localName)) {
       modelName = chars;
-    }
-    if ("formula".equals(localName)) {
+    } else if ("formula".equals(localName)) {
       formula = chars;
-    }
-    if ("phase".equals(localName)) {
+    } else if ("phase".equals(localName)) {
       phase = chars;
     }
     keepChars = false;

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-10-28 03:40:52 UTC 
(rev 20848)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-10-28 03:41:32 UTC 
(rev 20849)
@@ -64,8 +64,16 @@
 
 TODO: working on ID for polyhedra without atom refs
 
-Jmol.___JmolVersion="14.5.0_2015.10.27"
+Jmol.___JmolVersion="14.5.0_2015.10.28"
 
+bug fix: XODYDATA file reader does not read bond info or formal charge // 
changes in 14.4.0_2015.10.28
+
+FEATURE CHANGE: default RCSB/PDB load format (=xxxx) changed to 
http://ftp.wwpdb.org/pub/pdb/data/structures/divided/pdb/%c2%c3/pdb%file.ent.gz
+
+new feature: (JSmol) adding access-allow-origin status for cdn.rcsb.org and 
ftp.wwpdb.org.
+ 
+JmolVersion="14.5.0_2015.10.27"
+
 code: unnecessary FRAME commands removed from state
 bug fix: polyhedra not read from state (14.5 only)
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to