Menu

#32 Bond orders are not properly read from _ccdc_geom_bond_type tag (CIF files)

v1
closed
nobody
None
5
2016-09-06
2016-02-15
No

Dear developers,

there is a bug in CifReader.java (trunk) stopping the bond orders from being read from _ccdc_geom_bond_type tag (CIF files). Please find a patch pasted as output of 'svn diff' below:

Index: src/org/jmol/adapter/readers/cif/CifReader.java
===================================================================
--- src/org/jmol/adapter/readers/cif/CifReader.java (revision 20961)
+++ src/org/jmol/adapter/readers/cif/CifReader.java (working copy)
@@ -1528,7 +1528,7 @@
     String name1, name2 = null;
     while (parser.getData()) {
       if ((asc.getAtomIndex(name1 = getField(GEOM_BOND_ATOM_SITE_LABEL_1))) < 0
-          || (asc.getAtomIndex(getField(GEOM_BOND_ATOM_SITE_LABEL_2))) < 0)
+          || (asc.getAtomIndex(name2 = getField(GEOM_BOND_ATOM_SITE_LABEL_2))) < 0)
         continue;
       float dx = 0;
       String sdist = getField(GEOM_BOND_DISTANCE);

Best,
Andrius

Discussion

  • Bob Hanson

    Bob Hanson - 2016-02-15

    Thank you -- good catch! Note that this affects only CIF files having the _ccdc_geom_bond_type tag, as pointed out aready. This bug was introduced in Jmol 14.3.16_2015.08.11 (Aug 11, 2015). It will be corrected in the next update.

     
    • Andrius Merkys

      Andrius Merkys - 2016-02-17

      Thank you for the prompt reply and incorporation of the patch!

       
  • Bob Hanson

    Bob Hanson - 2016-09-06
    • status: open --> closed
     
  • Bob Hanson

    Bob Hanson - 2016-09-06

    fixed long ago

     

Log in to post a comment.