Re: [SIESTA-L] grid2cube error

2008-10-21 Thread Javad Hashemi

Hi Edan

Thanks for your help

Javad





On Tue, 21 Oct 2008, Edan Scriven wrote:


Javad,

The code is converting your lattice vectors from Angstroms to Bohrs (watch
out for this with things like nuclear positions too). I don't know what's
going on with your recompiled grid2cube problem, but on the plus side you
can ignore it and go back to the older build that gave you the right
answer.


Edan.



Dear SIESTA users,
Hello and good day!

I am trying to get the isosurface of a nanotube usind grid2cube tool and

LDOS.

The problem is that I am getting wrong values for my unit-cell vectors like
   75.58907511097422 0.000 0.000
   0.000 56.69180633323067 0.000
   0.000 0.000 37.24840648781031


while my unit-cell vectors are
40.000 0.  0.
0. 30.000  0.
0. 0.  19.7110

snipped



[SIESTA-L] grid2cube error

2008-10-20 Thread Javad Hashemi

Dear SIESTA users,
Hello and good day!

I am trying to get the isosurface of a nanotube usind grid2cube tool and 
LDOS.
The problem is that I am getting wrong values for my unit-cell vectors 
like

75.58907511097422 0.000 0.000
0.000 56.69180633323067 0.000
0.000 0.000 37.24840648781031


while my unit-cell vectors are
 40.000 0.  0.
 0. 30.000  0.
 0. 0.  19.7110



