Hello,

ABINITReader is now able to read the energy of a frame.
The attached file was generated using "cvs diff ABINITReader.java >
ABINITReader.java.diff". Is it the right way?

Fabian



-- 


**********
Fabian Dortu

Phone   : 32-475-599268
e-mail : [EMAIL PROTECTED]
*********************************************** 


Index: ABINITReader.java
===================================================================
RCS file: /cvsroot/jmol/Jmol/src/org/openscience/jmol/ABINITReader.java,v
retrieving revision 1.5
diff -r1.5 ABINITReader.java
346c346
< 
---
>     String energy = "";
480,483c480
<           && nextAbinitToken(false).equals("coordinates")) {
< 
< 
< 
---
> 		 && nextAbinitToken(false).equals("coordinates")) {
492c489,499
< 
---
>       } else if (fieldVal.equals("At") &&
> 		 nextAbinitToken(false).equals("the")){
> 	//Read: "end of Broyden step  0, total energy=" (7 tokens)
> 	for (int i=0; i<7; i++) {
> 	  nextAbinitToken(false); 
> 	}
> 	nextAbinitToken(false);
> 	energy = fieldVal;
> 	
> 	//Energy is the last thing to be read --> store data
> 	
503c510
<         crystalFile.setUnitCellBox(unitCellBox);
---
> 	crystalFile.setUnitCellBox(unitCellBox);
507,510c514,521
<         crystalFile.generateCrystalFrame();
< 
< 
<       }                            //end if "Cartesian coordinates"
---
> 		
> 	//generate the frame
> 	crystalFile.generateCrystalFrame();
> 	
> 	//Add the Energy Property to the frame
> 	crystalFile.getFrame(crystalFile.getNumberOfFrames()-1)
> 	  .addProperty(new Energy(FortranFormat.atof(energy)));
>       } //end if "Cartesian coordinates"

Attachment: signature.asc
Description: PGP signature

Reply via email to