Jmol.___JmolVersion="14.20.1"

bug fix: ADF reader not accepting Xx.name atom ids


This reads N.test as symbol="N" and name="N.text"




On Mon, Jul 3, 2017 at 7:20 AM, Georg Eickerling <
georg.eickerl...@physik.uni-augsburg.de> wrote:

> 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
>



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
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