Commit 0383bfa8 authored by Silvia Chiacchiera's avatar Silvia Chiacchiera

subroutine headers improved

parent 9c6ef167
PROGRAM gen_dipole
!***********************************************************************************
! module to analyze charge dipole moments in DL_MESO
!
! authors: m. a. seaton and s. chiacchiera, February 2017
!**********************************************************************************
PROGRAM gen_dipole
IMPLICIT none
IMPLICIT none
INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND (15, 307)
INTEGER, PARAMETER :: ntraj=10
REAL(KIND=dp), PARAMETER :: pi=3.141592653589793_dp
......@@ -500,6 +500,11 @@ IMPLICIT none
CONTAINS
SUBROUTINE check_molecules
!*************************************************************************************
! subroutine to check molecular content and labelling
!
! authors: s. chiacchiera, February 2017
!*************************************************************************************
IMPLICIT NONE
INTEGER i, j, k, tm, tp, imol, im, ibd
INTEGER mxmolsize
......@@ -546,10 +551,16 @@ IMPLICIT none
END SUBROUTINE check_molecules
SUBROUTINE compute_charge_dipoles (dipx_box, dipy_box, dipz_box, dip2_box)
!input: xxx, yyy, zzz (at a given time step) and chg
!input: visit and from (obtained using connect)
!output: the x,y,z components of the total dipole, sum p_i^2/N_mol
!for each molecule type (at a given time step)
!*************************************************************************************
! subroutine to compute charge dipole moments
!
! authors: m. a. seaton and s. chiacchiera, February 2017
!
! input: xxx, yyy, zzz (at a given time step) and chg
! input: visit and from (obtained using connect)
! output: the x,y,z components of the total dipole, sum p_i^2/N_mol for each molecule
! type (at a given time step)
!*************************************************************************************
IMPLICIT NONE
INTEGER i, j, k, tm, tp, imol, im, ibd, count, ipr
REAL(KIND=dp), DIMENSION(nmoldef) :: dipx_box, dipy_box, dipz_box
......@@ -644,8 +655,9 @@ SUBROUTINE compute_charge_dipoles (dipx_box, dipy_box, dipz_box, dip2_box)
END SUBROUTINE compute_charge_dipoles
End PROGRAM gen_dipole
SUBROUTINE connect (nbeads, nbonds, bndtbl, visit, from)
!**********************************************************************
! Analyze all the bonds (bndtbl) to obtain a schedule (visit, from)
! Analyzes all the bonds (bndtbl) to obtain a schedule (visit, from)
! to visit the beads so that each cluster is visited along a connected
! path. "visit" gives the order to include beads, "from" gives the bead
! to attach them to.
......@@ -654,8 +666,7 @@ End PROGRAM gen_dipole
!
! author: s. chiacchiera, February 2017
!**********************************************************************
SUBROUTINE connect (nbeads, nbonds, bndtbl, visit, from)
IMPLICIT none
IMPLICIT none
INTEGER, INTENT (IN) :: bndtbl (nbonds,2)
INTEGER, INTENT (IN) :: nbeads, nbonds
INTEGER :: ic, i, j, k, nn, nclu, nper, lab, ref, count
......@@ -757,6 +768,7 @@ SUBROUTINE connect (nbeads, nbonds, bndtbl, visit, from)
!-----------------------------------------------------------------------
CONTAINS
!-----------------------------------------------------------------------
SUBROUTINE organize (N, NL, labnn, firstnn, lastnn, deg)
!**********************************************************************
! Analyzes the bonds (bndtbl) to obtain the degree (=number of bonds)
! of each bead, and the nearest neighbours list.
......@@ -764,8 +776,7 @@ SUBROUTINE connect (nbeads, nbonds, bndtbl, visit, from)
!
! author: s. chiacchiera, February 2017
!**********************************************************************
SUBROUTINE organize (N, NL, labnn, firstnn, lastnn, deg)
IMPLICIT none
IMPLICIT none
INTEGER, INTENT(IN) :: N, NL
INTEGER :: i,l,count_lab, i1,i2
INTEGER, DIMENSION (N), INTENT(OUT) :: deg
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment