expanding the possibility of the exclusion lists for vdw and ei + regtest. (useful for forcefield

which require 1-2 NB interactions and have also bend terms: suggested from Sergey)


svn-origin-rev: 9236
This commit is contained in:
Teodoro Laino 2009-11-27 10:40:44 +00:00
parent 6c695218ee
commit c0af6492e2
6 changed files with 244 additions and 20 deletions

View file

@ -288,8 +288,10 @@ MODULE input_constants
do_region_defined=4,&
do_bondparm_covalent=0,&
do_bondparm_vdw=1,&
do_skip_13=0,&
do_skip_14=1,&
do_skip_11=0,&
do_skip_12=1,&
do_skip_13=2,&
do_skip_14=3,&
do_conn_psf=1,&
do_conn_psf_u=2,&
do_conn_generate=3,&

View file

@ -1571,18 +1571,18 @@ CONTAINS
CALL keyword_create(keyword, name="EXCLUDE_VDW",&
description="Specifies which kind of Van der Waals interaction to skip.",&
usage="EXCLUDE_VDW (1-3||1-4)", &
enum_c_vals=s2a( "1-3", "1-4"),&
enum_i_vals=(/do_skip_13, do_skip_14/),&
usage="EXCLUDE_VDW (1-1||1-2||1-3||1-4)", &
enum_c_vals=s2a("1-1","1-2","1-3","1-4"),&
enum_i_vals=(/do_skip_11,do_skip_12,do_skip_13, do_skip_14/),&
default_i_val=do_skip_13,error=error)
CALL section_add_keyword(section,keyword,error=error)
CALL keyword_release(keyword,error=error)
CALL keyword_create(keyword, name="EXCLUDE_EI",&
description="Specifies which kind of Electrostatic interaction to skip.",&
usage="EXCLUDE_EI (1-3||1-4)", &
enum_c_vals=s2a( "1-3", "1-4"),&
enum_i_vals=(/do_skip_13, do_skip_14/),&
usage="EXCLUDE_EI (1-1||1-2||1-3||1-4)", &
enum_c_vals=s2a("1-1","1-2","1-3","1-4"),&
enum_i_vals=(/do_skip_11,do_skip_12,do_skip_13, do_skip_14/),&
default_i_val=do_skip_13,error=error)
CALL section_add_keyword(section,keyword,error=error)
CALL keyword_release(keyword,error=error)

View file

@ -21,6 +21,7 @@ MODULE topology_coordinate_util
set_potential
USE f77_blas
USE input_constants, ONLY: do_fist,&
do_skip_12,&
do_skip_13,&
do_skip_14
USE input_section_types, ONLY: section_vals_type,&
@ -420,14 +421,21 @@ CPSourceFileRef,&
END IF
!
DO iatom = 1, SIZE(particle_set)
dim0 = 1 ! always exclude itself
dim1 = dim0 + SIZE(ex_bond_list(iatom)%array1) ! always exclude bond-neighbors
! Setup exclusion list for VDW : always exclude itself
dim0 = 1
! exclude bond-neighbors (only if do_skip_12 .OR. do_skip_13 .OR. do_skip_14)
dim1 = 0
IF (topology%exclude_vdw==do_skip_12.OR. &
topology%exclude_vdw==do_skip_13.OR. &
topology%exclude_vdw==do_skip_14) dim1 = SIZE(ex_bond_list(iatom)%array1)
dim1 = dim1 + dim0
dim2 = 0
IF (topology%exclude_vdw==do_skip_13.OR. &
topology%exclude_vdw==do_skip_14) dim2 = SIZE(ex_bend_list(iatom)%array1)
dim2 = dim1 + dim2
dim3 = SIZE(ex_onfo_list(iatom)%array1) ! Always exclude 1-4
dim3 = dim2 + dim3 ! They're treated in a different way..
! Always exclude 1-4 since we treat them in a different way..
dim3 = SIZE(ex_onfo_list(iatom)%array1)
dim3 = dim2 + dim3
IF (dim3 /= 0) THEN
NULLIFY(list, wlist)
ALLOCATE(wlist(dim3),stat=stat)
@ -459,21 +467,29 @@ CPSourceFileRef,&
IF(topology%exclude_vdw==topology%exclude_ei) THEN
list2 => list
ELSE
dim0 = 1 ! always exclude itself
dim1 = dim0 + SIZE(ex_bond_list(iatom)%array1) ! always exclude bond-neighbors
! Setup exclusion list for EI : always exclude itself
dim0 = 1
! exclude bond-neighbors (only if do_skip_12 .OR. do_skip_13 .OR. do_skip_14)
dim1 = 0
IF (topology%exclude_ei==do_skip_12.OR. &
topology%exclude_ei==do_skip_13.OR. &
topology%exclude_ei==do_skip_14) dim1 = SIZE(ex_bond_list(iatom)%array1)
dim1 = dim1 + dim0
dim2 = 0
IF (topology%exclude_ei==do_skip_13.OR. &
topology%exclude_ei==do_skip_14) dim2 = SIZE(ex_bend_list(iatom)%array1)
dim2 = dim1 + dim2
dim3 = SIZE(ex_onfo_list(iatom)%array1) ! Always exclude 1-4
dim3 = dim2 + dim3 ! They're treated in a different way..
! Always exclude 1-4 since we treat them in a different way..
dim3 = SIZE(ex_onfo_list(iatom)%array1)
dim3 = dim2 + dim3
IF (dim3 /= 0) THEN
ALLOCATE(wlist(dim3),stat=stat)
CPPostcondition(stat==0,cp_failure_level,routineP,error,failure)
wlist( 1: 1) = iatom
wlist( 2:dim1) = ex_bond_list(iatom)%array1
wlist(dim1+1:dim2) = ex_bend_list(iatom)%array1
wlist(dim2+1:dim3) = ex_onfo_list(iatom)%array1
wlist( dim0:dim0) = iatom
IF (dim1>dim0) wlist(dim0+1:dim1) = ex_bond_list(iatom)%array1
IF (dim2>dim1) wlist(dim1+1:dim2) = ex_bend_list(iatom)%array1
IF (dim3>dim2) wlist(dim2+1:dim3) = ex_onfo_list(iatom)%array1
! Get a unique list
DO i = 1, SIZE(wlist)-1
IF (wlist(i)==0)CYCLE

