Statistiques
| Révision :

root / src / PrintAnaList.f90 @ 8

Historique | Voir | Annoter | Télécharger (2,57 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
  WRITE(FileUnit,'(A)') "# Centers of mass used "
44

    
45
  CurBary => Bary
46

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

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

    
58
  WRITE(FileUnit,'(A)') "# Variables monitored "
59

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

    
88
  If (Debug) Call Header("Exiting PrintAnaList")
89

    
90
END SUBROUTINE PrintAnaList