Statistiques
| Révision :

root / src / PrintAnaList.f90 @ 7

Historique | Voir | Annoter | Télécharger (2,47 ko)

1
 SUBROUTINE PrintAnaList(FileUnit)
2
! This routines prints the list of geometrical variables to monitor
3

    
4

    
5
  use VarTypes
6
  use Path_module
7
  use Io_module
8

    
9
  IMPLICIT NONE
10

    
11
  INTERFACE
12
     function valid(string) result (isValid)
13
       CHARACTER(*), intent(in) :: string
14
       logical                  :: isValid
15
     END function VALID
16

    
17
     SUBROUTINE die(routine, msg, file, line, unit)
18

    
19
       Use VarTypes
20
       Use io_module
21

    
22
       implicit none
23

    
24
       character(len=*), intent(in)           :: routine, msg
25
       character(len=*), intent(in), optional :: file
26
       integer(KINT), intent(in), optional      :: line, unit
27

    
28
     END SUBROUTINE die
29

    
30
  END INTERFACE
31
! Input
32
! Unit to print the description
33
  INTEGER(KINT) :: FileUnit
34

    
35
! Local
36
  LOGICAL :: Debug
37
  INTEGER(KINT) :: I,J,At1,At2,At3,At4
38

    
39
  Debug=Valid('PrintAnaList')
40

    
41
  If (Debug) Call Header("Entering PrintAnaList")
42

    
43
  CurBary => Bary
44

    
45
  DO I=1,NbCom
46
     WRITe(*,*) "Dbg PrintAnalist: I,NbCom",I,NbCom
47
     At1=CurBary%ListAtoms(0)
48
     if (debug)      WRITE(*,'("# c ",I4,20(A3,I3))') At1, &
49
                (AtName(CurBary%ListAtoms(j)),CurBary%ListAtoms(j),j=1,At1)
50

    
51
     WRITE(FileUnit,'("# c ",I4,20(A3,I3))') At1, &
52
                (AtName(CurBary%ListAtoms(j)),CurBary%ListAtoms(j),j=1,At1)
53
     if (associated(CurBary%Next)) CurBary=> CurBary%Next
54
  END DO
55

    
56
  CurVar => GeomList
57
  DO I=1,NbVar
58
     SELECT CASE (CurVar%Type)
59
        CASE ('BOND') 
60
! this is a bond
61
           At1=CurVar%At1
62
           AT2=CurVar%At2
63
           if (debug) WRITE(*,'("# b ",2(1X,A,I3))') TRIM(AtName(At1)),At1,AtName(At2),At2
64
           WRITE(FileUnit,'("# b ",2(1X,A,I3))') TRIM(AtName(At1)),At1,AtName(At2),At2
65
        CASE ('ANGLE') 
66
! this is an angle
67
           At1=CurVar%At1
68
           AT2=CurVar%At2
69
           At3=CurVar%At3
70
           if (debug) WRITE(*,'("# a ",4(A3,I3))') AtName(At1),At1,AtName(At2),At2,AtName(At3),At3
71
           WRITE(FileUnit,'("# a ",4(A3,I3))') AtName(At1),At1,AtName(At2),At2,AtName(At3),At3
72
        CASE ('DIHEDRAL') 
73
! this is a dihedral
74
           At1=CurVar%At1
75
           AT2=CurVar%At2
76
           At3=CurVar%At3
77
           At4=CurVar%At4
78
           if (debug) WRITE(*,'("# d ",4(A3,I3))') AtName(At1),At1,AtName(At2),At2,AtName(At3),At3,AtName(At4),At4
79
           WRITE(FileUnit,'("# d ",4(A3,I3))') AtName(At1),At1,AtName(At2),At2,AtName(At3),At3,AtName(At4),At4
80
     END SELECT
81
     If (Associated(CurVar%Next)) CurVar => CurVar%next
82
  END DO
83

    
84
  If (Debug) Call Header("Exiting PrintAnaList")
85

    
86
END SUBROUTINE PrintAnaList