View file

@ -0,0 +1,173 @@
&FORCE_EVAL
METHOD FIST
# STRESS_TENSOR ANALYTICAL
&MM
&PRINT
&FF_INFO ON
&END FF_INFO
&END PRINT
&FORCEFIELD
&CHARGE
ATOM Si
CHARGE +4.0
&END CHARGE
&BOND
ATOMS Si O
K 0.00
KIND HARMONIC
R0 1.0
# Just a fake bond term
&END BOND
&BEND
ATOMS O Si O
K 0.07707
KIND HARMONIC
THETA0 1.91061
## Si-O-Si 0.07707 1.91061 0.0-1.8/0.0-1.8/0.0-3.2
&END BEND
############################## shells ################3
&SHELL O
MAX_DISTANCE 0.1
CORE_CHARGE 0.87
MASS_FRACTION 0.2
SHELL_CHARGE -2.87
SPRING [eV*angstrom^-2] 74.92
&END SHELL
&NONBONDED
&WILLIAMS
ATOMS Si O
A [eV] 1283.90700
B [angstrom^-1] 3.11993
C [eV*angstrom^6] 10.66158
RCUT 12.0
##V(r) = A*EXP(-B*r) - C / r^6 .
## Si-O 1283.90700 3.11993 10.66158
&END WILLIAMS
&WILLIAMS
ATOMS O O
A [eV] 22764.00000
B [angstrom^-1] 3.11993
C [eV*angstrom^6] 27.87900
RCUT 12.0
##V(r) = A*EXP(-B*r) - C / r^6 .
##Osi-Osi 22764.00000 3.11993 27.87900
&END WILLIAMS
&LENNARD-JONES
ATOMS Si Si
EPSILON 0.0
RCUT 1.0
SIGMA 3.12619
## Lennard-Jones e rho(A)
## Ow-Ow 131.00029 3.12619 0.0-12.0
&END LENNARD-JONES
&END NONBONDED
&SPLINE
EMAX_SPLINE 1000.0
&END SPLINE
&END FORCEFIELD
&POISSON
&EWALD
EWALD_TYPE spme
ALPHA .35
GMAX 20
O_SPLINE 6
&END EWALD
&END POISSON
&END MM
&SUBSYS
&CELL
ABC 10 10 10
&END CELL
&TOPOLOGY
COORD_FILE_NAME ../sample_xyz/sio2.xyz
COORDINATE XYZ
CONNECTIVITY PSF
CONN_FILE_NAME ../sample_psf/sio2.psf
EXCLUDE_VDW 1-1
EXCLUDE_EI 1-2
&END TOPOLOGY
&PRINT
&TOPOLOGY_INFO
UTIL_INFO
&END
&END
&END SUBSYS
&END FORCE_EVAL
&GLOBAL
PROJECT test
RUN_TYPE ENERGY
PRINT_LEVEL LOW
&END GLOBAL
&MOTION
&MD
ENSEMBLE NVT
STEPS 1000
TIMESTEP 0.1
TEMPERATURE 300.0
&SHELL
TEMPERATURE 25.0
TEMP_TOL 25.0
&END
&THERMOSTAT
REGION MOLECULE
TYPE NOSE
&NOSE
LENGTH 3
YOSHIDA 3
TIMECON 5
MTS 2
&END NOSE
&END THERMOSTAT
&BAROSTAT
PRESSURE 1.0
TIMECON 1000
&END BAROSTAT
&PRINT
&PROGRAM_RUN_INFO
&EACH
MD 5
&END EACH
&END PROGRAM_RUN_INFO
&ENERGY
&EACH
MD 5
&END EACH
&END ENERGY
&END PRINT
&END MD
&PRINT
&TRAJECTORY
&EACH
MD 1
GEO_OPT 1
&END EACH
&END TRAJECTORY
&VELOCITIES OFF
&END VELOCITIES
&CELL
&EACH
MD 10
&END EACH
&END CELL
&RESTART_HISTORY
&EACH
MD 1000
&END EACH
&END RESTART_HISTORY
&RESTART
&EACH
MD 1000
&END EACH
&END RESTART
&SHELL_TRAJECTORY
&EACH
MD 1
&END
&END
&SHELL_VELOCITIES OFF
&END
&END PRINT
&END MOTION

28
tests/Fist/sample_psf/sio2.psf Executable file
View file

@ -0,0 +1,28 @@
PSF EXT
1 !NTITLE
Conversion from XYZ file
3 !NATOM
1 M1 1 PLATE Si Si 4.000000 28.085
2 M1 1 PLATE O O -2.000000 15.999
3 M1 1 PLATE O O -2.000000 15.999
2 !NBOND
1 2 1 3
1 !NTHETA
2 1 3
0 !NPHI
0 !NIMPHI
0 !NDON
0 !NACC
0 !NNB
0 !NGRP

5
tests/Fist/sample_xyz/sio2.xyz Executable file
View file

@ -0,0 +1,5 @@
3
Si 0.0 0.0 0.0
O 0.0 1.7 0.0
O 1.7 0.0 0.0