Piero,

Please send a few sample files.
Notes below.

Bob

On Sat, Feb 13, 2010 at 6:20 AM, P.Canepa <[email protected]> wrote:

> Dear Bob
>
> So far with the code I worked out I can correctly see my atom within Jmol.
> What I miss are cell parameters on the top -left corner and the cell box as
> well! Should I call another function somewhere which print them?
>

This only comes up automatically if there is a unit cell and the coordinates
are fractional. If not, you have to issue

unitcell on



> Further CRYSTAL uses to remove the periodicy  in  SLAB or POLYMER. the
> former keep periodic just  2 dimensions while the latter  just 1, which in
> nutshell means  having the Z (for slab) and Y and Z (for polymer) expresses
> as Cartesian  coordinates since the periodicity is reduced! Does Jmol has
> already implemented this type of sytem,  should I work out a way to tackle
> it ?
>
>
I think the best way to think about periodicity is to simply load different
sets of unit cells:


load xxxx.xtal {3 3 1}

for instance.





> Crystal can also calculate vibrational frequency in Gamma as Gaussian03/09!
> Do you have some hint as to let Jmol  plot them?
>
>
There are readers that show vibrations. Each vibration is created as a
separate model. See, for example, XyzReader.java




> Thanks a lot and have a Good Weekend, Piero
>
>
>
> public class CrystalReader extends AtomSetCollectionReader{
>
>  float a;
>  float b;
>  float c;
>  float alpha;
>  float beta ;
>  float gamma;
>
>
>
>  public void readAtomSetCollection(BufferedReader reader) {
>
>    atomSetCollection = new AtomSetCollection("Crystal0X_output", this);
>    try{
>      this.reader = reader;
>      atomSetCollection.setCollectionName(readLine());
>     readSystem();
>
>    }catch (Exception e) {
>      setError(e);
>    }
>  }
>  private void readSystem() throws Exception{
>   do{
>     readLine();
>     if(line.startsWith("MOLECULE")){
>     setFractionalCoordinates(false);
>     readAtomCoords();
>     break;
>     }
>     if (line.startsWith("CRYSTAL")|| line.startsWith("SLAB")||
>     line.startsWith("POLYMER") || line.startsWith("EXTERNAL") ){
>
>       setFractionalCoordinates(true);
>
>      readCellParams();
>      readAtomCoords();
>       break;
>     }
>     }while(line != null);
>
>  }
>
>
>  private void readCellParams()  throws Exception{
>
>  do{
>     readLine();
>
>     if(line.startsWith(" PRIMITIVE CELL")){
>       readLine();
>       readLine();
>       a = parseFloat(line.substring(2,17)) ;
>       b = parseFloat(line.substring(18,33)) ;
>       c = parseFloat(line.substring(34,42)) ;
>       alpha =  parseFloat(line.substring(43,60)) ;
>       beta =  parseFloat(line.substring(61,71)) ;
>       gamma =  parseFloat(line.substring(72,80)) ;
>      //this method works fine so far
>       setFractionalCoordinates(true);
>       setUnitCell(a, b, c, alpha, beta, gamma);
>
>      break;
>     }
>   }while (line != null);
>  }
>
>  private void readAtomCoords() throws Exception{
>   setFractionalCoordinates(true);
>   do{
>     readLine();
>     if(line.startsWith(" ATOMS IN THE ASYMMETRIC")){
>       int numberAtoms = parseInt(line.substring(61,65));
>
>       readLine();
>       readLine();
>
>       int j=0;
>      for(int i=0; i<numberAtoms ; i++){
>        readLine();
>        addNewatom();
>        String atomName = line.substring(8,11);
>        String sym =atomName.substring(0,2).trim();
>
>      int atomicnumber = parseInt(sym);
>      Atom atom = atomSetCollection.getAtom(i);
>      sym =getElementSymbol(atomicnumber);
>      atom.elementSymbol=sym ;
>      atom.atomName= atomName + "_" + (j++);
>
>      }
>       break;
>       }
>   }while (line != null);
>  }
>  private void addNewatom(){
>   float x = parseFloat(line.substring(15,35));
>   float y = parseFloat(line.substring(36,55));
>   float z = parseFloat(line.substring(56,75));
>   Atom atom=atomSetCollection.addNewAtom();
>   setAtomCoord(atom, x, y,z);
>
>  }
>
> }
>
>
>
> --
> Pieremanuele Canepa
> Room 104
> Functional Material Group
> School of Physical Sciences, Ingram Building,
> University of Kent, Canterbury, Kent,
> CT2 7NH
> United Kingdom
>
> e-mail: [email protected]
> mobile: +44 (0) 7772-9756456
> -----------------------------------------------------------
>
> ------------------------------------------------------------------------------
> 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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to