Patches item #2841139, was opened at 2009-08-20 16:41
Message generated for change (Comment added) made by j-meyer
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379135&aid=2841139&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: File IO
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Joerg Meyer (j-meyer)
Assigned to: Nobody/Anonymous (nobody)
Summary: file reader for CASTEP and AIMS input files

Initial Comment:
I have added two readers for input files, which make use of the periodic 
boundary conditions (PBC) infrastructure of Jmol
- CASTEP: http://www.castep.org (.cell files - only PBC)
- FHI-aims: http://www.fhi-berlin.mpg.de/aims/ (geometry.in files - both 
cluster models and PBCs)
Using the signed applet, the readers can be tried here
http://w3.rz-berlin.mpg.de/~meyer/jmol-demo-20090819/

----------------------------------------------------------------------

Comment By: Joerg Meyer (j-meyer)
Date: 2009-08-25 19:07

Message:
Just noticed that revision 11359 compiles nicely with sun-jdk-1.6.0_15-b03
(64bit)
including changes below, but crashes even without changes below (!) when
trying
to run java -jar Jmol.jar:

uncaught exception: java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
        at org.jmol.viewer.StateManager.<clinit>(StateManager.java:487)
        at org.jmol.viewer.Viewer.<init>(Viewer.java:248)
        at org.jmol.viewer.Viewer.allocateViewer(Viewer.java:310)
        at org.jmol.api.JmolViewer.allocateViewer(JmolViewer.java:90)
        at
org.openscience.jmol.app.jmolpanel.JmolPanel.<init>(JmolPanel.java:150)
        at org.openscience.jmol.app.Jmol.<init>(Jmol.java:36)
        at
org.openscience.jmol.app.jmolpanel.JmolPanel.getJmol(JmolPanel.java:358)
        at
org.openscience.jmol.app.jmolpanel.JmolPanel.startJmol(JmolPanel.java:293)
        at org.openscience.jmol.app.Jmol.main(Jmol.java:41)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
range: 23
        at java.lang.String.substring(String.java:1934)
        at org.jmol.viewer.JmolConstants.<clinit>(JmolConstants.java:80)
        ... 9 more
Exception in thread "main" java.lang.NullPointerException
        at
org.openscience.jmol.app.jmolpanel.JmolPanel.startJmol(JmolPanel.java:304)
        at org.openscience.jmol.app.Jmol.main(Jmol.java:41)

Hence changes are untested!

----------------------------------------------------------------------

Comment By: Joerg Meyer (j-meyer)
Date: 2009-08-25 19:00

Message:
1.) Based on the files you checked into 11.8, I added some comments at the
top
as requested and did some further changes as detailed in the following.
Resulting files
   CastepReader.20090825.java 
   AimsReader.20090825.java 
are attached.

2.) Strange - for some reason it seemed to work in 11.6.
Looking at your change (which makes perfect sense to avoid the warning)
I wonder why it actually does...

3.) I see your point. There are no official specs (yet) for FHI-aims
geometry.in files.
The code is written in Fortran, and hence you can easily exchange the tabs
for spaces
without the Fortran IO system (in list mode) bothering. In fact I just
convinced myself
that both "atom" and "lattice_vector" keywords must be lower case to be
accepted by
aims. To eliminate the collision with PBD, could you please change the
checkAims 
method in Resolver.java accordingly, to e.g.

      // FHI-aims only accepts keywords which are lower case - 
      // hence no conflict with PDB reader (which require upper case
"ATOM")
      if ( tokens[0].startsWith("atom") ) return true;
      if ( tokens[0].startsWith("lattice_vector") ) return true;


----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-08-25 16:05

Message:
The proposed AIMS reader breaks PDB format. We can't allow "atom" to be a
marker, because "ATOM" is a marker for PDB files. So, if you want to read
these files, you must force the filetype using

load "aims::xxxx.in"

I can't find specs for that file type. Why are there tabs in the line? Can
we specify that "atom" must be lower case? (PDB must be upper case ATOM)

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-08-24 18:11

Message:
%BLOCK POSITIONS_ABS
ang

was causing a warning  -- I've changed that. Please check out the 11.8.RC6
code that I have just checked in and work from that if you can now.

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-08-24 17:36

Message:
OK, I'm onto this. Please provide some comment text with http references,
for example:

/**
 * Gaussian cube file format
 * 
 * http://www.cup.uni-muenchen.de/oc/zipse/lv18099/orb_MOLDEN.html
 * this is good because it is source code
 * http://ftp.ccl.net/cca/software/SOURCES/C/scarecrow/gcube2plt.c
 *
 *
http://www.nersc.gov/nusers/resources/software/apps/chemistry/gaussian/g98/00000430.htm
 *
 * distances are in Bohrs because we are reading Gaussian cube OUTPUT
files
 * not Gaussian cube INPUT files. 
 *
 * Miguel 2005 07 17
 * a negative atom count means
 * that it is molecular orbital (MO) data
 * with MO data, the extra line contains the number
 * of orbitals and the orbital number
 * 
 * these orbitals are interspersed -- all orbital values are
 * given together for each coordinate point.
 * 
 * also used for JVXL and JVXL+ file format
 * 
 */


----------------------------------------------------------------------

Comment By: Joerg Meyer (j-meyer)
Date: 2009-08-24 13:59

Message:
Sorry - haven't thought about the fact that patch components 
against empty files cannot be conveniently extracted when 
trying to modify your current development version - I just 
wanted to have the functionality added to a stable release
(which will be available from the AIMS web page quite soon).

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-08-23 07:51

Message:
Please send the .java files; I have to patch these into 11.8, not 11.6.
Thanks.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379135&aid=2841139&group_id=23629

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to