I compiled the grid2cube.f with pgf95 (compilation with the gfortran gave 
me some very wired result


   5.331830853490903E-315   0.000.00
   4.082735856457724E-173  5.329709582640484E-315   0.00
   0.00  -9.856650941703802E+041  1.533163531276712E-312


and ended up with the following  error
  ERROR: this progam can only handle orthogonal cells
  with vectors pointing in the X, Y and Z directions

Can anyone help me with this?

Regards
Javad


Re: [SIESTA-L] grid2cube error

2008-10-20 Thread Edan Scriven
Javad,

The code is converting your lattice vectors from Angstroms to Bohrs (watch
out for this with things like nuclear positions too). I don't know what's
going on with your recompiled grid2cube problem, but on the plus side you
can ignore it and go back to the older build that gave you the right
answer.


Edan.


 Dear SIESTA users,
 Hello and good day!

 I am trying to get the isosurface of a nanotube usind grid2cube tool and
LDOS.
 The problem is that I am getting wrong values for my unit-cell vectors like
75.58907511097422 0.000 0.000
0.000 56.69180633323067 0.000
0.000 0.000 37.24840648781031


 while my unit-cell vectors are
 40.000 0.  0.
 0. 30.000  0.
 0. 0.  19.7110
snipped


[SIESTA-L] grid2cube

2007-03-30 Thread Saswata Bhattacharya
dear frnds,
when i use grid2cube it takes only normal XYZ coordinates..but if my original 
calculation is with Fractional coordinate with some other lattice vectors,then 
i can not use grid2cube..ir gives error..so what is the method so tht in any 
atomic coordinate format we can use grid2cube?please reply
regards,
Saswata


-
 Here’s a new way to find what you're looking for - Yahoo! Answers 

Re: [SIESTA-L] grid2cube

2005-07-04 Thread xianghjun

Andrei Postnikov wrote:


On Sun, 26 Jun 2005, xianghjun wrote:

| Dear Andrei Postnikov,
|  I have tried rho2xsf, and it works well.
| Now I want to plot the Fermi surface using Xcrysden.
| I learn that you have a program named ene2bxsf to do this job.
| Would you please send a copy of ene2bxsf to me?
| Thanks a lot.
| 
| Best regards,

| xianghjun

Dear Xianghjun,

please find in the attachment a code to calculate Fermi surface file
in Xcrysden. I did not check it extensively, but it seems to work
also with the version 1.4 (that with an additional option 
to plot several sheets of the Fermi surface in the same plot).

Please let me know if you encounter any problems.

Be sure that you use many enough k-points without shifting.

Good luck,

Andrei
 




C
C   ene2bxsf, a script to make the band-XSF file (for plotting
C the Fermi surface) from siesta KP and EIG files.
C The k-mesh must be generated without shift
C (requirement of the BXSF format).
C
C Written by Andrei Postnikov, Mar 2005
C [EMAIL PROTECTED]
C
 program ene2bxsf
 implicit none
 integer MKP,MNB
 parameter (MKP=8000,MNB=500)
 integer ii1,ii2,ii3,io1
 parameter (ii1=11,ii2=12,ii3=13,io1=14)
 integer ii,jj,nbands,nbmin,nbmax,nkp,ikp,ndum,iis,
.mdiv1,mdiv2,mdiv3,ndiv(3,MKP),ind,irrek(MKP),nspin,is,
.iband,iik,idiv1,idiv2,idiv3,itry1,itry2,itry3,ib,
.homo(2),lumo(2),ik,in2,in3
 character inpfil*60,outfil*60,syslab*30,suffix*6
 real*8 cell(3,3),efermi,twopi,rcell(3,3),small,relmin(3),
.   relk(3,MKP),kkp(3),eneb(MNB,2),enek(MKP),dum
 equivalence (eneb,enek)
 parameter (small=1.0d-04)
C
C string manipulation functions in Fortran used below:
C len_trim(string): returns the length of string 
C   without trailing blank characters,

C char(integer)   : returns the character in the specified position
C   of computer's ASCII table, i.e. char(49)=1
C
 twopi = 8.d0*atan(1.d0)
 write (6,701)
 701 format( Specify  SystemLabel (or 'siesta' if none): ,$)
 read (5,*) syslab
C --- open .XV and .EIG : 
 inpfil = syslab(1:len_trim(syslab))//'.XV'

 open (ii1,file=inpfil,form='formatted',status='old',err=801)
 write (6,*) 'Found and opened: ',inpfil
 inpfil = syslab(1:len_trim(syslab))//'.EIG'
 open (ii2,file=inpfil,form='formatted',status='old',err=801)
 write (6,*) 'Found and opened: ',inpfil
C --- read Fermi energy and total number of bands from .EIG :
 read  (ii2,*) efermi
 read  (ii2,*) nbands, nspin, nkp
 if (nbands.gt.MNB) then
   write (6,*) '  nbands=',nbands,' .gt. MNB=',MNB
   stop
 endif
 if (nspin.ne.1.and.nspin.ne.2) then
   write (6,*) 'A problem encountered: nspin=',nspin
   stop
 endif
 if (nkp.gt.MKP) then
   write (6,*) '  nkp=',nkp,' .gt. MKP=',MKP
   stop
 endif
C --- finds bands crossing the Fermi energy:
 do is=1,nspin
   homo(is)=0   !  higest (partially?) occupied band
   lumo(is)=nbands+1!  lowest (partially?) unoccupied band
 enddo
 write (6,*) '  nkp=',nkp,'  nbands=',nbands
 do ik=1,nkp
   read (ii2,(i5,10f12.5,/,(5x,10f12.5))) iik,   !  written in
.  ((eneb(ib,is),ib=1,nbands),is=1,min(nspin,2))   !  ioeif.f
   if (iik.ne.ik) then
 write (6,*) ' iik=',iik,'.ne. ik=',ik,' for spin ',is
 stop
   endif
   do is=1,nspin
 do ib=1,nbands
   if (eneb(ib,is).lt.efermi.and.ib.gt.homo(is)) homo(is) = ib
   if (eneb(ib,is).gt.efermi.and.ib.lt.lumo(is)) lumo(is) = ib
 enddo
   enddo
 enddo
 do is=1,nspin
   write (6,*) ' is=',is,'  homo, lumo=',homo(is),lumo(is)
   if (homo(is).lt.lumo(is)) write (6,201) is, homo(is),lumo(is)
 enddo

C --- read cell vectors from .XV, convert to Ang, find reciprocal:
 do ii=1,3
   read  (ii1,*,end=803,err=803)   (cell(ii,jj),jj=1,3)
 enddo
 close (ii1)
 call inver3(cell,rcell)
C write (6,*) ' cell:'
C do ii=1,3
C   write(6,'(3f15.6)')  (cell(ii,jj),jj=1,3)
C enddo
C write (6,*) ' rcell:'
C do ii=1,3
C   write(6,'(3f15.6)')  (rcell(ii,jj),jj=1,3)
C enddo

C --- open .KP as old:
 inpfil = syslab(1:len_trim(syslab))//'.KP'
 open (ii3,file=inpfil,form='formatted',status='old',err=801)
 write (6,*) 'Found and opened: ',inpfil
C --- read k-points from the .KP file and recover their fractional
C coordinates in terms of reciprocal vectors:
 read (ii3,*) nkp
 relmin(:)=1.d0/small
 do ikp=1,nkp
   read (ii3,*) iik,(kkp(jj),jj=1,3)
   if (iik.ne.ikp) then
 write (6,*) ' a mess in KP list: read in iik=',iik,
.', but expected ikp=',ikp
 stop
   endif
C ---   find relative coordinates of k-point:
   do ii=1,3
  

Re: [SIESTA-L] grid2cube

2005-06-27 Thread Andrei Postnikov
On Sun, 26 Jun 2005, xianghjun wrote:

| Dear Andrei Postnikov,
|  I have tried rho2xsf, and it works well.
| Now I want to plot the Fermi surface using Xcrysden.
| I learn that you have a program named ene2bxsf to do this job.
| Would you please send a copy of ene2bxsf to me?
| Thanks a lot.
| 
| Best regards,
| xianghjun

Dear Xianghjun,

please find in the attachment a code to calculate Fermi surface file
in Xcrysden. I did not check it extensively, but it seems to work
also with the version 1.4 (that with an additional option 
to plot several sheets of the Fermi surface in the same plot).
Please let me know if you encounter any problems.

Be sure that you use many enough k-points without shifting.

Good luck,

Andrei
C
C   ene2bxsf, a script to make the band-XSF file (for plotting
C the Fermi surface) from siesta KP and EIG files.
C The k-mesh must be generated without shift
C (requirement of the BXSF format).
C
C Written by Andrei Postnikov, Mar 2005
C [EMAIL PROTECTED]
C
  program ene2bxsf
  implicit none
  integer MKP,MNB
  parameter (MKP=8000,MNB=500)
  integer ii1,ii2,ii3,io1
  parameter (ii1=11,ii2=12,ii3=13,io1=14)
  integer ii,jj,nbands,nbmin,nbmax,nkp,ikp,ndum,iis,
 .mdiv1,mdiv2,mdiv3,ndiv(3,MKP),ind,irrek(MKP),nspin,is,
 .iband,iik,idiv1,idiv2,idiv3,itry1,itry2,itry3,ib,
 .homo(2),lumo(2),ik,in2,in3
  character inpfil*60,outfil*60,syslab*30,suffix*6
  real*8 cell(3,3),efermi,twopi,rcell(3,3),small,relmin(3),
 .   relk(3,MKP),kkp(3),eneb(MNB,2),enek(MKP),dum
  equivalence (eneb,enek)
  parameter (small=1.0d-04)
C
C string manipulation functions in Fortran used below:
C len_trim(string): returns the length of string 
C   without trailing blank characters,
C char(integer)   : returns the character in the specified position
C   of computer's ASCII table, i.e. char(49)=1
C
  twopi = 8.d0*atan(1.d0)
  write (6,701)
  701 format( Specify  SystemLabel (or 'siesta' if none): ,$)
  read (5,*) syslab
C --- open .XV and .EIG : 
  inpfil = syslab(1:len_trim(syslab))//'.XV'
  open (ii1,file=inpfil,form='formatted',status='old',err=801)
  write (6,*) 'Found and opened: ',inpfil
  inpfil = syslab(1:len_trim(syslab))//'.EIG'
  open (ii2,file=inpfil,form='formatted',status='old',err=801)
  write (6,*) 'Found and opened: ',inpfil
C --- read Fermi energy and total number of bands from .EIG :
  read  (ii2,*) efermi
  read  (ii2,*) nbands, nspin, nkp
  if (nbands.gt.MNB) then
write (6,*) '  nbands=',nbands,' .gt. MNB=',MNB
stop
  endif
  if (nspin.ne.1.and.nspin.ne.2) then
write (6,*) 'A problem encountered: nspin=',nspin
stop
  endif
  if (nkp.gt.MKP) then
write (6,*) '  nkp=',nkp,' .gt. MKP=',MKP
stop
  endif
C --- finds bands crossing the Fermi energy:
  do is=1,nspin
homo(is)=0   !  higest (partially?) occupied band
lumo(is)=nbands+1!  lowest (partially?) unoccupied band
  enddo
  write (6,*) '  nkp=',nkp,'  nbands=',nbands
  do ik=1,nkp
read (ii2,(i5,10f12.5,/,(5x,10f12.5))) iik,   !  written in
 .  ((eneb(ib,is),ib=1,nbands),is=1,min(nspin,2))   !  ioeif.f
if (iik.ne.ik) then
  write (6,*) ' iik=',iik,'.ne. ik=',ik,' for spin ',is
  stop
endif
do is=1,nspin
  do ib=1,nbands
if (eneb(ib,is).lt.efermi.and.ib.gt.homo(is)) homo(is) = ib
if (eneb(ib,is).gt.efermi.and.ib.lt.lumo(is)) lumo(is) = ib
  enddo
enddo
  enddo
  do is=1,nspin
write (6,*) ' is=',is,'  homo, lumo=',homo(is),lumo(is)
if (homo(is).lt.lumo(is)) write (6,201) is, homo(is),lumo(is)
  enddo

C --- read cell vectors from .XV, convert to Ang, find reciprocal:
  do ii=1,3
read  (ii1,*,end=803,err=803)   (cell(ii,jj),jj=1,3)
  enddo
  close (ii1)
  call inver3(cell,rcell)
C write (6,*) ' cell:'
C do ii=1,3
C   write(6,'(3f15.6)')  (cell(ii,jj),jj=1,3)
C enddo
C write (6,*) ' rcell:'
C do ii=1,3
C   write(6,'(3f15.6)')  (rcell(ii,jj),jj=1,3)
C enddo

C --- open .KP as old:
  inpfil = syslab(1:len_trim(syslab))//'.KP'
  open (ii3,file=inpfil,form='formatted',status='old',err=801)
  write (6,*) 'Found and opened: ',inpfil
C --- read k-points from the .KP file and recover their fractional
C coordinates in terms of reciprocal vectors:
  read (ii3,*) nkp
  relmin(:)=1.d0/small
  do ikp=1,nkp
read (ii3,*) iik,(kkp(jj),jj=1,3)
if (iik.ne.ikp) then
  write (6,*) ' a mess in KP list: read in iik=',iik,
 .', but expected ikp=',ikp
  stop
endif
C ---   find relative coordinates of k-point:
do ii=1,3
  relk(ii,ikp)=( 

Re: [SIESTA-L] grid2cube

2005-06-26 Thread xianghjun

Andrei Postnikov wrote:


Dear Miguel and Rudy (and all),

now that we are discussing this topic, I also have a script
to convert RHO and other grid properties into XCrysden format.
I attach a Fortran source and a README file.
Your suggestions and criticisms are welcome.

(Miguel: you did not attach your script in your mail,
at least it didn't go to the list).

For whoever is interested, I also have a tool to plot Fermi surfaces
from SIESTA data with XCrysden.
As you may figure out, a tool to transfer wavefunctions with XCrysden is
not yet ready.

Best regards,

Andrei Postnikov

+-- Dr. habil. Andrei Postnikov - Tel. +49-541-969.2377 -- Fax .2351 ---+
| Institut fuer Festkoerperforschung - FZ Juelich, D-52425 Juelich, Germany |
+-- [EMAIL PROTECTED] - http://www.home.uni-osnabrueck.de/apostnik/ --+

On Mon, 25 Apr 2005, Miguel Pruneda wrote:

| Dear Rudy (and all),
|
| As far as I know, the format cube is only valid for orthogonal cells.  There
| are other options to plot .RHO (and .DRHO, .VH, .VT, etc).  Some of them are
| included in the siesta/Utils directory. Check the mailing-list history, 
because
| this is a frequent topic of discussion.
|
| You can also use the format of XCrysden (called xfs) to plot 3D surfaces.  I
| attach a script similar to grid2cube.f, written in f77, that you can use in 
the
| same way as grid2cube.  You can download XCrysden at: http://www.xcrysden.org/
|
| Cheers,
| Miguel
|
| Missatge citat per Rudy Coquet [EMAIL PROTECTED]:
|
|  Dear SIESTA users,
| 
|  I would like to know if there is an easy way to convert a .RHO file to a
|  cube file? Usually grid2cube works fine but I have a non-orthogonal
|  cell so I cannot use it.
| 
|  Thank you,
| 
|  Rudy Coquet
|  Cardiff Universtity, UK.
| 
|
|
|
|
| -
| This mail sent through IMP: http://horde.org/imp/
|
|



C
C   rho2xsf,  a script to transform 3-dim grid function
C (i.e. LDOS, RHO, DRHO, etc.) written in SIESTA
C by subr. iorho
C into a grid for XCrysden
C
C   !!!   IMPORTANT  -- !!!
C   compile this code with the same compiler switches as Siesta,
C   otherwise reading the data from unformatted files will be spoiled.  
C

C Written by Andrei Postnikov, Mar 2005
C [EMAIL PROTECTED]
C
 program rho2xsf
 implicit none
 integer MPTS,mesh0(3),mesh1(3),ip,nspin,is,ii,jj,
.iat,nat,ityp,nz,ix,iy,iz,ind,mn,
.ixmax,iymax,izmax,ixmin,iymin,izmin
 parameter (MPTS=1)
 character inpfil*60,outfil*60,syslab*30,suffix*6
 real*8 cell(3,3),coord(3),b2ang
 parameter (b2ang=0.529177)  !  Bohr to Angstroem
 real   func(MPTS),fdum  !  NB! single precision, as in iorho.F
 real   fmax,fmin
C
C string manipulation functions in Fortran used below:
C len_trim(string): returns the length of string 
C   without trailing blank characters,

C char(integer)   : returns the character in the specified position
C   of computer's ASCII table, i.e. char(49)=1
C
 write (6,701)
 701 format( Specify  SystemLabel (or 'siesta' if none): ,$)
 read (5,*) syslab
 inpfil = syslab(1:len_trim(syslab))//'.XV'
 open (11,file=inpfil,form='formatted',status='old',err=801)
 write (6,*) 'Found and opened: ',inpfil
C reads from .XV and writes into .XSF file in XCrysden format:
 outfil = syslab(1:len_trim(syslab))//'.XSF'
 open (12,file=outfil,form='formatted',status='new',err=802)
 write (6,*) 'Opened as new:',outfil
C --- write crystal structure data:
 write (12,'(a7)') 'CRYSTAL'
 write (12,'(a7)') 'PRIMVEC'
 do ii=1,3
   read  (11,*,end=803,err=803)   (cell(ii,jj),jj=1,3)
   write (12,204) (cell(ii,jj)*b2ang,jj=1,3)
 enddo
 write (12,'(a9)')  'PRIMCOORD'
 read  (11,*,end=804,err=804)  nat
 write (12,'(i4,a3)')  nat,'  1'
 do iat=1,nat
   read (11,*,end=805,err=805) ityp, nz, (coord(ii),ii=1,3)
   write (12,201) nz, (coord(ii)*b2ang,ii=1,3)
 enddo
 close (11)
C --- finished with .XV; now look for grid data files to include:
C
 101 write (6,702)
 702 format (' Add grid property (LDOS, RHO, ...;',
.' or BYE if none): ',$)
 read (5,*) suffix
 inpfil = syslab(1:len_trim(syslab))//
.  '.'//suffix(1:len_trim(suffix))
 open (11,file=inpfil,form='unformatted',status='old',err=806)
 write (6,*) 'Found and opened: ',inpfil(1:len_trim(inpfil))
 read (11,err=807) cell 
 read (11,err=808) mesh0, nspin 
C

C --- Here, introdruce mesh step (keep every mn's point along
C each grid dimension).
  11 write (6,'(a18,3i5)') 'Grid divisions:   ',mesh0
 write (6,'(a39,$)')  Keep for XSF file every N'th point, N=
 read (5,*) mn
 if (mn.le.0) then
   write (6,*) ' N must be positive, try again'
  

Re: [SIESTA-L] grid2cube

2005-04-26 Thread Andrei Postnikov
Dear Miguel and Rudy (and all),

now that we are discussing this topic, I also have a script
to convert RHO and other grid properties into XCrysden format.
I attach a Fortran source and a README file.
Your suggestions and criticisms are welcome.

(Miguel: you did not attach your script in your mail,
at least it didn't go to the list).

For whoever is interested, I also have a tool to plot Fermi surfaces
from SIESTA data with XCrysden.
As you may figure out, a tool to transfer wavefunctions with XCrysden is
not yet ready.

Best regards,

Andrei Postnikov

 +-- Dr. habil. Andrei Postnikov - Tel. +49-541-969.2377 -- Fax .2351 ---+
 | Institut fuer Festkoerperforschung - FZ Juelich, D-52425 Juelich, Germany |
 +-- [EMAIL PROTECTED] - http://www.home.uni-osnabrueck.de/apostnik/ --+

On Mon, 25 Apr 2005, Miguel Pruneda wrote:

| Dear Rudy (and all),
|
| As far as I know, the format cube is only valid for orthogonal cells.  There
| are other options to plot .RHO (and .DRHO, .VH, .VT, etc).  Some of them are
| included in the siesta/Utils directory. Check the mailing-list history, 
because
| this is a frequent topic of discussion.
|
| You can also use the format of XCrysden (called xfs) to plot 3D surfaces.  I
| attach a script similar to grid2cube.f, written in f77, that you can use in 
the
| same way as grid2cube.  You can download XCrysden at: http://www.xcrysden.org/
|
| Cheers,
| Miguel
|
| Missatge citat per Rudy Coquet [EMAIL PROTECTED]:
|
|  Dear SIESTA users,
| 
|  I would like to know if there is an easy way to convert a .RHO file to a
|  cube file? Usually grid2cube works fine but I have a non-orthogonal
|  cell so I cannot use it.
| 
|  Thank you,
| 
|  Rudy Coquet
|  Cardiff Universtity, UK.
| 
|
|
|
|
| -
| This mail sent through IMP: http://horde.org/imp/
|
|C
C   rho2xsf,  a script to transform 3-dim grid function
C (i.e. LDOS, RHO, DRHO, etc.) written in SIESTA
C by subr. iorho
C into a grid for XCrysden
C
C   !!!   IMPORTANT  -- !!!
C   compile this code with the same compiler switches as Siesta,
C   otherwise reading the data from unformatted files will be spoiled.  
C
C Written by Andrei Postnikov, Mar 2005
C [EMAIL PROTECTED]
C
  program rho2xsf
  implicit none
  integer MPTS,mesh0(3),mesh1(3),ip,nspin,is,ii,jj,
 .iat,nat,ityp,nz,ix,iy,iz,ind,mn,
 .ixmax,iymax,izmax,ixmin,iymin,izmin
  parameter (MPTS=1)
  character inpfil*60,outfil*60,syslab*30,suffix*6
  real*8 cell(3,3),coord(3),b2ang
  parameter (b2ang=0.529177)  !  Bohr to Angstroem
  real   func(MPTS),fdum  !  NB! single precision, as in iorho.F
  real   fmax,fmin
C
C string manipulation functions in Fortran used below:
C len_trim(string): returns the length of string 
C   without trailing blank characters,
C char(integer)   : returns the character in the specified position
C   of computer's ASCII table, i.e. char(49)=1
C
  write (6,701)
  701 format( Specify  SystemLabel (or 'siesta' if none): ,$)
  read (5,*) syslab
  inpfil = syslab(1:len_trim(syslab))//'.XV'
  open (11,file=inpfil,form='formatted',status='old',err=801)
  write (6,*) 'Found and opened: ',inpfil
C reads from .XV and writes into .XSF file in XCrysden format:
  outfil = syslab(1:len_trim(syslab))//'.XSF'
  open (12,file=outfil,form='formatted',status='new',err=802)
  write (6,*) 'Opened as new:',outfil
C --- write crystal structure data:
  write (12,'(a7)') 'CRYSTAL'
  write (12,'(a7)') 'PRIMVEC'
  do ii=1,3
read  (11,*,end=803,err=803)   (cell(ii,jj),jj=1,3)
write (12,204) (cell(ii,jj)*b2ang,jj=1,3)
  enddo
  write (12,'(a9)')  'PRIMCOORD'
  read  (11,*,end=804,err=804)  nat
  write (12,'(i4,a3)')  nat,'  1'
  do iat=1,nat
read (11,*,end=805,err=805) ityp, nz, (coord(ii),ii=1,3)
write (12,201) nz, (coord(ii)*b2ang,ii=1,3)
  enddo
  close (11)
C --- finished with .XV; now look for grid data files to include:
C
  101 write (6,702)
  702 format (' Add grid property (LDOS, RHO, ...;',
 .' or BYE if none): ',$)
  read (5,*) suffix
  inpfil = syslab(1:len_trim(syslab))//
 .  '.'//suffix(1:len_trim(suffix))
  open (11,file=inpfil,form='unformatted',status='old',err=806)
  write (6,*) 'Found and opened: ',inpfil(1:len_trim(inpfil))
  read (11,err=807) cell 
  read (11,err=808) mesh0, nspin 
C
C --- Here, introdruce mesh step (keep every mn's point along
C each grid dimension).
   11 write (6,'(a18,3i5)') 'Grid divisions:   ',mesh0
  write (6,'(a39,$)')  Keep for XSF file every N'th point, N=
  read (5,*) mn
  if (mn.le.0) then
write (6,*) ' N must be positive, try again'
goto 11
  endif
  if 

Re: [SIESTA-L] grid2cube

2005-04-25 Thread Miguel Pruneda
Dear Rudy (and all),

As far as I know, the format cube is only valid for orthogonal cells.  There
are other options to plot .RHO (and .DRHO, .VH, .VT, etc).  Some of them are
included in the siesta/Utils directory. Check the mailing-list history, because
this is a frequent topic of discussion.

You can also use the format of XCrysden (called xfs) to plot 3D surfaces.  I
attach a script similar to grid2cube.f, written in f77, that you can use in the
same way as grid2cube.  You can download XCrysden at: http://www.xcrysden.org/

Cheers,
Miguel

Missatge citat per Rudy Coquet [EMAIL PROTECTED]:

 Dear SIESTA users,

 I would like to know if there is an easy way to convert a .RHO file to a
 cube file? Usually grid2cube works fine but I have a non-orthogonal
 cell so I cannot use it.

 Thank you,

 Rudy Coquet
 Cardiff Universtity, UK.





-
This mail sent through IMP: http://horde.org/imp/




Re: [SIESTA-L] grid2cube

2005-04-25 Thread Marcos Verissimo Alves
Hi Rudy,

I have been using XCrysDen and I think it handles non-orthogonal cells,
provided you supply the data in the XCrysDen format. At least I have
been able to plot the charge density of a graphene sheet using it. You
have to write a small fortran program to write the data in a readable
format, but this is pretty easy to do. Try looking at the XXrysDen
homepage: http://www.xcrysden.org

Regards,

Marcos

On Mon, 2005-04-25 at 12:08, Rudy Coquet wrote:
 Dear SIESTA users,

 I would like to know if there is an easy way to convert a .RHO file to a
 cube file? Usually grid2cube works fine but I have a non-orthogonal
 cell so I cannot use it.

 Thank you,

 Rudy Coquet
 Cardiff Universtity, UK.
--
Dr. Marcos Veríssimo Alves
Departamento de Física
Universidade Federal de São Carlos
São Carlos, SP - Brasil
http://joselitosn.df.ufscar.br/~dm/equipe/verissim.htm
***
Dr. Marcos Verissimo Alves
Physics Department
Universidade Federal de Sao Carlos
Sao Carlos, SP - Brazil
http://joselitosn.df.ufscar.br/~dm/equipe/verissim-en.htm