mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-29 06:35:28 -04:00
adding option to print space groups
This commit is contained in:
parent
1196b4e7cb
commit
344a2ab223
10 changed files with 265 additions and 0 deletions
|
|
@ -434,6 +434,13 @@ CONTAINS
|
|||
CALL print_geo_opt_nc(gopt_env, output_unit)
|
||||
END IF
|
||||
|
||||
! show space_group
|
||||
CALL section_vals_val_get(geo_section, "SHOW_SPACE_GROUP", l_val=spgr%show_space_group)
|
||||
IF (spgr%show_space_group) THEN
|
||||
CALL identify_space_group(subsys, geo_section, gopt_env, output_unit)
|
||||
CALL print_spgr(spgr)
|
||||
END IF
|
||||
|
||||
! Write final information, if converged
|
||||
CALL cp_iterate(logger%iter_info, last=.TRUE., increment=0)
|
||||
CALL write_bfgs_hessian(geo_section, hess_mat, logger)
|
||||
|
|
|
|||
|
|
@ -137,6 +137,16 @@ CONTAINS
|
|||
CALL cp_cg_main(force_env, x0, gopt_param, output_unit, globenv, &
|
||||
gopt_env, do_update=my_do_update)
|
||||
|
||||
! show space_group
|
||||
CALL section_vals_val_get(geo_section, "SHOW_SPACE_GROUP", l_val=spgr%show_space_group)
|
||||
IF (spgr%show_space_group) THEN
|
||||
IF (spgr%keep_space_group) THEN
|
||||
CALL force_env_get(force_env, subsys=subsys)
|
||||
END IF
|
||||
CALL identify_space_group(subsys, geo_section, gopt_env, output_unit)
|
||||
CALL print_spgr(spgr)
|
||||
END IF
|
||||
|
||||
CALL cp_print_key_finished_output(output_unit, logger, geo_section, &
|
||||
"PRINT%PROGRAM_RUN_INFO")
|
||||
IF (PRESENT(do_update)) do_update = my_do_update
|
||||
|
|
|
|||
|
|
@ -150,6 +150,14 @@ CONTAINS
|
|||
CALL print_geo_opt_nc(gopt_env, output_unit)
|
||||
END IF
|
||||
|
||||
! show space_group
|
||||
CALL section_vals_val_get(geo_section, "SHOW_SPACE_GROUP", l_val=spgr%show_space_group)
|
||||
IF (spgr%show_space_group) THEN
|
||||
CALL identify_space_group(subsys, geo_section, gopt_env, output_unit)
|
||||
CALL print_spgr(spgr)
|
||||
END IF
|
||||
|
||||
|
||||
! Write final output information, if converged
|
||||
CALL cp_iterate(logger%iter_info, last=.TRUE., increment=0)
|
||||
CALL gopt_f_io_finalize(gopt_env, force_env, optimizer%x, converged, its, root_section, &
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ MODULE space_groups_types
|
|||
|
||||
TYPE spgr_type
|
||||
LOGICAL :: keep_space_group = .FALSE.
|
||||
LOGICAL :: show_space_group = .FALSE.
|
||||
LOGICAL :: symlib = .FALSE.
|
||||
LOGICAL :: print_atoms = .FALSE.
|
||||
INTEGER :: iunit = -1
|
||||
|
|
|
|||
|
|
@ -878,6 +878,17 @@ CONTAINS
|
|||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
! collects keywords related to Space Group Symmetry analysis
|
||||
CALL keyword_create( &
|
||||
keyword, __LOCATION__, name="SHOW_SPACE_GROUP", &
|
||||
description="Detect and show space group of the system after optimization. "// &
|
||||
"It works for supercell. It does not affect/reduce computational cost. "// &
|
||||
"Use EPS_SYMMETRY to adjust the detection threshold.", &
|
||||
usage="SHOW_SPACE_GROUP .TRUE.", &
|
||||
default_l_val=.FALSE., lone_keyword_l_val=.TRUE., repeats=.FALSE.)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
! collects keywords related to precision for finding the space group
|
||||
CALL keyword_create( &
|
||||
keyword, __LOCATION__, name="EPS_SYMMETRY", &
|
||||
|
|
|
|||
9
tests/QS/regtest-spgr-id/TEST_FILES.toml
Normal file
9
tests/QS/regtest-spgr-id/TEST_FILES.toml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# runs are executed in the same order as in this file
|
||||
# the second field tells which test should be run in order to compare with the last available output
|
||||
# e.g. 0 means do not compare anything, running is enough
|
||||
# 93 compares with the space group number provied in the SPGR section of the output file
|
||||
# for details see cp2k/tools/do_regtest
|
||||
"copper.inp" = [{matcher="M093", tol=0, ref=225}]
|
||||
"quartz.inp" = [{matcher="M093", tol=0, ref=154}]
|
||||
"argon.inp" = [{matcher="M093", tol=0, ref=99}]
|
||||
#EOF
|
||||
65
tests/QS/regtest-spgr-id/argon.inp
Normal file
65
tests/QS/regtest-spgr-id/argon.inp
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL MEDIUM
|
||||
PROJECT argon
|
||||
RUN_TYPE CELL_OPT
|
||||
&END GLOBAL
|
||||
|
||||
&MOTION
|
||||
&CELL_OPT
|
||||
EPS_SYMMETRY 1e-4
|
||||
KEEP_ANGLES T
|
||||
SHOW_SPACE_GROUP T
|
||||
MAX_ITER 10
|
||||
OPTIMIZER BFGS
|
||||
TYPE DIRECT_CELL_OPT
|
||||
&END CELL_OPT
|
||||
&GEO_OPT
|
||||
MINIMIZER BFGS
|
||||
&END GEO_OPT
|
||||
&END MOTION
|
||||
|
||||
&FORCE_EVAL
|
||||
METHOD QS
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
BASIS_SET_FILE_NAME BASIS_MOLOPT
|
||||
POTENTIAL_FILE_NAME POTENTIAL
|
||||
&QS
|
||||
METHOD GPW
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0e-5
|
||||
MAX_SCF 100
|
||||
SCF_GUESS ATOMIC
|
||||
&END SCF
|
||||
&XC
|
||||
&VDW_POTENTIAL
|
||||
DISPERSION_FUNCTIONAL PAIR_POTENTIAL
|
||||
&PAIR_POTENTIAL
|
||||
PARAMETER_FILE_NAME dftd3.dat
|
||||
REFERENCE_FUNCTIONAL PBE
|
||||
TYPE DFTD3
|
||||
&END PAIR_POTENTIAL
|
||||
&END VDW_POTENTIAL
|
||||
&XC_FUNCTIONAL PBE
|
||||
&END XC_FUNCTIONAL
|
||||
&END XC
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.3 5.3 5.3
|
||||
ALPHA_BETA_GAMMA 90 90 90
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Ar 0.1 0.0 0.0
|
||||
Ar 0.5 0.5 0.0
|
||||
Ar 0.5 0.0 0.5
|
||||
Ar 0.0 0.5 0.5
|
||||
&END COORD
|
||||
&KIND Ar
|
||||
BASIS_SET SZV-MOLOPT-SR-GTH
|
||||
POTENTIAL GTH-PBE-q8
|
||||
&END KIND
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
76
tests/QS/regtest-spgr-id/copper.inp
Normal file
76
tests/QS/regtest-spgr-id/copper.inp
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL MEDIUM
|
||||
PROJECT_NAME copper
|
||||
RUN_TYPE CELL_OPT
|
||||
&END GLOBAL
|
||||
|
||||
&MOTION
|
||||
&CELL_OPT
|
||||
EPS_SYMMETRY 1.e-4
|
||||
KEEP_ANGLES T
|
||||
SHOW_SPACE_GROUP T
|
||||
MAX_ITER 100
|
||||
OPTIMIZER LBFGS
|
||||
&END CELL_OPT
|
||||
&GEO_OPT
|
||||
OPTIMIZER LBFGS
|
||||
&END GEO_OPT
|
||||
&END MOTION
|
||||
|
||||
&FORCE_EVAL
|
||||
METHOD QS
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
CHARGE 0
|
||||
MULTIPLICITY 1
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD XTB
|
||||
&XTB
|
||||
DO_EWALD T
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS 20
|
||||
EPS_SCF 1.E-5
|
||||
MAX_SCF 100
|
||||
SCF_GUESS ATOMIC
|
||||
&MIXING
|
||||
METHOD BROYDEN_MIXING
|
||||
&END MIXING
|
||||
&SMEAR ON
|
||||
ELECTRONIC_TEMPERATURE 300
|
||||
METHOD FERMI_DIRAC
|
||||
&END SMEAR
|
||||
&END SCF
|
||||
&END DFT
|
||||
&PRINT
|
||||
&STRESS_TENSOR ON
|
||||
&END STRESS_TENSOR
|
||||
&END PRINT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
A 3.6150000000 0.0000000000 0.0000000000
|
||||
B 0.0000000000 3.6150000000 0.0000000000
|
||||
C 0.0000000000 0.0000000000 3.6150000000
|
||||
MULTIPLE_UNIT_CELL 1 1 1
|
||||
PERIODIC XYZ
|
||||
SYMMETRY CUBIC
|
||||
&END CELL
|
||||
&COORD
|
||||
Cu 0.0000000000 0.0000000000 0.0000000000
|
||||
Cu 0.5000000000 0.0000000000 0.5000000000
|
||||
Cu 0.5000000000 0.5000000000 0.0000000000
|
||||
Cu 0.0000000000 0.5000000000 0.5000000000
|
||||
UNIT angstrom
|
||||
SCALED T
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL 1 1 1
|
||||
NUMBER_OF_ATOMS 4
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
77
tests/QS/regtest-spgr-id/quartz.inp
Normal file
77
tests/QS/regtest-spgr-id/quartz.inp
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL MEDIUM
|
||||
PROJECT_NAME quartz
|
||||
RUN_TYPE CELL_OPT
|
||||
&END GLOBAL
|
||||
|
||||
&MOTION
|
||||
&CELL_OPT
|
||||
EPS_SYMMETRY 1e-4
|
||||
KEEP_ANGLES T
|
||||
SHOW_SPACE_GROUP T
|
||||
MAX_ITER 4
|
||||
OPTIMIZER CG
|
||||
TYPE DIRECT_CELL_OPT
|
||||
&END CELL_OPT
|
||||
&GEO_OPT
|
||||
OPTIMIZER CG
|
||||
&END GEO_OPT
|
||||
&END MOTION
|
||||
|
||||
&FORCE_EVAL
|
||||
METHOD QS
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
CHARGE 0
|
||||
MULTIPLICITY 1
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD XTB
|
||||
&XTB
|
||||
CHECK_ATOMIC_CHARGES F
|
||||
DO_EWALD T
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.E-6
|
||||
MAX_SCF 30
|
||||
SCF_GUESS ATOMIC
|
||||
&OT T
|
||||
MINIMIZER CG
|
||||
PRECONDITIONER FULL_ALL
|
||||
&END OT
|
||||
&OUTER_SCF T
|
||||
EPS_SCF 1.E-6
|
||||
MAX_SCF 10
|
||||
&END OUTER_SCF
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 4.9159998894 4.9159998894 5.4053997993
|
||||
ALPHA_BETA_GAMMA 90.00 90.00 120.00
|
||||
MULTIPLE_UNIT_CELL 1 1 1
|
||||
PERIODIC XYZ
|
||||
&END CELL
|
||||
&COORD
|
||||
Si 0.469699985 0.000000000 0.000000000
|
||||
Si 0.000000018 0.469700021 0.666666696
|
||||
Si 0.530300031 0.530300048 0.333333348
|
||||
O 0.413500032 0.266900007 0.119099996
|
||||
O 0.266900018 0.413500038 0.547566700
|
||||
O 0.733100016 0.146600017 0.785766692
|
||||
O 0.586499976 0.853400010 0.214233330
|
||||
O 0.853400027 0.586500031 0.452433344
|
||||
O 0.146600008 0.733100006 0.880900004
|
||||
UNIT angstrom
|
||||
SCALED T
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL 1 1 1
|
||||
NUMBER_OF_ATOMS 9
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
# Directories have been reordered according the execution time needed for a gfortran pdbg run using 2 MPI tasks
|
||||
# in case a new directory is added just add it at the top of the list..
|
||||
# the order will be regularly checked and modified...
|
||||
QS/regtest-spgr-id spglib
|
||||
HP-DFT
|
||||
xTB/regtest-tblite-gfn1-periodic tblite
|
||||
xTB/regtest-tblite-ipea1 tblite
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue