Dear all,

this is some kind of feature addon for the Jmol filters:

The ADF filter obviously assumes all element symbols to be simple
strings. This is not always true following the ADF user guide

https://www.scm.com/doc.2016/ADF/Input/Atomic_coordinates.html?highlight=atoms

 were "atom types" are

***************************
AtomType

    The name of an atom type. It must begin with the standard one- or
two-character symbol for the chemical element (e.g. H, He, Li,...).
Optionally it may be appended by .text, where text is any string (not
containing delimiters). Examples: H, Mn.3, Cu.dz-new.
***************************

This feature is for example used in NMR coupling calculations when
re-defining special basis sets for some of the coupling atoms.

At the moment, the jmol parser apparently simply ignores atoms with
names such as "H.b" so they are just lacking in the final structure. I
suggest the following one line fix:

ADFReader.java

starting from line 159:

while (rd() != null && !line.startsWith(" -----")) {
      tokens = getTokens();
      if (tokens.length < 5)
        break;
      String symbol = tokens[1];
      /* +++++++++++++ADD THIS++++++++++++++ */
      if(symbol.contains("."))
      {
        symbol = symbol.split("\\.")[0];
      }
      /* +++++++++++++ADD THIS++++++++++++++ */
      if (JmolAdapter.getElementNumber(symbol) < 1)
        nXX++;
      else
        addAtomXYZSymName(tokens, pt0, symbol, null);
    }

This will just split off the things after the period and proceed with
the element symbol as usual and works for me on my local files with
"H.b" atoms.


best

Georg










-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 PD Dr. Georg Eickerling
 Universität Augsburg
 Institut für Physik
 Lehrstuhl für Chemische Physik und Materialwissenschaften
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to