root / src / test_zmat.f90 @ 2
Historique | Voir | Annoter | Télécharger (1,19 ko)
| 1 | 1 | pfleura2 | !================================================================ |
|---|---|---|---|
| 2 | 1 | pfleura2 | ! test si la z_matrice peut etre ecrite pour gaussian |
| 3 | 1 | pfleura2 | ! monstergauss exthuc |
| 4 | 1 | pfleura2 | !================================================================ |
| 5 | 1 | pfleura2 | |
| 6 | 1 | pfleura2 | FUNCTION test_zmat(na,ind_zmat) |
| 7 | 1 | pfleura2 | |
| 8 | 1 | pfleura2 | use Path_module |
| 9 | 1 | pfleura2 | use Io_module |
| 10 | 1 | pfleura2 | |
| 11 | 1 | pfleura2 | IMPLICIT NONE |
| 12 | 1 | pfleura2 | |
| 13 | 1 | pfleura2 | logical :: pos,test_zmat |
| 14 | 1 | pfleura2 | integer(KINT) :: i,na,n |
| 15 | 1 | pfleura2 | integer(KINT) :: ind_zmat(Na,5) |
| 16 | 1 | pfleura2 | integer(KINT), ALLOCATABLE :: ind_pos(:) |
| 17 | 1 | pfleura2 | |
| 18 | 1 | pfleura2 | ALLOCATE(ind_pos(Na)) |
| 19 | 1 | pfleura2 | pos=.true. |
| 20 | 1 | pfleura2 | |
| 21 | 1 | pfleura2 | DO i=1,na |
| 22 | 1 | pfleura2 | ind_pos(ind_zmat(i,1))=i |
| 23 | 1 | pfleura2 | END DO |
| 24 | 1 | pfleura2 | |
| 25 | 1 | pfleura2 | DO i=2,na |
| 26 | 1 | pfleura2 | n=ind_zmat(i,2) |
| 27 | 1 | pfleura2 | IF (ind_pos(n) .GE. i) THEN |
| 28 | 1 | pfleura2 | pos=.false. .AND. pos |
| 29 | 1 | pfleura2 | write(IOOUT,*) 'Bond:',n,ind_pos(n),i,pos |
| 30 | 1 | pfleura2 | END IF |
| 31 | 1 | pfleura2 | END DO |
| 32 | 1 | pfleura2 | |
| 33 | 1 | pfleura2 | DO i=3,na |
| 34 | 1 | pfleura2 | n=ind_zmat(i,3) |
| 35 | 1 | pfleura2 | IF (ind_pos(n) .GE. i) THEN |
| 36 | 1 | pfleura2 | pos=.false. .AND. pos |
| 37 | 1 | pfleura2 | write(IOOUT,*) 'Angle:',n,ind_pos(n),i,pos |
| 38 | 1 | pfleura2 | END IF |
| 39 | 1 | pfleura2 | END DO |
| 40 | 1 | pfleura2 | |
| 41 | 1 | pfleura2 | DO i=4,na |
| 42 | 1 | pfleura2 | n=ind_zmat(i,4) |
| 43 | 1 | pfleura2 | IF (ind_pos(n) .GE. i) THEN |
| 44 | 1 | pfleura2 | pos=.false. .AND. pos |
| 45 | 1 | pfleura2 | write(IOOUT,*) 'Dihedral:',n,ind_pos(n),i,pos |
| 46 | 1 | pfleura2 | END IF |
| 47 | 1 | pfleura2 | END DO |
| 48 | 1 | pfleura2 | |
| 49 | 1 | pfleura2 | test_zmat=pos |
| 50 | 1 | pfleura2 | DEALLOCATE(ind_pos) |
| 51 | 1 | pfleura2 | |
| 52 | 1 | pfleura2 | END |