Dear Bob, I modified successfully the org.jmol.adapter.smarter.Resolver.java, this way Jmol should be able to recognize CRYSTAL output. Then I started thinking as how to create the reader for crystal. So far I just went trough the other files like Wien2kReader.java and CastepReader.java. Since crystal outputs end up more or less as below
FINAL OPTIMIZED GEOMETRY - DIMENSIONALITY OF THE SYSTEM 3 (NON PERIODIC DIRECTION: LATTICE PARAMETER FORMALLY SET TO 500) ******************************************************************************* LATTICE PARAMETERS (ANGSTROMS AND DEGREES) - BOHR = 0.5291772083 ANGSTROM PRIMITIVE CELL - CENTRING CODE 5/0 VOLUME= 31.338272 - DENSITY11.020 g/cm^3 A B C ALPHA BETA GAMMA 3.53885972 3.53885972 3.53885972 60.000000 60.000000 60.000000 ******************************************************************************* ATOMS IN THE ASYMMETRIC UNIT 1 - ATOMS IN THE UNIT CELL: 1 ATOM X/A Y/B Z/C ******************************************************************************* 1 T 282 PB 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 TRANSFORMATION MATRIX PRIMITIVE-CRYSTALLOGRAPHIC CELL -1.0000 1.0000 1.0000 1.0000 -1.0000 1.0000 1.0000 1.0000 -1.0000 ******************************************************************************* CRYSTALLOGRAPHIC CELL (VOLUME= 125.35308769) A B C ALPHA BETA GAMMA 5.00470341 5.00470341 5.00470341 90.000000 90.000000 90.000000 COORDINATES IN THE CRYSTALLOGRAPHIC CELL ATOM X/A Y/B Z/C ******************************************************************************* 1 T 282 PB 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 T = ATOM BELONGING TO THE ASYMMETRIC UNIT INFORMATION **** fort.34 **** GEOMETRY OUTPUT FILE DIRECT LATTICE VECTORS CARTESIAN COMPONENTS (ANGSTROM) X Y Z 0.000000000000E+00 0.250235170500E+01 0.250235170500E+01 0.250235170500E+01 0.000000000000E+00 0.250235170500E+01 0.250235170500E+01 0.250235170500E+01 0.000000000000E+00 I thought I could let Jmol read the following strings: 1) FINAL OPTIMIZED GEOMETRY which determines the final geometry 2) LATTICE PARAMETERS which opens the lattice parameter section 3) ATOMS IN THE ASYMMETRIC UNIT that starts the atomic coordinates section As you seethe numbers of lattice parameters and atomic coordinates are found two lines below. In addition the values of the lattice parameters and x y z per each atoms are on the same line, how can I tackle this problem reading line by line (as you did in Wien2kReader.java) ? Can you help me? Furthermore does jmol need the direct lattice vector to define the cell? Thank you -- Pieremanuele Canepa Room 104 School of Physical Sciences, Ingram Building, University of Kent, Canterbury, Kent, CT2 7NH United Kingdom ----------------------------------------------------------- ________________________________________ From: Robert Hanson [hans...@stolaf.edu] Sent: Tuesday, February 09, 2010 2:27 PM To: jmol-developers@lists.sourceforge.net Subject: Re: [Jmol-developers] Extend Jmol to crystal files That would be great. Please: 1) Check out the Jmol code using SVN/Eclipse. 2) Create your reader. Please add this to org.jmol.adapter.readers.xtal (unless it is XML, then use ....xml). Take a look at org.jmol.adapter.smarter.AtomSetCollectionReader.java to get a sense of what is going to happen in the reader. I can help if you get stuck. This mostly involves: (a) adding a bit of code to org.jmol.adapter.smarter.Resolver.java (b) copying one of the other readers as a template as CrystalReader.java (c) modifying the template as needed 3) Create a working patch and send it to us. This should be just two files -- Resolver.java and CrystalReader.java 4) I will check over your code, make sure it doesn't conflict with other readers, make sure it properly accounts for various options, and probably edit it a bit to be consistent with our styling. Then I will add it to Jmol 11.9.x Bob On Tue, Feb 9, 2010 at 5:19 AM, P.Canepa <pc...@kent.ac.uk<mailto:pc...@kent.ac.uk>> wrote: I am physic PhD student and I am willing to contribute to the development of Jmol. Reading trough Jmol web-page I realized that it is already capable to save file for other famous period code such as: CASTEP, WIEN2k, VASP, etc... I would like to extend it to CRYSTAL09, the periodic code developed at the University of Turin, Italy (http:\\www.crystal.unito.it<http://www.crystal.unito.it>). I have a bit of experience with java (especially java swing) and I use daily CRYSTAL . Can you give me some hint as to start developing class to deal with crystal files? Many Thanks, Piero -- Pieremanuele Canepa Room 104 School of Physical Sciences, Ingram Building, University of Kent, Canterbury, Kent, CT2 7NH United Kingdom ----------------------------------------------------------- ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net<mailto:Jmol-developers@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/jmol-developers -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 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 ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers