File: atom_info.f90

package info (click to toggle)
espresso 6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,068 kB
  • sloc: f90: 447,429; ansic: 52,566; sh: 40,631; xml: 37,561; tcl: 20,077; lisp: 5,923; makefile: 4,503; python: 4,379; perl: 1,219; cpp: 761; fortran: 618; java: 568; awk: 128
file content (32 lines) | stat: -rw-r--r-- 696 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
!  Find atomic symbol and atomic mass for current atom from the list
!	
	character*4 Atom(100), dummy, dummy1,dummy2, dummy3, dummy4
	real*8 amass(100)
	
	read(5,*) N
!        read(5,'(a,a,a,a,a,a,a,a,a,a)') (Atom(i), i=1,N)
        read(5,'(10a)') (Atom(i), i=1,N)
	read(5,*) (amass(i), i=1,N)
		
	open(1,file='atom_name')
	read(1,'(a4)') dummy
	
	dummy1='  '//dummy
	dummy2=' '//dummy
	dummy3='  '//dummy
	dummy4=' '//dummy//' '
	
	do i=1,N
	
	if(Atom(i).eq.dummy.or.Atom(i).eq.dummy1.or. &
     &     Atom(i).eq.dummy2.or.Atom(i).eq.dummy3.or.Atom(i).eq.dummy4) then
	write(6,'(f10.4)') amass(i)
        stop
	endif
	
	enddo
	
	close(1)
	
	stop 'equivalent atomic symbols are not found '
	end