~nickpapior/siesta/trunk-kpoint-dos

« back to all changes in this revision

Viewing changes to Src/iofa.f

  • Committer: Alberto Garcia
  • Date: 2004-11-25 18:49:43 UTC
  • Revision ID: Arch-1:siesta@uam.es--2004%siesta-devel--reference--0.11--patch-1
Siesta 0.11 -- imported from CVS
Import from cvs using date instead of siesta-0-11-release tag, since
the Pseudo structure was not properly integrated at that time and
did not get the tag.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
c $Id: iofa.f,v 1.1 1999/02/21 00:09:49 emilio Exp $
 
2
 
 
3
      subroutine iofa( na, fa )
 
4
 
 
5
c *******************************************************************
 
6
c Writes forces in eV/Ang
 
7
c Emilio Artacho, Feb. 1999
 
8
c ********** INPUT **************************************************
 
9
c integer na           : Number atoms
 
10
c real*8  fa(3,na)     : Forces on the atoms
 
11
c *******************************************************************
 
12
 
 
13
      implicit          none
 
14
      character         paste*33
 
15
      integer           na
 
16
      double precision  fa(3,*)
 
17
      external          io_assign, io_close, paste
 
18
      include          'fdf/fdfdefs.h'
 
19
 
 
20
c Internal 
 
21
      character         sname*30, fname*33
 
22
      integer           ia, iu, ix
 
23
      logical           frstme
 
24
      double precision  Ang, eV
 
25
      save              frstme, fname, eV, Ang
 
26
      data frstme        /.true./
 
27
c -------------------------------------------------------------------
 
28
 
 
29
      if (frstme) then
 
30
        Ang    = 1.d0 / 0.529177d0
 
31
        eV     = 1.d0 / 13.60580d0
 
32
        sname  = fdf_string( 'SystemLabel', 'siesta' )
 
33
        fname  = paste( sname, '.FA' )
 
34
        frstme = .false.
 
35
      endif
 
36
 
 
37
      call io_assign( iu )
 
38
      open( iu, file=fname, form='formatted', status='unknown' )      
 
39
 
 
40
      write(iu,'(i6)') na
 
41
      write(iu,'(i6,3f12.6)') (ia, (fa(ix,ia)*Ang/eV,ix=1,3), ia=1,na)
 
42
 
 
43
      call io_close( iu )
 
44
 
 
45
      return
 
46
      end