~jose-soler/siesta/unfolding

« back to all changes in this revision

Viewing changes to Pseudo/atom/potrw.f

  • Committer: Alberto Garcia
  • Date: 2016-01-25 16:00:16 UTC
  • mto: (483.3.1 rel-4.0)
  • mto: This revision was merged to the branch mainline in revision 485.
  • Revision ID: albertog@icmab.es-20160125160016-c1qivg1zw06kgyfd
Prepare GPL release

* Include proper headers

* Add Docs/Contributors.txt and NOTICE.txt files.

* Update READMEs and LICENSE files in several directories.

* Remove Pseudo/atom, Util/test-xml

* Remove DOM files from Src/xmlparser

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
c
2
 
      subroutine potrw(vd,r,nr,k,kj,ist,rc)
3
 
c
4
 
c  Step size of 0.01 is adjustable as seen fit to give
5
 
c  a reasonalble plot.
6
 
c
7
 
C     .. Parameters ..
8
 
      double precision zero, pzf
9
 
      parameter (zero=0.D0,pzf=0.01D0)
10
 
C     ..
11
 
C     .. Scalar Arguments ..
12
 
      integer ist, k, kj, nr
13
 
      double precision rc
14
 
C     ..
15
 
C     .. Array Arguments ..
16
 
      double precision r(nr), vd(nr)
17
 
C     ..
18
 
C     .. Local Scalars ..
19
 
      double precision step
20
 
      integer j
21
 
      character filename*7
22
 
C     ..
23
 
c
24
 
      if (kj .eq. 0) then
25
 
         write(filename,9900) k
26
 
 9900 format('PSWFNR',i1)
27
 
      else if (kj .eq. -1) then
28
 
         write(filename,9930) k
29
 
 9930 format('PTWFNR',i1)
30
 
      else
31
 
         write(filename,9910) k
32
 
 9910 format('AEWFNR',i1)
33
 
      endif
34
 
c
35
 
      open(unit=3,file=filename,form='formatted',status='unknown')
36
 
c
37
 
c     Write out r, the wavefunction, and rc (kludge to pass it to
38
 
c     the plotting program)
39
 
c
40
 
      step = zero
41
 
      do 10 j = 2, nr
42
 
         if (r(j) .ge. step) then
43
 
            write(3,9000) r(j), vd(j)*ist, rc
44
 
            step = step + pzf
45
 
         end if
46
 
   10 continue
47
 
 9000 format(1x,f7.4,3x,f12.8,2x,f8.4)
48
 
c
49
 
      close(unit=3)
50
 
cag
51
 
      return
52
 
c
53
 
      end
54
 
 
55