diff --git a/src/cell_methods.F b/src/cell_methods.F index f494bc7c81..6add962897 100644 --- a/src/cell_methods.F +++ b/src/cell_methods.F @@ -33,8 +33,8 @@ MODULE cell_methods USE cp_units, ONLY: cp_unit_from_cp2k,& cp_unit_to_cp2k USE input_constants, ONLY: & - do_cell_cif, do_cell_cp2k, do_cell_extxyz, do_cell_pdb, do_cell_xsc, do_coord_cif, & - do_coord_cp2k, do_coord_pdb, do_coord_xyz + canonicalize_cell_auto, canonicalize_cell_true, do_cell_cif, do_cell_cp2k, do_cell_extxyz, & + do_cell_pdb, do_cell_xsc, do_coord_cif, do_coord_cp2k, do_coord_pdb, do_coord_xyz USE input_cp2k_subsys, ONLY: create_cell_section USE input_enumeration_types, ONLY: enum_i2c,& enumeration_type @@ -347,8 +347,8 @@ CONTAINS CHARACTER(LEN=default_path_length) :: cell_file_name, coord_file_name, & error_msg - INTEGER :: cell_file_format, coord_file_format, & - my_per + INTEGER :: canonicalize_mode, cell_file_format, & + coord_file_format, my_per INTEGER, DIMENSION(:), POINTER :: multiple_unit_cell LOGICAL :: canonicalize_cell, cell_read_a, cell_read_abc, cell_read_alpha_beta_gamma, & cell_read_b, cell_read_c, cell_read_file, my_check_ref, tmp_comb_abc, tmp_comb_cell, & @@ -408,7 +408,8 @@ CONTAINS CALL section_vals_val_get(cell_section, "ABC", explicit=cell_read_abc) CALL section_vals_val_get(cell_section, "ALPHA_BETA_GAMMA", explicit=cell_read_alpha_beta_gamma) CALL section_vals_val_get(cell_section, "CELL_FILE_NAME", explicit=cell_read_file) - CALL section_vals_val_get(cell_section, "CANONICALIZE", l_val=canonicalize_cell) + CALL section_vals_val_get(cell_section, "CANONICALIZE", i_val=canonicalize_mode) + canonicalize_cell = (canonicalize_mode == canonicalize_cell_true) ! Case 4 tmp_comb_top = (.NOT. (cell_read_file .OR. cell_read_abc)) @@ -520,12 +521,22 @@ CONTAINS IF (.NOT. canonicalize_cell .AND. & ((ABS(read_mat(2, 1)) > eps) .OR. & (ABS(read_mat(3, 1)) > eps) .OR. & - (ABS(read_mat(3, 2)) > eps))) & - CALL cp_warn(__LOCATION__, & - "Cell vectors are read but cell matrix is not "// & - "a lower triangle, not conforming to the program "// & - "convention that A lies along the X-axis and "// & - "B is in the XY plane.") + (ABS(read_mat(3, 2)) > eps))) THEN + IF (canonicalize_mode == canonicalize_cell_auto) THEN + CALL cp_warn(__LOCATION__, & + "CELL%CANONICALIZE AUTO keeps the general input cell orientation. "// & + "The cell matrix is not a lower triangle and does not conform to the "// & + "program convention that A lies along the X-axis and B is in the XY plane. "// & + "Set CELL%CANONICALIZE TRUE to explicitly transform the cell and supported "// & + "cell-dependent input to the canonical internal frame.") + ELSE + CALL cp_warn(__LOCATION__, & + "Cell vectors are read but cell matrix is not "// & + "a lower triangle, not conforming to the program "// & + "convention that A lies along the X-axis and "// & + "B is in the XY plane.") + END IF + END IF cell%hmat = read_mat ELSE IF (ANY(read_ang(:) > eps) .AND. ANY(read_len(:) > eps)) THEN diff --git a/src/input_constants.F b/src/input_constants.F index a3f3a2fd00..8066f3fb4f 100644 --- a/src/input_constants.F +++ b/src/input_constants.F @@ -86,6 +86,9 @@ MODULE input_constants do_cell_xsc = 3, & do_cell_extxyz = 4, & do_cell_pdb = 5 + INTEGER, PARAMETER, PUBLIC :: canonicalize_cell_auto = 0, & + canonicalize_cell_true = 1, & + canonicalize_cell_false = 2 INTEGER, PARAMETER, PUBLIC :: rmsd_all = 0, & rmsd_list = 1, & diff --git a/src/input_cp2k_subsys.F b/src/input_cp2k_subsys.F index e8f1eeb2a5..0a3fb1ad6f 100644 --- a/src/input_cp2k_subsys.F +++ b/src/input_cp2k_subsys.F @@ -28,7 +28,8 @@ MODULE input_cp2k_subsys USE cp_output_handling, ONLY: cp_print_key_section_create, debug_print_level, & high_print_level, medium_print_level USE cp_units, ONLY: cp_unit_to_cp2k - USE input_constants, ONLY: do_add, do_bondparm_covalent, do_bondparm_vdw, & + USE input_constants, ONLY: canonicalize_cell_auto, canonicalize_cell_false, & + canonicalize_cell_true, do_add, do_bondparm_covalent, do_bondparm_vdw, & do_cell_cif, do_cell_cp2k, do_cell_xsc, & do_cell_extxyz, do_cell_pdb, & do_conn_amb7, do_conn_g87, do_conn_g96, & @@ -202,12 +203,25 @@ CONTAINS CALL keyword_release(keyword) CALL keyword_create(keyword, __LOCATION__, name="CANONICALIZE", & - description="Transform a general input cell to CP2K's internal convention "// & - "that A lies along the X-axis and B is in the XY plane. Cell-dependent "// & - "Cartesian input such as coordinates, restarts, velocities, k-points, band "// & - "paths, electric-field directions, and fixed spatial points is transformed "// & - "consistently. The stress tensor follows the canonical internal cell.", & - usage="CANONICALIZE T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.) + description="Policy for transforming a general input cell to CP2K's internal "// & + "convention that A lies along the X-axis and B is in the XY plane. AUTO is "// & + "conservative and keeps the input orientation when a silent transformation "// & + "could affect Cartesian or direction-dependent input. TRUE explicitly requests "// & + "canonicalization and transforms supported cell-dependent input. FALSE always "// & + "keeps the input orientation.", & + usage="CANONICALIZE AUTO", & + enum_c_vals=s2a("AUTO", "TRUE", "FALSE", "T", "F", ".TRUE.", ".FALSE."), & + enum_i_vals=[canonicalize_cell_auto, canonicalize_cell_true, & + canonicalize_cell_false, canonicalize_cell_true, canonicalize_cell_false, & + canonicalize_cell_true, canonicalize_cell_false], & + enum_desc=s2a("Keep the input orientation unless canonicalization is unambiguously safe", & + "Explicitly canonicalize the input cell", & + "Keep the input cell orientation", & + "Alias for TRUE", & + "Alias for FALSE", & + "Alias for TRUE", & + "Alias for FALSE"), & + default_i_val=canonicalize_cell_auto, lone_keyword_i_val=canonicalize_cell_true) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/tests/Fist/regtest-1-2/deca_ala5.inp b/tests/Fist/regtest-1-2/deca_ala5.inp index c12b4a4d32..2f85d9dc25 100644 --- a/tests/Fist/regtest-1-2/deca_ala5.inp +++ b/tests/Fist/regtest-1-2/deca_ala5.inp @@ -33,6 +33,7 @@ &END MM &SUBSYS &CELL + CANONICALIZE T CELL_FILE_FORMAT CP2K CELL_FILE_NAME deca_ala4-1.cell &END CELL diff --git a/tests/Fist/regtest-13/Si_nosym_hexagonal.inp b/tests/Fist/regtest-13/Si_nosym_hexagonal.inp index 1f6da82bbc..89f18452d4 100644 --- a/tests/Fist/regtest-13/Si_nosym_hexagonal.inp +++ b/tests/Fist/regtest-13/Si_nosym_hexagonal.inp @@ -43,6 +43,7 @@ A -3.85000/-2 -3.85*+SQRT(3.000e00)/2 COS(+9.E001) B +3.850/+2.0 -0.385E1*-TAN(+6E+01)/2 -LOG(01)/-10 C -SIN(0) +000/342 +LOG10(+0.10)*6.366*+EXP(-00.000)/-COS(0.000E-5) + CANONICALIZE T MULTIPLE_UNIT_CELL 3 3 3 PERIODIC XYZ &CELL_REF diff --git a/tests/Fist/regtest-13/si_muc_cell_opt.inp b/tests/Fist/regtest-13/si_muc_cell_opt.inp index c6660b7f01..908fade86a 100644 --- a/tests/Fist/regtest-13/si_muc_cell_opt.inp +++ b/tests/Fist/regtest-13/si_muc_cell_opt.inp @@ -67,6 +67,7 @@ A 2.7 0.0 2.7 B 0.0 2.7 2.7 C 2.7 2.7 0.0 + CANONICALIZE T MULTIPLE_UNIT_CELL 2 2 2 PERIODIC XYZ &END CELL diff --git a/tests/Fist/regtest-3/al2o3-res.inp b/tests/Fist/regtest-3/al2o3-res.inp index 188d7639d3..ae2ac224e1 100644 --- a/tests/Fist/regtest-3/al2o3-res.inp +++ b/tests/Fist/regtest-3/al2o3-res.inp @@ -81,6 +81,7 @@ A 26.2236461476644 0.508235414971433 0.352095900341464 B 15.3935301632910 21.2250717093132 0.339884967068496 C 15.3881435611913 8.04313631389397 19.6199427770879 + CANONICALIZE T &END CELL &COORD AL -18.8567449782927 -9.84653151159998 -6.72435609218356 diff --git a/tests/Fist/regtest-3/al2o3.inp b/tests/Fist/regtest-3/al2o3.inp index 7aaa11cc41..d05471c496 100644 --- a/tests/Fist/regtest-3/al2o3.inp +++ b/tests/Fist/regtest-3/al2o3.inp @@ -83,6 +83,7 @@ A 26.2236461476644 0.508235414971433 0.352095900341464 B 15.3935301632910 21.2250717093132 0.339884967068496 C 15.3881435611913 8.04313631389397 19.6199427770879 + CANONICALIZE T &END CELL &COORD AL -18.8567449782927 -9.84653151159998 -6.72435609218356 diff --git a/tests/Fist/regtest-7-1/uo2_shell_npe_2.inp b/tests/Fist/regtest-7-1/uo2_shell_npe_2.inp index a1a87154c1..20453bb38b 100644 --- a/tests/Fist/regtest-7-1/uo2_shell_npe_2.inp +++ b/tests/Fist/regtest-7-1/uo2_shell_npe_2.inp @@ -135,6 +135,7 @@ &SUBSYS &CELL ABC 10.936 10.936 10.936 + CANONICALIZE T &END CELL &KIND U MASS 238.03000 diff --git a/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-1.inp b/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-1.inp index 1ec5be8052..3c3242dbb0 100644 --- a/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-1.inp +++ b/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-1.inp @@ -134,6 +134,7 @@ &SUBSYS &CELL ABC 10.8949 10.8949 10.8949 + CANONICALIZE T &END CELL &COORD U 0.000000 0.000000 0.000000 UO2 1 diff --git a/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-2.inp b/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-2.inp index 5694a9b8c9..0f785b9b3e 100644 --- a/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-2.inp +++ b/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-2.inp @@ -140,6 +140,7 @@ &SUBSYS &CELL ABC 10.8949 10.8949 10.8949 + CANONICALIZE T &END CELL &COORD U 0.000000 0.000000 0.000000 UO2 1 diff --git a/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-3.inp b/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-3.inp index d35315b013..b9104fcf15 100644 --- a/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-3.inp +++ b/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-3.inp @@ -140,6 +140,7 @@ &SUBSYS &CELL ABC 10.8949 10.8949 10.8949 + CANONICALIZE T &END CELL &COORD U 0.000000 0.000000 0.000000 UO2 1 diff --git a/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-4.inp b/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-4.inp index 2efa8bb444..4112ff0de6 100644 --- a/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-4.inp +++ b/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-4.inp @@ -140,6 +140,7 @@ &SUBSYS &CELL ABC 10.8949 10.8949 10.8949 + CANONICALIZE T &END CELL &COORD U 0.000000 0.000000 0.000000 UO2 1 diff --git a/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-5.inp b/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-5.inp index 17b51a306f..0a643fb4e8 100644 --- a/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-5.inp +++ b/tests/Fist/regtest-7-2/UO2-2x2x2-binary_restart-cs-5.inp @@ -161,6 +161,7 @@ &SUBSYS &CELL ABC 10.8949 10.8949 10.8949 + CANONICALIZE T &END CELL &COORD U 0.000000 0.000000 0.000000 UO2 1 diff --git a/tests/Fist/regtest-7-2/UO2-2x2x2-nocs2cs-npt-1.inp b/tests/Fist/regtest-7-2/UO2-2x2x2-nocs2cs-npt-1.inp index fb092d2d5f..b0be0236ae 100644 --- a/tests/Fist/regtest-7-2/UO2-2x2x2-nocs2cs-npt-1.inp +++ b/tests/Fist/regtest-7-2/UO2-2x2x2-nocs2cs-npt-1.inp @@ -133,6 +133,7 @@ &SUBSYS &CELL ABC 10.8949 10.8949 10.8949 + CANONICALIZE T &END CELL &COORD U 0.000000 0.000000 0.000000 UO2 1 diff --git a/tests/Fist/regtest-7-2/UO2-4x4x4-cs-fixd-npt.inp b/tests/Fist/regtest-7-2/UO2-4x4x4-cs-fixd-npt.inp index 0f39e13b13..faa12e0c47 100644 --- a/tests/Fist/regtest-7-2/UO2-4x4x4-cs-fixd-npt.inp +++ b/tests/Fist/regtest-7-2/UO2-4x4x4-cs-fixd-npt.inp @@ -123,6 +123,7 @@ A 21.87537964 -0.32813069 0.00000000 B -0.32813069 21.87537964 0.00000000 C 0.00000000 0.00000000 21.88030271 # V = 10468.0743, x = -0.03 + CANONICALIZE T &END CELL &COORD SCALED diff --git a/tests/Fist/regtest-7-2/UO2-4x4x4-cs-fixd-nvt.inp b/tests/Fist/regtest-7-2/UO2-4x4x4-cs-fixd-nvt.inp index 1ba0932ad7..4eedebbb62 100644 --- a/tests/Fist/regtest-7-2/UO2-4x4x4-cs-fixd-nvt.inp +++ b/tests/Fist/regtest-7-2/UO2-4x4x4-cs-fixd-nvt.inp @@ -123,6 +123,7 @@ A 21.87537964 -0.32813069 0.00000000 B -0.32813069 21.87537964 0.00000000 C 0.00000000 0.00000000 21.88030271 # V = 10468.0743, x = -0.03 + CANONICALIZE T &END CELL &COORD SCALED diff --git a/tests/Fist/regtest-pol/quartz_cg.inp b/tests/Fist/regtest-pol/quartz_cg.inp index 1bab9fe660..ad4e2cc3f2 100644 --- a/tests/Fist/regtest-pol/quartz_cg.inp +++ b/tests/Fist/regtest-pol/quartz_cg.inp @@ -96,6 +96,7 @@ A 4.914 8.510 0.0 B 4.914 -8.510 0.0 C 0.0 0.0 10.810 + CANONICALIZE T PERIODIC XYZ &END CELL &COORD diff --git a/tests/Fist/regtest-pol/quartz_sc.inp b/tests/Fist/regtest-pol/quartz_sc.inp index d05719696f..d3b6e1e668 100644 --- a/tests/Fist/regtest-pol/quartz_sc.inp +++ b/tests/Fist/regtest-pol/quartz_sc.inp @@ -96,6 +96,7 @@ A 4.914 8.510 0.0 B 4.914 -8.510 0.0 C 0.0 0.0 10.810 + CANONICALIZE T PERIODIC XYZ &END CELL &COORD diff --git a/tests/QS/regtest-gapw/H2O-gapw-all_localize_crazy_noortho.inp b/tests/QS/regtest-gapw/H2O-gapw-all_localize_crazy_noortho.inp index afaedd921f..008134b487 100644 --- a/tests/QS/regtest-gapw/H2O-gapw-all_localize_crazy_noortho.inp +++ b/tests/QS/regtest-gapw/H2O-gapw-all_localize_crazy_noortho.inp @@ -52,6 +52,7 @@ A 6.0 .2 .0 B .0 6.0 .0 C -.2 .0 6.0 + CANONICALIZE T &END CELL &COORD O 0.000000 0.000000 -0.065587 diff --git a/tests/QS/regtest-gapw/H2O-gapw-all_localize_noortho.inp b/tests/QS/regtest-gapw/H2O-gapw-all_localize_noortho.inp index 3b9bffaa22..36b1727c2c 100644 --- a/tests/QS/regtest-gapw/H2O-gapw-all_localize_noortho.inp +++ b/tests/QS/regtest-gapw/H2O-gapw-all_localize_noortho.inp @@ -52,6 +52,7 @@ A 6.0 .2 .0 B .0 6.0 .0 C -.2 .0 6.0 + CANONICALIZE T &END CELL &COORD O 0.000000 0.000000 -0.065587 diff --git a/tests/QS/regtest-gapw/H2O-gapw-all_noortho.inp b/tests/QS/regtest-gapw/H2O-gapw-all_noortho.inp index fb292316f0..3a22f6d60a 100644 --- a/tests/QS/regtest-gapw/H2O-gapw-all_noortho.inp +++ b/tests/QS/regtest-gapw/H2O-gapw-all_noortho.inp @@ -39,6 +39,7 @@ A 6.0 .2 .0 B .0 6.0 .0 C -.2 .0 6.0 + CANONICALIZE T &END CELL &COORD O 0.000000 0.000000 -0.065587 diff --git a/tests/QS/regtest-gpw-3/rsgrid-dist-2.inp b/tests/QS/regtest-gpw-3/rsgrid-dist-2.inp index 05fb980170..3df1d19971 100644 --- a/tests/QS/regtest-gpw-3/rsgrid-dist-2.inp +++ b/tests/QS/regtest-gpw-3/rsgrid-dist-2.inp @@ -38,6 +38,7 @@ A 6.0 0.0 1.0 B 0.0 6.0 0.0 C 0.0 0.0 6.0 + CANONICALIZE T &END CELL &COORD O 0.000000 0.000000 -0.065587 diff --git a/tests/QS/regtest-gpw-3/rsgrid-dist-3.inp b/tests/QS/regtest-gpw-3/rsgrid-dist-3.inp index 15bdd2a0a1..0712ebe391 100644 --- a/tests/QS/regtest-gpw-3/rsgrid-dist-3.inp +++ b/tests/QS/regtest-gpw-3/rsgrid-dist-3.inp @@ -44,6 +44,7 @@ A 5.0 0.0 3.0 B 1.0 5.0 0.0 C 0.0 2.0 5.0 + CANONICALIZE T &END CELL &COORD O 0.000000 2.000000 1.940000 diff --git a/tests/QS/regtest-gpw-6-2/si8_noort_broy_wc_direct_ene.inp b/tests/QS/regtest-gpw-6-2/si8_noort_broy_wc_direct_ene.inp index 6217a1ed10..1d72904a7a 100644 --- a/tests/QS/regtest-gpw-6-2/si8_noort_broy_wc_direct_ene.inp +++ b/tests/QS/regtest-gpw-6-2/si8_noort_broy_wc_direct_ene.inp @@ -62,6 +62,7 @@ A 5.42858871335 1.0 0.0 B 0.0 5.42858871335 0.0 C 0.00 0.00 5.42858871335 + CANONICALIZE T &END CELL &KIND Si BASIS_SET DZVP-GTH diff --git a/tests/QS/regtest-gpw-6-2/si8_noort_broy_wc_jacobi_ene2.inp b/tests/QS/regtest-gpw-6-2/si8_noort_broy_wc_jacobi_ene2.inp index 31a13432a5..9374ab04ea 100644 --- a/tests/QS/regtest-gpw-6-2/si8_noort_broy_wc_jacobi_ene2.inp +++ b/tests/QS/regtest-gpw-6-2/si8_noort_broy_wc_jacobi_ene2.inp @@ -62,6 +62,7 @@ A 5.42858871335 1.0 0.0 B 0.0 5.42858871335 0.0 C 0.00 0.00 5.42858871335 + CANONICALIZE T &END CELL &KIND Si BASIS_SET DZVP-GTH diff --git a/tests/QS/regtest-gpw-9/C2H4_SCINE.inp b/tests/QS/regtest-gpw-9/C2H4_SCINE.inp index 1d78f18c3a..3e5782fb6c 100644 --- a/tests/QS/regtest-gpw-9/C2H4_SCINE.inp +++ b/tests/QS/regtest-gpw-9/C2H4_SCINE.inp @@ -34,6 +34,7 @@ A 6.0 0.0 0.0 B 0.0 6.0 1.0 C 1.0 0.0 8.0 + CANONICALIZE T &END CELL &COORD C -0.2558206925 -0.0449868417 0.6850619693 diff --git a/tests/QS/regtest-grid/simple_non-ortho_grid_auto.inp b/tests/QS/regtest-grid/simple_non-ortho_grid_auto.inp index d9a2ac33ee..596a992974 100644 --- a/tests/QS/regtest-grid/simple_non-ortho_grid_auto.inp +++ b/tests/QS/regtest-grid/simple_non-ortho_grid_auto.inp @@ -56,6 +56,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-grid/simple_non-ortho_grid_cpu.inp b/tests/QS/regtest-grid/simple_non-ortho_grid_cpu.inp index 2951b35f1a..77e31ed9eb 100644 --- a/tests/QS/regtest-grid/simple_non-ortho_grid_cpu.inp +++ b/tests/QS/regtest-grid/simple_non-ortho_grid_cpu.inp @@ -56,6 +56,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-grid/simple_non-ortho_grid_dgemm.inp b/tests/QS/regtest-grid/simple_non-ortho_grid_dgemm.inp index 642fdca918..748cd60108 100644 --- a/tests/QS/regtest-grid/simple_non-ortho_grid_dgemm.inp +++ b/tests/QS/regtest-grid/simple_non-ortho_grid_dgemm.inp @@ -57,6 +57,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-grid/simple_non-ortho_grid_ref.inp b/tests/QS/regtest-grid/simple_non-ortho_grid_ref.inp index b6ed9d3055..dbc004ce09 100644 --- a/tests/QS/regtest-grid/simple_non-ortho_grid_ref.inp +++ b/tests/QS/regtest-grid/simple_non-ortho_grid_ref.inp @@ -56,6 +56,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-grid/simple_non-ortho_grid_validate.inp b/tests/QS/regtest-grid/simple_non-ortho_grid_validate.inp index e66dfe4643..b7bf9b6477 100644 --- a/tests/QS/regtest-grid/simple_non-ortho_grid_validate.inp +++ b/tests/QS/regtest-grid/simple_non-ortho_grid_validate.inp @@ -56,6 +56,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-kp-1/TEST_FILES.toml b/tests/QS/regtest-kp-1/TEST_FILES.toml index 2f1e9e67c6..aadd2fa031 100644 --- a/tests/QS/regtest-kp-1/TEST_FILES.toml +++ b/tests/QS/regtest-kp-1/TEST_FILES.toml @@ -18,6 +18,8 @@ "h_sym_red_restart.inp" = [{matcher="E_total", tol=1e-8, ref=-4.34916647312477}] "h_noncanonical_kpsym.inp" = [{matcher="E_total", tol=1e-12, ref=-4.34916646889997}, {matcher="N_special_kpoints", tol=0.0, ref=4}] +"h_auto_noncanonical_kpsym.inp" = [{matcher="E_total", tol=1e-12, ref=-4.34916646889997}, + {matcher="N_special_kpoints", tol=0.0, ref=4}] "h_canonical_kpsym.inp" = [{matcher="E_total", tol=1e-12, ref=-4.34916646889997}, {matcher="N_special_kpoints", tol=0.0, ref=2}] "h_canonical_cart_kpsym.inp" = [{matcher="E_total", tol=1e-12, ref=-4.34916646889997}, diff --git a/tests/QS/regtest-kp-1/h_auto_noncanonical_kpsym.inp b/tests/QS/regtest-kp-1/h_auto_noncanonical_kpsym.inp new file mode 100644 index 0000000000..4c34ebcb27 --- /dev/null +++ b/tests/QS/regtest-kp-1/h_auto_noncanonical_kpsym.inp @@ -0,0 +1,69 @@ +&GLOBAL + PRINT_LEVEL LOW + PROJECT H_AUTO_NONCANONICAL_KPSYM + RUN_TYPE ENERGY +&END GLOBAL + +&FORCE_EVAL + &DFT + BASIS_SET_FILE_NAME GTH_BASIS_SETS + POTENTIAL_FILE_NAME POTENTIAL + &KPOINTS + EPS_SYMMETRY 1.e-8 + FULL_GRID OFF + PARALLEL_GROUP_SIZE -1 + SCHEME MONKHORST-PACK 2 2 2 + SYMMETRY ON + VERBOSE T + &END KPOINTS + &MGRID + CUTOFF 280 + REL_CUTOFF 50 + &END MGRID + &QS + EPS_DEFAULT 1.0E-12 + METHOD GPW + &END QS + &SCF + CHOLESKY OFF + EPS_EIGVAL 1.e-8 + EPS_SCF 1.0E-8 + MAX_SCF 20 + SCF_GUESS ATOMIC + &MIXING + ALPHA 0.50 + METHOD BROYDEN_MIXING + &END MIXING + &PRINT + &RESTART OFF + &END RESTART + &END PRINT + &END SCF + &XC + &XC_FUNCTIONAL PADE + &END XC_FUNCTIONAL + &END XC + &END DFT + &SUBSYS + &CELL + A 0.0 3.56683 0.0 + B 3.56683 0.0 0.0 + C 0.0 0.0 3.56683 + &END CELL + &COORD + SCALED + H 0.100000 0.000000 0.000000 + H 0.500000 0.500000 0.000000 + H 0.500000 0.000000 0.500000 + H 0.000000 0.500000 0.500000 + H 0.250000 0.250000 0.250000 + H 0.250000 0.750000 0.750000 + H 0.750000 0.250000 0.750000 + H 0.750000 0.750000 0.250000 + &END COORD + &KIND H + BASIS_SET SZV-GTH + POTENTIAL GTH-PADE-q1 + &END KIND + &END SUBSYS +&END FORCE_EVAL diff --git a/tests/QS/regtest-kp-1/h_canonical_cart_kpsym.inp b/tests/QS/regtest-kp-1/h_canonical_cart_kpsym.inp index bdb9a2634a..6fc630e2f9 100644 --- a/tests/QS/regtest-kp-1/h_canonical_cart_kpsym.inp +++ b/tests/QS/regtest-kp-1/h_canonical_cart_kpsym.inp @@ -49,6 +49,7 @@ A 0.0 3.56683 0.0 B 3.56683 0.0 0.0 C 0.0 0.0 3.56683 + CANONICALIZE T &END CELL &COORD UNIT ANGSTROM diff --git a/tests/QS/regtest-kp-1/h_canonical_kpsym.inp b/tests/QS/regtest-kp-1/h_canonical_kpsym.inp index 0cb44a5ac9..ec43bf1408 100644 --- a/tests/QS/regtest-kp-1/h_canonical_kpsym.inp +++ b/tests/QS/regtest-kp-1/h_canonical_kpsym.inp @@ -49,6 +49,7 @@ A 0.0 3.56683 0.0 B 3.56683 0.0 0.0 C 0.0 0.0 3.56683 + CANONICALIZE T &END CELL &COORD SCALED diff --git a/tests/QS/regtest-libxc/diamond_br89_libxc.inp b/tests/QS/regtest-libxc/diamond_br89_libxc.inp index 84659be2c7..250373119d 100644 --- a/tests/QS/regtest-libxc/diamond_br89_libxc.inp +++ b/tests/QS/regtest-libxc/diamond_br89_libxc.inp @@ -39,6 +39,7 @@ A 0.0000 1.7835 1.7835 B 1.7835 0.0000 1.7835 C 1.7835 1.7835 0.0000 + CANONICALIZE T MULTIPLE_UNIT_CELL 1 1 1 &END CELL &COORD diff --git a/tests/QS/regtest-libxc/diamond_br89_libxc_uks.inp b/tests/QS/regtest-libxc/diamond_br89_libxc_uks.inp index fc9673b39e..491425925f 100644 --- a/tests/QS/regtest-libxc/diamond_br89_libxc_uks.inp +++ b/tests/QS/regtest-libxc/diamond_br89_libxc_uks.inp @@ -40,6 +40,7 @@ A 0.0000 1.7835 1.7835 B 1.7835 0.0000 1.7835 C 1.7835 1.7835 0.0000 + CANONICALIZE T MULTIPLE_UNIT_CELL 1 1 1 &END CELL &COORD diff --git a/tests/QS/regtest-mp2-grad-2/O2_dyn_mme.inp b/tests/QS/regtest-mp2-grad-2/O2_dyn_mme.inp index a55364e42a..6fb350d9e0 100644 --- a/tests/QS/regtest-mp2-grad-2/O2_dyn_mme.inp +++ b/tests/QS/regtest-mp2-grad-2/O2_dyn_mme.inp @@ -81,6 +81,7 @@ A 8.0 0.05 0.0 B 0.05 8.0 0.0 C 0.05 0.0 8.0 + CANONICALIZE T &END CELL &COORD O 4.0000000084 4.0000000084 4.6623718822 diff --git a/tests/QS/regtest-nonortho/graph_b111.inp b/tests/QS/regtest-nonortho/graph_b111.inp index 331412f845..5598f52196 100644 --- a/tests/QS/regtest-nonortho/graph_b111.inp +++ b/tests/QS/regtest-nonortho/graph_b111.inp @@ -83,6 +83,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-nonortho/graph_b111_gapw.inp b/tests/QS/regtest-nonortho/graph_b111_gapw.inp index cb3f844593..8cdff85c24 100644 --- a/tests/QS/regtest-nonortho/graph_b111_gapw.inp +++ b/tests/QS/regtest-nonortho/graph_b111_gapw.inp @@ -84,6 +84,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-nonortho/graphite-lumo.inp b/tests/QS/regtest-nonortho/graphite-lumo.inp index a47e3bcf66..d7b195e848 100644 --- a/tests/QS/regtest-nonortho/graphite-lumo.inp +++ b/tests/QS/regtest-nonortho/graphite-lumo.inp @@ -55,6 +55,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-nonortho/graphite.inp b/tests/QS/regtest-nonortho/graphite.inp index b602dd6358..395e412585 100644 --- a/tests/QS/regtest-nonortho/graphite.inp +++ b/tests/QS/regtest-nonortho/graphite.inp @@ -47,6 +47,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-nonortho/graphite2.inp b/tests/QS/regtest-nonortho/graphite2.inp index d1ef32c1f4..ff03df327a 100644 --- a/tests/QS/regtest-nonortho/graphite2.inp +++ b/tests/QS/regtest-nonortho/graphite2.inp @@ -54,6 +54,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-nonortho/graphite3.inp b/tests/QS/regtest-nonortho/graphite3.inp index 8e34cd4762..33494245b7 100644 --- a/tests/QS/regtest-nonortho/graphite3.inp +++ b/tests/QS/regtest-nonortho/graphite3.inp @@ -59,6 +59,7 @@ A 1.22800000 -2.12695839 0.00000000 B 1.22800000 2.12695839 0.00000000 C 0.00000000 0.00000000 6.69600000 + CANONICALIZE T &END CELL &COORD C 0.00000000 0.00000000 1.67400000 diff --git a/tests/QS/regtest-ri-mp2/RI_MP2_H2O_NONORTHO_MME.inp b/tests/QS/regtest-ri-mp2/RI_MP2_H2O_NONORTHO_MME.inp index 7267ae0fd9..1ec7db2e67 100644 --- a/tests/QS/regtest-ri-mp2/RI_MP2_H2O_NONORTHO_MME.inp +++ b/tests/QS/regtest-ri-mp2/RI_MP2_H2O_NONORTHO_MME.inp @@ -58,6 +58,7 @@ A 8.0 -0.1 0.2 B -0.2 8.0 0.1 C 0.2 -0.2 8.0 + CANONICALIZE T &END CELL &KIND H BASIS_SET DZVP-GTH diff --git a/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens-pulse-1.inp b/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens-pulse-1.inp index 847dcf8783..8e06de4c95 100644 --- a/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens-pulse-1.inp +++ b/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens-pulse-1.inp @@ -91,6 +91,7 @@ A 5.42858871335 1.0 0.0 B 0.0 5.42858871335 0.0 C 0.00 0.00 5.42858871335 + CANONICALIZE T &END CELL &KIND Si BASIS_SET DZVP-GTH diff --git a/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens-restart.inp b/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens-restart.inp index a5b2dc6fda..3c4cc5f06d 100644 --- a/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens-restart.inp +++ b/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens-restart.inp @@ -88,6 +88,7 @@ A 5.42858871335 1.0 0.0 B 0.0 5.42858871335 0.0 C 0.00 0.00 5.42858871335 + CANONICALIZE T &END CELL &KIND Si BASIS_SET DZVP-GTH diff --git a/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens.inp b/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens.inp index 0b8eaacfa0..87ae7807a4 100644 --- a/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens.inp +++ b/tests/QS/regtest-rtp-5/si8-smearing-rtp-dens.inp @@ -84,6 +84,7 @@ A 5.42858871335 1.0 0.0 B 0.0 5.42858871335 0.0 C 0.00 0.00 5.42858871335 + CANONICALIZE T &END CELL &KIND Si BASIS_SET DZVP-GTH diff --git a/tests/QS/regtest-slab/hbn3_1h2o_ff_pyz.inp b/tests/QS/regtest-slab/hbn3_1h2o_ff_pyz.inp index 5d2aa475fc..d667f8a959 100644 --- a/tests/QS/regtest-slab/hbn3_1h2o_ff_pyz.inp +++ b/tests/QS/regtest-slab/hbn3_1h2o_ff_pyz.inp @@ -109,6 +109,7 @@ A 0.00 7.50000 0.00000 B 0.00 3.75000 6.49518 C 12.0 0.00000 0.00000 + CANONICALIZE T &END CELL &KIND B BASIS_SET DZVP-MOLOPT-SR-GTH diff --git a/tests/SIRIUS/regtest-1/Au.inp b/tests/SIRIUS/regtest-1/Au.inp index 18f449b324..cb14b74613 100644 --- a/tests/SIRIUS/regtest-1/Au.inp +++ b/tests/SIRIUS/regtest-1/Au.inp @@ -53,6 +53,7 @@ A [bohr] -3.85500000000000000000 0.0 3.85500000000000000000 B [bohr] 0.0 3.85500000000000000000 3.85500000000000000000 C [bohr] -3.85500000000000000000 3.85500000000000000000 0.0 + CANONICALIZE T &END CELL &COORD SCALED diff --git a/tests/SIRIUS/regtest-1/Au_GTH_SOC.inp b/tests/SIRIUS/regtest-1/Au_GTH_SOC.inp index bf547a81ac..f8872cb5df 100644 --- a/tests/SIRIUS/regtest-1/Au_GTH_SOC.inp +++ b/tests/SIRIUS/regtest-1/Au_GTH_SOC.inp @@ -54,6 +54,7 @@ A [bohr] -3.85500000000000000000 0.0 3.85500000000000000000 B [bohr] 0.0 3.85500000000000000000 3.85500000000000000000 C [bohr] -3.85500000000000000000 3.85500000000000000000 0.0 + CANONICALIZE T &END CELL &COORD SCALED