From 9e3b958e07ebcc1858405daff1033b1a94d88f58 Mon Sep 17 00:00:00 2001 From: LiangWenshuo1118 <73432685+LiangWenshuo1118@users.noreply.github.com> Date: Sat, 2 Apr 2022 11:42:07 +0800 Subject: [PATCH 1/9] Update param_CH4_deepmd-kit-2.0.1.json (#694) old keyword "stop_batch" -> new keyword "numb_steps" --- examples/run/dp2.x-lammps-vasp/param_CH4_deepmd-kit-2.0.1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/run/dp2.x-lammps-vasp/param_CH4_deepmd-kit-2.0.1.json b/examples/run/dp2.x-lammps-vasp/param_CH4_deepmd-kit-2.0.1.json index 15f682cdc..01af1221b 100644 --- a/examples/run/dp2.x-lammps-vasp/param_CH4_deepmd-kit-2.0.1.json +++ b/examples/run/dp2.x-lammps-vasp/param_CH4_deepmd-kit-2.0.1.json @@ -70,7 +70,7 @@ }, "training": { "set_prefix": "set", - "stop_batch": 2000, + "numb_steps": 2000, "batch_size": 1, "disp_file": "lcurve.out", "disp_freq": 1000, From ddbcaa93dd7022e35eaf2b26497bbb32afeb1b9c Mon Sep 17 00:00:00 2001 From: Tongqi Wen <31176774+kevinwenminion@users.noreply.github.com> Date: Wed, 13 Apr 2022 09:29:33 +0800 Subject: [PATCH 2/9] add bcc interstitial calculation and change some default parameters in lmp (#696) * metal testing for alloys and pair_coeff compatible with the latest lammps * add bcc self interstitial calculations * bcc interstitial optimization and change some default parameters in lmp * fix lmp default parameters * bcc interstitial optimization * add bcc interstitial unittest Co-authored-by: kevinwenminion --- dpgen/auto_test/Interstitial.py | 114 ++++++++++++++++++++++++ dpgen/auto_test/common_equi.py | 18 ++-- dpgen/auto_test/lib/lammps.py | 18 ++-- tests/auto_test/equi/vasp/CONTCAR_V_bcc | 13 +++ tests/auto_test/test_interstitial.py | 101 +++++++++++++++++++++ 5 files changed, 248 insertions(+), 16 deletions(-) create mode 100644 tests/auto_test/equi/vasp/CONTCAR_V_bcc create mode 100644 tests/auto_test/test_interstitial.py diff --git a/dpgen/auto_test/Interstitial.py b/dpgen/auto_test/Interstitial.py index 9f781c88e..16238874e 100644 --- a/dpgen/auto_test/Interstitial.py +++ b/dpgen/auto_test/Interstitial.py @@ -172,6 +172,120 @@ def make_confs(self, dumpfn(self.supercell, 'supercell.json') os.chdir(cwd) + + if 'bcc_self' in self.parameter and self.parameter['bcc_self']: + os.chdir(path_to_work) + with open('POSCAR', 'r') as fin: + fin.readline() + scale = float(fin.readline().split()[0]) + latt_param = float(fin.readline().split()[0]) + latt_param *= scale + + if not os.path.isfile('task.000000/POSCAR'): + raise RuntimeError("need task.000000 structure as reference") + + with open('task.000000/POSCAR', 'r') as fin: + pos_line = fin.read().split('\n') + + super_latt_param = float(pos_line[2].split()[0]) + + output_task1 = os.path.join(path_to_work, 'task.%06d' % (len(dss))) + os.makedirs(output_task1, exist_ok=True) + os.chdir(output_task1) + task_list.append(output_task1) + with open(insert_element_task, 'a+') as fout: + print(self.insert_ele[0], file=fout) + dumpfn(self.supercell, 'supercell.json') + pos_line[-2] = '%.6f' % float(latt_param/4/super_latt_param) + ' ' + '%.6f' % float(latt_param/2/super_latt_param) + ' 0.000000 ' + self.insert_ele[0] + with open('POSCAR', 'w+') as fout: + for ii in pos_line: + print(ii, file=fout) + print('gen bcc tetrahedral') + os.chdir(cwd) + + output_task2 = os.path.join(path_to_work, 'task.%06d' % (len(dss)+1)) + os.makedirs(output_task2, exist_ok=True) + os.chdir(output_task2) + task_list.append(output_task2) + with open(insert_element_task, 'a+') as fout: + print(self.insert_ele[0], file=fout) + dumpfn(self.supercell, 'supercell.json') + pos_line[-2] = '%.6f' % float(latt_param/2/super_latt_param) + ' ' + '%.6f' % float(latt_param/2/super_latt_param) + ' 0.000000 ' + self.insert_ele[0] + with open('POSCAR', 'w+') as fout: + for ii in pos_line: + print(ii, file=fout) + print('gen bcc octahedral') + os.chdir(cwd) + + output_task3 = os.path.join(path_to_work, 'task.%06d' % (len(dss)+2)) + os.makedirs(output_task3, exist_ok=True) + os.chdir(output_task3) + task_list.append(output_task3) + with open(insert_element_task, 'a+') as fout: + print(self.insert_ele[0], file=fout) + dumpfn(self.supercell, 'supercell.json') + pos_line[-2] = '%.6f' % float(latt_param/4/super_latt_param) + ' ' + '%.6f' % float(latt_param/4/super_latt_param) + ' ' + '%.6f' % float(latt_param/4/super_latt_param) + ' ' + self.insert_ele[0] + with open('POSCAR', 'w+') as fout: + for ii in pos_line: + print(ii, file=fout) + print('gen bcc crowdion') + os.chdir(cwd) + + for idx, ii in enumerate(pos_line): + ss = ii.split() + if len(ss) > 3: + if abs(latt_param/2/super_latt_param - float(ss[0])) < 1e-5 and abs(latt_param/2/super_latt_param - float(ss[1])) < 1e-5 and abs(latt_param/2/super_latt_param - float(ss[2])) < 1e-5: + replace_label = idx + + output_task4 = os.path.join(path_to_work, 'task.%06d' % (len(dss)+3)) + os.makedirs(output_task4, exist_ok=True) + os.chdir(output_task4) + task_list.append(output_task4) + with open(insert_element_task, 'a+') as fout: + print(self.insert_ele[0], file=fout) + dumpfn(self.supercell, 'supercell.json') + pos_line[-2] = '%.6f' % float(latt_param/3/super_latt_param) + ' ' + '%.6f' % float(latt_param/3/super_latt_param) + ' ' + '%.6f' % float(latt_param/3/super_latt_param) + ' ' + self.insert_ele[0] + pos_line[replace_label] = '%.6f' % float(latt_param/3*2/super_latt_param) + ' ' + '%.6f' % float(latt_param/3*2/super_latt_param) + ' ' + '%.6f' % float(latt_param/3*2/super_latt_param) + ' ' + self.insert_ele[0] + + with open('POSCAR', 'w+') as fout: + for ii in pos_line: + print(ii, file=fout) + print('gen bcc <111> dumbbell') + os.chdir(cwd) + + output_task5 = os.path.join(path_to_work, 'task.%06d' % (len(dss)+4)) + os.makedirs(output_task5, exist_ok=True) + os.chdir(output_task5) + task_list.append(output_task5) + with open(insert_element_task, 'a+') as fout: + print(self.insert_ele[0], file=fout) + dumpfn(self.supercell, 'supercell.json') + pos_line[-2] = '%.6f' % float((latt_param+2.1/2**0.5)/2/super_latt_param) + ' ' + '%.6f' % float((latt_param-2.1/2**0.5)/2/super_latt_param) + ' ' + '%.6f' % float(latt_param/2/super_latt_param) + ' ' + self.insert_ele[0] + pos_line[replace_label] = '%.6f' % float((latt_param-2.1/2**0.5)/2/super_latt_param) + ' ' + '%.6f' % float((latt_param+2.1/2**0.5)/2/super_latt_param) + ' ' + '%.6f' % float(latt_param/2/super_latt_param) + ' ' + self.insert_ele[0] + + with open('POSCAR', 'w+') as fout: + for ii in pos_line: + print(ii, file=fout) + print('gen bcc <110> dumbbell') + os.chdir(cwd) + + output_task6 = os.path.join(path_to_work, 'task.%06d' % (len(dss)+5)) + os.makedirs(output_task6, exist_ok=True) + os.chdir(output_task6) + task_list.append(output_task6) + with open(insert_element_task, 'a+') as fout: + print(self.insert_ele[0], file=fout) + dumpfn(self.supercell, 'supercell.json') + pos_line[-2] = '%.6f' % float(latt_param/2/super_latt_param) + ' ' + '%.6f' % float(latt_param/2/super_latt_param) + ' ' + '%.6f' % float((latt_param-2.1)/2/super_latt_param) + ' ' + self.insert_ele[0] + pos_line[replace_label] = '%.6f' % float(latt_param/2/super_latt_param) + ' ' + '%.6f' % float(latt_param/2/super_latt_param) + ' ' + '%.6f' % float((latt_param+2.1)/2/super_latt_param) + ' ' + self.insert_ele[0] + + with open('POSCAR', 'w+') as fout: + for ii in pos_line: + print(ii, file=fout) + print('gen bcc <100> dumbbell') + os.chdir(cwd) + + return task_list def post_process(self, task_list): diff --git a/dpgen/auto_test/common_equi.py b/dpgen/auto_test/common_equi.py index 4be84b008..855c1e2f3 100644 --- a/dpgen/auto_test/common_equi.py +++ b/dpgen/auto_test/common_equi.py @@ -39,7 +39,11 @@ def make_equi(confs, # ... cwd = os.getcwd() # generate poscar for single element crystal - if len(ele_list) == 1: + if len(ele_list) == 1 or 'single' in inter_param: + if 'single' in inter_param: + element_label = int(inter_param['single']) + else: + element_label = 0 for ii in conf_dirs: os.chdir(ii) crys_type = ii.split('/')[-1] @@ -47,22 +51,22 @@ def make_equi(confs, dlog.debug('pwd: %s' % os.getcwd()) if crys_type == 'std-fcc': if not os.path.exists('POSCAR'): - crys.fcc1(ele_list[0]).to('POSCAR', 'POSCAR') + crys.fcc1(ele_list[element_label]).to('POSCAR', 'POSCAR') elif crys_type == 'std-hcp': if not os.path.exists('POSCAR'): - crys.hcp(ele_list[0]).to('POSCAR', 'POSCAR') + crys.hcp(ele_list[element_label]).to('POSCAR', 'POSCAR') elif crys_type == 'std-dhcp': if not os.path.exists('POSCAR'): - crys.dhcp(ele_list[0]).to('POSCAR', 'POSCAR') + crys.dhcp(ele_list[element_label]).to('POSCAR', 'POSCAR') elif crys_type == 'std-bcc': if not os.path.exists('POSCAR'): - crys.bcc(ele_list[0]).to('POSCAR', 'POSCAR') + crys.bcc(ele_list[element_label]).to('POSCAR', 'POSCAR') elif crys_type == 'std-diamond': if not os.path.exists('POSCAR'): - crys.diamond(ele_list[0]).to('POSCAR', 'POSCAR') + crys.diamond(ele_list[element_label]).to('POSCAR', 'POSCAR') elif crys_type == 'std-sc': if not os.path.exists('POSCAR'): - crys.sc(ele_list[0]).to('POSCAR', 'POSCAR') + crys.sc(ele_list[element_label]).to('POSCAR', 'POSCAR') os.chdir(cwd) task_dirs = [] diff --git a/dpgen/auto_test/lib/lammps.py b/dpgen/auto_test/lib/lammps.py index a1c225e95..a47fcfeb6 100644 --- a/dpgen/auto_test/lib/lammps.py +++ b/dpgen/auto_test/lib/lammps.py @@ -115,7 +115,7 @@ def inter_deepmd(param): ret += "%s out_freq 10 out_file model_devi.out\n" % model_list else: ret += models[0] + '\n' - ret += "pair_coeff\n" + ret += "pair_coeff * *\n" return ret @@ -175,7 +175,7 @@ def make_lammps_eval(conf, type_map, interaction, param): ret += "clear\n" ret += "units metal\n" ret += "dimension 3\n" - ret += "boundary p p p\n" + ret += "boundary p p p\n" ret += "atom_style atomic\n" ret += "box tilt large\n" ret += "read_data %s\n" % conf @@ -212,7 +212,7 @@ def make_lammps_eval(conf, type_map, interaction, param): def make_lammps_equi(conf, type_map, interaction, param, - etol=1e-12, ftol=1e-6, + etol=0, ftol=1e-10, maxiter=5000, maxeval=500000, change_box=True): type_map_list = element_list(type_map) @@ -224,7 +224,7 @@ def make_lammps_equi(conf, type_map, interaction, param, ret += "clear\n" ret += "units metal\n" ret += "dimension 3\n" - ret += "boundary p p p\n" + ret += "boundary p p p\n" ret += "atom_style atomic\n" ret += "box tilt large\n" ret += "read_data %s\n" % conf @@ -268,7 +268,7 @@ def make_lammps_equi(conf, type_map, interaction, param, def make_lammps_elastic(conf, type_map, interaction, param, - etol=1e-12, ftol=1e-6, + etol=0, ftol=1e-10, maxiter=5000, maxeval=500000): type_map_list = element_list(type_map) @@ -279,7 +279,7 @@ def make_lammps_elastic(conf, type_map, interaction, param, ret += "clear\n" ret += "units metal\n" ret += "dimension 3\n" - ret += "boundary p p p\n" + ret += "boundary p p p\n" ret += "atom_style atomic\n" ret += "box tilt large\n" ret += "read_data %s\n" % conf @@ -314,7 +314,7 @@ def make_lammps_elastic(conf, type_map, interaction, param, def make_lammps_press_relax(conf, type_map, scale2equi, interaction, param, B0=70, bp=0, - etol=1e-12, ftol=1e-6, + etol=0, ftol=1e-10, maxiter=5000, maxeval=500000): type_map_list = element_list(type_map) @@ -371,7 +371,7 @@ def make_lammps_press_relax(conf, type_map, scale2equi, interaction, param, def make_lammps_phonon(conf, masses, interaction, param, - etol=1e-12, ftol=1e-6, + etol=0, ftol=1e-10, maxiter=5000, maxeval=500000): """ make lammps input for elastic calculation @@ -380,7 +380,7 @@ def make_lammps_phonon(conf, masses, interaction, param, ret += "clear\n" ret += "units metal\n" ret += "dimension 3\n" - ret += "boundary p p p\n" + ret += "boundary p p p\n" ret += "atom_style atomic\n" ret += "box tilt large\n" ret += "read_data %s\n" % conf diff --git a/tests/auto_test/equi/vasp/CONTCAR_V_bcc b/tests/auto_test/equi/vasp/CONTCAR_V_bcc new file mode 100644 index 000000000..86ba9d37c --- /dev/null +++ b/tests/auto_test/equi/vasp/CONTCAR_V_bcc @@ -0,0 +1,13 @@ +V2 + 1.0000000000000000 + 2.9975462819866885 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 2.9975462819866885 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 2.9975462819866885 + V + 2 +Direct + 0.0000000000000000 0.0000000000000000 0.0000000000000000 + 0.5000000000000000 0.5000000000000000 0.5000000000000000 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/auto_test/test_interstitial.py b/tests/auto_test/test_interstitial.py new file mode 100644 index 000000000..dc1652535 --- /dev/null +++ b/tests/auto_test/test_interstitial.py @@ -0,0 +1,101 @@ +import os, sys, json, glob, shutil +import dpdata +import numpy as np +import unittest +import dpdata +from monty.serialization import loadfn, dumpfn +from pymatgen.core import Structure +from pymatgen.io.vasp import Incar +from pymatgen.symmetry.analyzer import SpacegroupAnalyzer +from pymatgen.analysis.defects.core import Interstitial as pmg_Interstitial + +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) +__package__ = 'auto_test' + +from .context import make_kspacing_kpoints +from .context import setUpModule + +from dpgen.auto_test.Interstitial import Interstitial + + +class TestInterstitial(unittest.TestCase): + + def setUp(self): + _jdata = { + "structures": ["confs/std-bcc"], + "interaction": { + "type": "vasp", + "incar": "vasp_input/INCAR.rlx", + "potcar_prefix": "vasp_input", + "potcars": {"V": "POTCAR"} + }, + "properties": [ + { + "type": "interstitial", + "supercell": [1, 1, 1], + "insert_ele": ["V"], + "bcc_self": True + } + ] + } + + self.equi_path = 'confs/std-bcc/relaxation/relax_task' + self.source_path = 'equi/vasp' + self.target_path = 'confs/std-bcc/interstitial_00' + if not os.path.exists(self.equi_path): + os.makedirs(self.equi_path) + if not os.path.exists(self.target_path): + os.makedirs(self.target_path) + + self.confs = _jdata["structures"] + self.inter_param = _jdata["interaction"] + self.prop_param = _jdata['properties'] + + self.interstitial = Interstitial(_jdata['properties'][0]) + + def tearDown(self): + if os.path.exists(self.equi_path): + shutil.rmtree(self.equi_path) + if os.path.exists(self.target_path): + shutil.rmtree(self.target_path) + + def test_task_type(self): + self.assertEqual('interstitial', self.interstitial.task_type()) + + def test_task_param(self): + self.assertEqual(self.prop_param[0], self.interstitial.task_param()) + + def test_make_confs_bcc(self): + if not os.path.exists(os.path.join(self.equi_path, 'CONTCAR')): + with self.assertRaises(RuntimeError): + self.interstitial.make_confs(self.target_path, self.equi_path) + shutil.copy(os.path.join(self.source_path, 'CONTCAR_V_bcc'), os.path.join(self.equi_path, 'CONTCAR')) + task_list = self.interstitial.make_confs(self.target_path, self.equi_path) + dfm_dirs = glob.glob(os.path.join(self.target_path, 'task.*')) + self.assertEqual(len(dfm_dirs), 7) + + incar0 = Incar.from_file(os.path.join('vasp_input', 'INCAR.rlx')) + incar0['ISIF'] = 3 + + self.assertEqual(os.path.realpath(os.path.join(self.equi_path, 'CONTCAR')), + os.path.realpath(os.path.join(self.target_path, 'POSCAR'))) + ref_st = Structure.from_file(os.path.join(self.target_path, 'POSCAR')) + dfm_dirs.sort() + for ii in dfm_dirs[:4]: + st_file = os.path.join(ii, 'POSCAR') + self.assertTrue(os.path.isfile(st_file)) + st0 = Structure.from_file(st_file) + inter_site = st0[-1] + inter = pmg_Interstitial(ref_st, inter_site, charge=0.0) + st1 = inter.generate_defect_structure(self.prop_param[0]['supercell']) + self.assertEqual(st0, st1) + + for ii in dfm_dirs[4:]: + st_file = os.path.join(ii, 'POSCAR') + self.assertTrue(os.path.isfile(st_file)) + st0 = Structure.from_file(st_file) + inter_site1 = st0.pop(-1) + inter_site2 = st0.pop(-1) + center = (inter_site1.coords + inter_site2.coords) / 2 + self.assertTrue((center[0] - center[1]) < 1e-4) + self.assertTrue((center[1] - center[2]) < 1e-4) From 80ad9c146de429312d86fa9a6e1a84690a63a0a0 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 19 Apr 2022 01:43:15 -0400 Subject: [PATCH 3/9] batch replace 'except:' with 'except Exception:' (#703) The latter will not catch `KeyboardInterrupt` and `SystemExit`. See https://stackoverflow.com/a/18982726/9567349. --- dpgen/auto_test/Lammps.py | 2 +- dpgen/data/gen.py | 6 +++--- dpgen/data/reaction.py | 2 +- dpgen/data/surf.py | 4 ++-- dpgen/data/tools/cessp2force_lin.py | 2 +- dpgen/database/run.py | 2 +- dpgen/database/vasp.py | 6 +++--- dpgen/dispatcher/ALI.py | 8 ++++---- dpgen/dispatcher/Dispatcher.py | 2 +- dpgen/dispatcher/DispatcherList.py | 4 ++-- dpgen/dispatcher/LSF.py | 2 +- dpgen/dispatcher/SSHContext.py | 2 +- dpgen/dispatcher/Shell.py | 4 ++-- dpgen/dispatcher/Slurm.py | 4 ++-- dpgen/generator/run.py | 8 ++++---- dpgen/remote/RemoteJob.py | 14 +++++++------- dpgen/remote/decide_machine.py | 6 +++--- dpgen/remote/group_jobs.py | 4 ++-- dpgen/simplify/simplify.py | 4 ++-- dpgen/tools/relabel.py | 4 ++-- dpgen/tools/stat_iter.py | 4 ++-- tests/auto_test/test_mpdb.py | 2 +- tests/database/test_db_vasp.py | 4 ++-- tests/dispatcher/shell/test_shell_ssh.py | 2 +- tests/dispatcher/test_ssh_context.py | 4 ++-- 25 files changed, 53 insertions(+), 53 deletions(-) diff --git a/dpgen/auto_test/Lammps.py b/dpgen/auto_test/Lammps.py index b39211710..adc34eb93 100644 --- a/dpgen/auto_test/Lammps.py +++ b/dpgen/auto_test/Lammps.py @@ -289,7 +289,7 @@ def compute(self, if len(line) and str(ii) == line[0]: try: [float(kk) for kk in line] - except: + except Exception: continue stress.append([]) virial.append([]) diff --git a/dpgen/data/gen.py b/dpgen/data/gen.py index b14034c1d..1e3cba355 100644 --- a/dpgen/data/gen.py +++ b/dpgen/data/gen.py @@ -571,7 +571,7 @@ def make_scale(jdata): try: pos_src = os.path.join(os.path.join(init_path, ii), 'CONTCAR') assert(os.path.isfile(pos_src)) - except: + except Exception: raise RuntimeError("not file %s, vasp relaxation should be run before scale poscar") scale_path = os.path.join(work_path, ii) scale_path = os.path.join(scale_path, "scale-%.3f" % jj) @@ -604,7 +604,7 @@ def make_scale_ABACUS(jdata): try: pos_src = os.path.join(os.path.join(init_path, ii), 'OUT.ABACUS/STRU_ION_D') assert(os.path.isfile(pos_src)) - except: + except Exception: raise RuntimeError("not file %s, vasp relaxation should be run before scale poscar") scale_path = os.path.join(work_path, ii) scale_path = os.path.join(scale_path, "scale-%.3f" % jj) @@ -1238,7 +1238,7 @@ def gen_init_bulk(args) : jdata=loadfn(args.PARAM) if args.MACHINE is not None: mdata=loadfn(args.MACHINE) - except: + except Exception: with open (args.PARAM, 'r') as fp : jdata = json.load (fp) if args.MACHINE is not None: diff --git a/dpgen/data/reaction.py b/dpgen/data/reaction.py index 5e1f4f120..b9574d525 100644 --- a/dpgen/data/reaction.py +++ b/dpgen/data/reaction.py @@ -191,7 +191,7 @@ def gen_init_reaction(args): jdata = loadfn(args.PARAM) if args.MACHINE is not None: mdata = loadfn(args.MACHINE) - except: + except Exception: with open(args.PARAM, 'r') as fp: jdata = json.load(fp) if args.MACHINE is not None: diff --git a/dpgen/data/surf.py b/dpgen/data/surf.py index 13420e118..bc31b6705 100644 --- a/dpgen/data/surf.py +++ b/dpgen/data/surf.py @@ -447,7 +447,7 @@ def make_scale(jdata): try: pos_src = os.path.join(os.path.join(init_path, ii), 'CONTCAR') assert(os.path.isfile(pos_src)) - except: + except Exception: raise RuntimeError("not file %s, vasp relaxation should be run before scale poscar") scale_path = os.path.join(work_path, ii) scale_path = os.path.join(scale_path, "scale-%.3f" % jj) @@ -583,7 +583,7 @@ def gen_init_surf(args): jdata=loadfn(args.PARAM) if args.MACHINE is not None: mdata=loadfn(args.MACHINE) - except: + except Exception: with open (args.PARAM, 'r') as fp : jdata = json.load (fp) if args.MACHINE is not None: diff --git a/dpgen/data/tools/cessp2force_lin.py b/dpgen/data/tools/cessp2force_lin.py index 1cead0ba8..ceaa3b775 100755 --- a/dpgen/data/tools/cessp2force_lin.py +++ b/dpgen/data/tools/cessp2force_lin.py @@ -290,7 +290,7 @@ def Parser(): try: name = str(item.split('=')[0]) number = int(item.split('=')[1]) - except: + except Exception: sys.stderr.write("\nERROR: Could not read the -c string\n") sys.exit() if number >= max_types: diff --git a/dpgen/database/run.py b/dpgen/database/run.py index 7a524a459..f66e4c56f 100644 --- a/dpgen/database/run.py +++ b/dpgen/database/run.py @@ -83,7 +83,7 @@ def _parsing_vasp(paths,config_info_dict, id_prefix,iters=True): iter_record.sort() dlog.info("iter_record") dlog.info(iter_record) - except: + except Exception: pass for path in paths: try: diff --git a/dpgen/database/vasp.py b/dpgen/database/vasp.py index 72b26075f..add777e6d 100644 --- a/dpgen/database/vasp.py +++ b/dpgen/database/vasp.py @@ -27,7 +27,7 @@ def __init__(self,symbols=None,functional="PBE",pp_file=None,pp_lists=None): else: try: self.potcars=Potcar(symbols=symbols, functional=functional) - except: + except Exception: warnings.warn ("""Inproperly configure of POTCAR !""") self.potcars=None @@ -80,7 +80,7 @@ def from_file(cls,filename): try: potcars=Potcar.from_file(filename) return cls(pp_lists=potcars) - except: + except Exception: with open(filename,'r') as f: content=f.readlines() functional=content[0].strip().split(':')[-1].strip() @@ -179,7 +179,7 @@ def from_directory(input_dir, optional_files=None): ("POSCAR", Poscar), ("POTCAR", DPPotcar)]: fullzpath = zpath(os.path.join(input_dir, fname)) sub_d[fname.lower()] = ftype.from_file(fullzpath) - except: + except Exception: for fname, ftype in [("INCAR", Incar), ("POSCAR", Poscar), ("POTCAR", DPPotcar)]: fullzpath = zpath(os.path.join(input_dir, fname)) diff --git a/dpgen/dispatcher/ALI.py b/dpgen/dispatcher/ALI.py index ef4f850b2..2a01ab378 100644 --- a/dpgen/dispatcher/ALI.py +++ b/dpgen/dispatcher/ALI.py @@ -352,7 +352,7 @@ def delete_template(self): response = self.client.do_action_with_exception(request) flag = 1 break - except: + except Exception: count += 1 # count = 10 and still failed, continue @@ -382,7 +382,7 @@ def get_image_id(self, img_name): return img["ImageId"] flag = 1 break - except: + except Exception: count += 1 time.sleep(10) if not flag: @@ -441,7 +441,7 @@ def change_apg_capasity(self, capasity): response = self.client.do_action_with_exception(request) flag = 1 break - except: + except Exception: count += 1 time.sleep(10) if not flag: @@ -510,5 +510,5 @@ def get_ip(self, instance_list): else: ip_list.append(response["Instances"]["Instance"][0]["VpcAttributes"]["PrivateIpAddress"]['IpAddress'][0]) return ip_list - except: return [] + except Exception: return [] diff --git a/dpgen/dispatcher/Dispatcher.py b/dpgen/dispatcher/Dispatcher.py index 239654b26..579a71cd3 100644 --- a/dpgen/dispatcher/Dispatcher.py +++ b/dpgen/dispatcher/Dispatcher.py @@ -333,7 +333,7 @@ def make_dispatcher(mdata, mdata_resource=None, work_path=None, run_tasks=None, context_type = 'local' try: batch_type = mdata['batch'] - except: + except Exception: dlog.info('cannot find key "batch" in machine file, try to use deprecated key "machine_type"') batch_type = mdata['machine_type'] lazy_local = (mdata.get('lazy-local', False)) or (mdata.get('lazy_local', False)) diff --git a/dpgen/dispatcher/DispatcherList.py b/dpgen/dispatcher/DispatcherList.py index ba72b7bd2..085ae5d9a 100644 --- a/dpgen/dispatcher/DispatcherList.py +++ b/dpgen/dispatcher/DispatcherList.py @@ -178,7 +178,7 @@ def make_dispatcher(self, ii): self.dispatcher_list[ii]["dispatcher_status"] = "unsubmitted" flag = 1 break - except: + except Exception: count += 1 time.sleep(60) if not flag: @@ -201,7 +201,7 @@ def check_dispatcher_status(self, ii, allow_failue=False): finished = self.dispatcher_list[ii]["dispatcher"].all_finished(self.dispatcher_list[ii]["entity"].job_handler, allow_failue, clean) if finished: self.dispatcher_list[ii]["dispatcher_status"] = "finished" - except: + except Exception: pass elif status == 1: # self.dispatcher_list[ii]["dispatcher_status"] = "terminated" diff --git a/dpgen/dispatcher/LSF.py b/dpgen/dispatcher/LSF.py index c31b5178c..dfde7c5e3 100644 --- a/dpgen/dispatcher/LSF.py +++ b/dpgen/dispatcher/LSF.py @@ -11,7 +11,7 @@ class LSF(Batch) : def check_status(self): try: job_id = self._get_job_id() - except: + except Exception: return JobStatus.terminated if job_id == "" : raise RuntimeError("job %s has not been submitted" % self.context.remote_root) diff --git a/dpgen/dispatcher/SSHContext.py b/dpgen/dispatcher/SSHContext.py index 35a7e5997..aca7d8368 100644 --- a/dpgen/dispatcher/SSHContext.py +++ b/dpgen/dispatcher/SSHContext.py @@ -125,7 +125,7 @@ def __init__ (self, self.ssh_session.ensure_alive() try: self.sftp.mkdir(self.remote_root) - except: + except Exception: pass @property diff --git a/dpgen/dispatcher/Shell.py b/dpgen/dispatcher/Shell.py index 731ad52f5..35a82018d 100644 --- a/dpgen/dispatcher/Shell.py +++ b/dpgen/dispatcher/Shell.py @@ -93,9 +93,9 @@ def sub_script_cmd(self, fp_max_errors = 3 try: fp_max_errors = res['fp_max_errors'] - except: + except Exception: pass - except: + except Exception: cvasp=False _cmd = cmd.split('1>')[0].strip() diff --git a/dpgen/dispatcher/Slurm.py b/dpgen/dispatcher/Slurm.py index a1f8ba933..e1d3550e2 100644 --- a/dpgen/dispatcher/Slurm.py +++ b/dpgen/dispatcher/Slurm.py @@ -130,9 +130,9 @@ def sub_script_cmd(self, fp_max_errors = 3 try: fp_max_errors = res['fp_max_errors'] - except: + except Exception: pass - except: + except Exception: cvasp=False _cmd = cmd.split('1>')[0].strip() diff --git a/dpgen/generator/run.py b/dpgen/generator/run.py index 67cca9e82..cf929f16c 100644 --- a/dpgen/generator/run.py +++ b/dpgen/generator/run.py @@ -576,7 +576,7 @@ def run_train (iter_index, try: train_group_size = mdata['train_group_size'] - except: + except Exception: train_group_size = 1 api_version = mdata.get('api_version', '0.9') @@ -2530,11 +2530,11 @@ def post_fp_vasp (iter_index, for oo in sys_outcars : try: _sys = dpdata.LabeledSystem(oo, type_map = jdata['type_map']) - except: + except Exception: dlog.info('Try to parse from vasprun.xml') try: _sys = dpdata.LabeledSystem(oo.replace('OUTCAR','vasprun.xml'), type_map = jdata['type_map']) - except: + except Exception: _sys = dpdata.LabeledSystem() dlog.info('Failed fp path: %s'%oo.replace('OUTCAR','')) if len(_sys) == 1: @@ -2914,7 +2914,7 @@ def run_iter (param_file, machine_file) : warnings.simplefilter('ignore', ruamel.yaml.error.MantissaNoDotYAML1_1Warning) jdata=loadfn(param_file) mdata=loadfn(machine_file) - except: + except Exception: with open (param_file, 'r') as fp : jdata = json.load (fp) with open (machine_file, 'r') as fp: diff --git a/dpgen/remote/RemoteJob.py b/dpgen/remote/RemoteJob.py index 057eb3d3e..4cdc76e9c 100644 --- a/dpgen/remote/RemoteJob.py +++ b/dpgen/remote/RemoteJob.py @@ -63,7 +63,7 @@ def download(self, elif os.path.isdir(os.path.join(self.remote_root,job_dir,ii)): try: os.rmdir(os.path.join(self.local_root,job_dir,ii)) - except: + except Exception: print('dir is not empty '+str(os.path.join(self.local_root,job_dir,ii))) else: shutil.copytree(os.path.join(self.remote_root,job_dir,ii),os.path.join(self.local_root,job_dir,ii)) @@ -176,7 +176,7 @@ def __init__ (self, sftp = self.ssh.open_sftp() sftp.mkdir(self.remote_root) sftp.close() - except: + except Exception: pass # open('job_uuid', 'w').write(self.job_uuid) @@ -410,7 +410,7 @@ def _submit(): else: dlog.debug('task is finished') - except: + except Exception: dlog.debug('no job_id file') dlog.debug('task restart point !!!') _submit() @@ -529,9 +529,9 @@ def _make_script(self, cvasp=res['cvasp'] try: fp_max_errors = res['fp_max_errors'] - except: + except Exception: fp_max_errors = 3 - except: + except Exception: cvasp=False for ii,jj in zip(job_dirs, args) : @@ -765,7 +765,7 @@ def submit(self, dlog.debug('task is running') else: dlog.debug('task is finished') - #except: + #except Exception: #dlog.debug('no job_id file') #dlog.debug('task restart point !!!') #self._submit(job_dirs, cmd, args, resources) @@ -805,7 +805,7 @@ def check_limit(self, task_max): def check_status(self) : try: job_id = self._get_job_id() - except: + except Exception: return JobStatus.terminated if job_id == "" : raise RuntimeError("job %s is has not been submitted" % self.remote_root) diff --git a/dpgen/remote/decide_machine.py b/dpgen/remote/decide_machine.py index 2688d3ca3..31691f322 100644 --- a/dpgen/remote/decide_machine.py +++ b/dpgen/remote/decide_machine.py @@ -68,7 +68,7 @@ def convert_mdata(mdata, task_types=["train", "model_devi", "fp"]): # if 'command' in profile: # mdata['train_command'] = profile["command"] # continue_flag = True -# except: +# except Exception: # pass # if ("hostname" not in mdata["train"][0]["machine"]) or (len(mdata["train"]) == 1): # mdata["train_machine"] = mdata["train"][0]["machine"] @@ -180,7 +180,7 @@ def convert_mdata(mdata, task_types=["train", "model_devi", "fp"]): # mdata['model_devi_command'] = profile['command'] # mdata['model_devi_group_size'] = profile['group_size'] # continue_flag = True -# except: +# except Exception: # pass # if ("hostname" not in mdata["model_devi"][0]["machine"]) or (len(mdata["model_devi"]) == 1): # mdata["model_devi_machine"] = mdata["model_devi"][0]["machine"] @@ -263,7 +263,7 @@ def convert_mdata(mdata, task_types=["train", "model_devi", "fp"]): # mdata['fp_group_size'] = profile['group_size'] # # continue_flag = True -# except: +# except Exception: # pass # if ("hostname" not in mdata["fp"][0]["machine"]) or (len(mdata["fp"]) == 1): # mdata["fp_machine"] = mdata["fp"][0]["machine"] diff --git a/dpgen/remote/group_jobs.py b/dpgen/remote/group_jobs.py index b816ac0bb..588bcfbed 100644 --- a/dpgen/remote/group_jobs.py +++ b/dpgen/remote/group_jobs.py @@ -341,7 +341,7 @@ def group_slurm_jobs(ssh_sess, if not job_fin[idx] : try: status = rjob.check_status() - except: + except Exception: ssh_sess = SSHSession(ssh_sess.remote_profile) for _idx,_rjob in enumerate(job_list): job_list[_idx] = SlurmJob(ssh_sess, work_path, _rjob.job_uuid) @@ -426,5 +426,5 @@ def delete(self): f_path_map=self.f_path_map try: os.remove(f_path_map) - except: + except Exception: pass diff --git a/dpgen/simplify/simplify.py b/dpgen/simplify/simplify.py index 8deb5a918..982db3114 100644 --- a/dpgen/simplify/simplify.py +++ b/dpgen/simplify/simplify.py @@ -263,7 +263,7 @@ def run_model_devi(iter_index, jdata, mdata): # submit try: model_devi_group_size = mdata['model_devi_group_size'] - except: + except Exception: model_devi_group_size = 1 forward_files = [rest_data_name] @@ -599,7 +599,7 @@ def run_iter(param_file, machine_file): 'ignore', ruamel.yaml.error.MantissaNoDotYAML1_1Warning) jdata = loadfn(param_file) mdata = loadfn(machine_file) - except: + except Exception: with open(param_file, 'r') as fp: jdata = json.load(fp) with open(machine_file, 'r') as fp: diff --git a/dpgen/tools/relabel.py b/dpgen/tools/relabel.py index 4b9cc3499..75117ce05 100755 --- a/dpgen/tools/relabel.py +++ b/dpgen/tools/relabel.py @@ -127,7 +127,7 @@ def create_init_tasks(target_folder, param_file, output, fp_json, verbose = True try: fp_params = fp_jdata['user_fp_params'] user_input = True - except: + except Exception: fp_params = fp_jdata['fp_params'] user_input = False make_pwscf('.', fp_params, mass_map, fp_pp_files, fp_pp_files, user_input) @@ -240,7 +240,7 @@ def create_tasks(target_folder, param_file, output, fp_json, verbose = True, num try: fp_params = fp_jdata['user_fp_params'] user_input = True - except: + except Exception: fp_params = fp_jdata['fp_params'] user_input = False make_pwscf('.', fp_params, mass_map, fp_pp_files, fp_pp_files, user_input) diff --git a/dpgen/tools/stat_iter.py b/dpgen/tools/stat_iter.py index 519486727..531868c51 100644 --- a/dpgen/tools/stat_iter.py +++ b/dpgen/tools/stat_iter.py @@ -42,10 +42,10 @@ def stat_iter(target_folder, pk_id, task_dirname, OUTCAR_filename=path_doc.rsplit('/', 2) # pylint: disable=unused-variable try: _sys = dpdata.LabeledSystem(path_doc, type_map = jdata['type_map'] ) - except: + except Exception: try: _sys = dpdata.LabeledSystem(path_doc.replace('OUTCAR','vasprun.xml'), type_map = jdata['type_map']) - except: + except Exception: _sys = dpdata.LabeledSystem() if len(_sys) == 1: pass diff --git a/tests/auto_test/test_mpdb.py b/tests/auto_test/test_mpdb.py index 1c3eca745..7299d28da 100644 --- a/tests/auto_test/test_mpdb.py +++ b/tests/auto_test/test_mpdb.py @@ -14,7 +14,7 @@ try: os.environ['MAPI_KEY'] exist_key=True -except: +except Exception: exist_key=False diff --git a/tests/database/test_db_vasp.py b/tests/database/test_db_vasp.py index 577d2f7da..9e5251880 100644 --- a/tests/database/test_db_vasp.py +++ b/tests/database/test_db_vasp.py @@ -61,7 +61,7 @@ def testDPPotcar(self): Potcar(['Al']) #ps TITEL = PAW_PBE Al 04Jan2001 refd.update({'hashs':['9aafba2c552fad8414179cae2e888e67']}) - except: + except Exception: pass for f in self.init_path+self.iter_path: @@ -121,7 +121,7 @@ def testParsingVasp(self): #try: # Potcar(['Al']) # ref=os.path.join(self.cwd,'data/all_data_pp.json') - #except: + #except Exception: # ref=os.path.join(self.cwd,'data/all_data.json') #Potcar(['Al']) ref=os.path.join(self.cwd,'data/all_data_pp.json') diff --git a/tests/dispatcher/shell/test_shell_ssh.py b/tests/dispatcher/shell/test_shell_ssh.py index d80bb5688..7b9f0773b 100644 --- a/tests/dispatcher/shell/test_shell_ssh.py +++ b/tests/dispatcher/shell/test_shell_ssh.py @@ -24,7 +24,7 @@ def setUp(self) : 'port': port, 'username' : getpass.getuser(), 'work_path' : os.path.join(os.getcwd(), 'rmt')}) - except: + except Exception: ssh_session = SSHSession({'hostname' : 'localhost', 'port': 5566, 'username' : getpass.getuser(), diff --git a/tests/dispatcher/test_ssh_context.py b/tests/dispatcher/test_ssh_context.py index 550fcaa12..a24e2d653 100644 --- a/tests/dispatcher/test_ssh_context.py +++ b/tests/dispatcher/test_ssh_context.py @@ -26,14 +26,14 @@ def setUp(self) : 'port': 22, 'username' : getpass.getuser(), 'work_path' : os.path.join(os.getcwd(), 'rmt')}) - except: + except Exception: # for tianhe-2 try: self.ssh_session = SSHSession({'hostname' : 'localhost', 'port': 5566, 'username' : getpass.getuser(), 'work_path' : os.path.join(os.getcwd(), 'rmt')}) - except: + except Exception: self.skipTest("Network error") self.job = SSHContext('loc', self.ssh_session) self.job1 = SSHContext('loc', self.ssh_session, job_uuid = self.job.job_uuid) From 0b36b59ababc81946c09837a302c5ef0ebb93544 Mon Sep 17 00:00:00 2001 From: Yuzhi Zhang <529133328@qq.com> Date: Thu, 21 Apr 2022 07:54:53 +0800 Subject: [PATCH 4/9] Fix the usage of `pair_coeff` in `auto_test` (#698) From ff77dc649df43197cd87397a7724e2ff3eed6164 Mon Sep 17 00:00:00 2001 From: pee8379 Date: Thu, 21 Apr 2022 08:56:19 +0900 Subject: [PATCH 5/9] Fix QE pwscf AssertionError (#685) * fix typo in github actions release to conda * Get from_poscar_path only when from_poscar is true (#537) Change-Id: I17774bee345634e4e72bd783e8112eefaaf9f0d3 Co-authored-by: Zhengju Sha * Fix QE pwscf AssertionError details in https://github.com/deepmodeling/dpgen/issues/683 Co-authored-by: Han Wang Co-authored-by: felix5572 Co-authored-by: shazj99 Co-authored-by: Zhengju Sha Co-authored-by: Han Wang --- dpgen/generator/run.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dpgen/generator/run.py b/dpgen/generator/run.py index cf929f16c..92bdb8c2a 100644 --- a/dpgen/generator/run.py +++ b/dpgen/generator/run.py @@ -2097,8 +2097,12 @@ def make_fp_pwscf(iter_index, for ii in fp_tasks: os.chdir(ii) sys_data = dpdata.System('POSCAR').data - sys_data['atom_masses'] = jdata['mass_map'] - ret = make_pwscf_input(sys_data, fp_pp_files, fp_params, user_input = user_input) + sys_data['atom_masses'] = [] + pps = [] + for iii in sys_data['atom_names']: + sys_data['atom_masses'].append(jdata['mass_map'][jdata['type_map'].index(iii)]) + pps.append(fp_pp_files[jdata['type_map'].index(iii)]) + ret = make_pwscf_input(sys_data, pps, fp_params, user_input = user_input) with open('input', 'w') as fp: fp.write(ret) os.chdir(cwd) From 37df1297247d10e77f4a0b24afa74d4692bdcae4 Mon Sep 17 00:00:00 2001 From: zhenyu <76582286+wangzyphysics@users.noreply.github.com> Date: Thu, 21 Apr 2022 07:57:14 +0800 Subject: [PATCH 6/9] Calypso (#663) * fix typo in github actions release to conda * Get from_poscar_path only when from_poscar is true (#537) Change-Id: I17774bee345634e4e72bd783e8112eefaaf9f0d3 Co-authored-by: Zhengju Sha * feature: merge run.py * fix:fix syntax bug * fix summary ratio bug * fix: fix bug of var(calypso_run_opt_path) not defined * reorganize code v1 * add: add unittest * add: add some explainations of dp+calypso in README.md * change a little bit in readme.md * change position of function * add deepmd-kit>=2.0.1 install_require in setup.py * test failed cause no tensorflow module so add tensorflow in setup.py * calc model devi in command line * fix some small bugs of modd and PBS script of cpu * fix unittest * delete parse_input.dat * fix unittest * first reorganization * secord reorganization * fix bugs * fix: fix bugs in modd_calypso.py write_modd.py and run.py * change functions name and fix bugs * remove modd_calypso.py * remove: remove modd_calypso.py * remove some useless outputs * restore dispatcher/PBS.py * refactor: make some changes in calypso related code - rename model_devi_calypso.py run_calypso.py - rename calypso.py make_calypso.py - add new file calypso_check_outcar.py calypso_run_opt.py - add new file calypso_run_model_devi.py - delete write_modd.py - modify README.md and run.py * refactor: move calypso main code(run.py) into run_calypso.py and modify test_calypso.py * docs: modify README.md related to CALYPSO * delete some useless comments in run.py * add write_model_devi_out function into make_calypso.py for passing unittest * fix a spelling mistake in calypso_run_opt.py (famx -> fmax) * change runopt script's name from run_opt.py to calypso_run_opt.py and fix bug in runopt script * fix unittest Co-authored-by: Han Wang Co-authored-by: felix5572 Co-authored-by: shazj99 Co-authored-by: Zhengju Sha Co-authored-by: Han Wang --- .gitignore | 1 + README.md | 33 +- dpgen/generator/lib/calypso_check_outcar.py | 107 +++++ dpgen/generator/lib/calypso_run_model_devi.py | 124 ++++++ dpgen/generator/lib/calypso_run_opt.py | 176 ++++++++ dpgen/generator/lib/make_calypso.py | 161 +++++++ dpgen/generator/lib/parse_calypso.py | 35 ++ dpgen/generator/lib/run_calypso.py | 411 ++++++++++++++++++ dpgen/generator/run.py | 211 ++++++++- tests/generator/context.py | 2 + tests/generator/test_calypso.py | 94 ++++ tests/generator/test_make_fp.py | 4 +- 12 files changed, 1336 insertions(+), 23 deletions(-) create mode 100644 dpgen/generator/lib/calypso_check_outcar.py create mode 100644 dpgen/generator/lib/calypso_run_model_devi.py create mode 100644 dpgen/generator/lib/calypso_run_opt.py create mode 100644 dpgen/generator/lib/make_calypso.py create mode 100644 dpgen/generator/lib/parse_calypso.py create mode 100644 dpgen/generator/lib/run_calypso.py create mode 100644 tests/generator/test_calypso.py diff --git a/.gitignore b/.gitignore index f833e149e..1aa647f54 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ dbconfig.json .vscode/* .idea/* _build +tests/generator/calypso_test_path diff --git a/README.md b/README.md index c9bc9494b..7b4ee04d8 100644 --- a/README.md +++ b/README.md @@ -378,7 +378,7 @@ In each iteration, there are three stages of work, namely, `00.train 01.model_d + 00.train: DP-GEN will train several (default 4) models based on initial and generated data. The only difference between these models is the random seed for neural network initialization. -+ 01.model_devi : represent for model-deviation. DP-GEN will use models obtained from 00.train to run Molecular Dynamics(default LAMMPS). Larger deviation for structure properties (default is force of atoms) means less accuracy of the models. Using this criterion, a few fructures will be selected and put into next stage `02.fp` for more accurate calculation based on First Principles. ++ 01.model_devi : represent for model-deviation. Model-deviation engine in `01.model_devi` can be chosen between Molecular Dynamics(LAMMPS and GROMACS) or Structures Prediction(CALYPSO). DP-GEN will use models obtained from 00.train to run Molecular Dynamics or to run structure optimization with ASE in CALYPSO. Larger deviation for structure properties (default is force of atoms) means less accuracy of the models. Using this criterion, a few structures will be selected and put into next stage `02.fp` for more accurate calculation based on First Principles. + 02.fp : Selected structures will be calculated by first principles methods(default VASP). DP-GEN will obtain some new data and put them together with initial data and data generated in previous iterations. After that a new training will be set up and DP-GEN will enter next iteration! @@ -615,6 +615,35 @@ The bold notation of key (such aas **type_map**) means that it's a necessary key | **user_fp_params** | Dict | |Parameters for cp2k calculation. find detail in manual.cp2k.org. only the kind section must be set before use. we assume that you have basic knowledge for cp2k input. | **external_input_path** | String | | Conflict with key:user_fp_params, use the template input provided by user, some rules should be followed, read the following text in detail. +One can choose the model-deviation engine by specifying the key `model_devi_engine`. If `model_devi_engine` is not specified, the default model-deviation engine will be LAMMPS. + +There are some new keys needed to be added into `param` and `machine` if CALYPSO as model-deviation engine. + +The bold notation of key (such as **calypso_path**) means that it's a necessary key. + + Key | Type | Example | Discription | +| :---------------- | :--------------------- | :-------------------------------------- | :-------------------------------------------------------------| +| *in param file* +| **model_devi_engine** | string | "calypso" | CALYPSO as model-deviation engine.| +| **calypso_input_path** | string | "/home/zhenyu/workplace/debug" | The absolute path of CALYPSO input file named input.dat(PSTRESS and fmax should be included), when this keys exists, all the iters will use the same CALYPSO input file until reach the number of max iter specified by **model_devi_max_iter** and **model_devi_jobs** key will not work.| +| **model_devi_max_iter** | int | 10 | The max iter number code can run, it works when **calypso_input_path** exists.| +| **model_devi_jobs** | List of Dict | [{ "times":[3],"NameOfAtoms":["Al","Cu"],"NumberOfAtoms":[1,10],"NumberOfFormula":[1,2],"Volume":[300],"DistanceOfIon":[[ 1.48,1.44],[ 1.44,1.41]],"PsoRatio":[0.6],"PopSize":[5],"MaxStep":[3],"ICode":[1],"Split":"T"},...] | Settings for exploration in `01.model_devi`. Different number in `times` List means different iteration index and iterations mentioned in List wil use same CALYPSO parameters.| +| **model_devi_jobs["times"]** | List of int | [0,1,2] | Different number in `times` List means different iteration index and iterations mentioned in List wil use same CALYPSO parameters.| +| **model_devi_jobs["NameOfAtoms"]** | List of string |["Al","Cu"] | Parameter of CALYPSO input file, means the element species of structures to be generated. | +| **model_devi_jobs["NumberOfAtoms"]** | List of int |[1,10] | Parameter of CALYPSO input file, means the number of atoms for each chemical species in one formula unit. | +| **model_devi_jobs["NumberOfFormula"]** | List of int |[1,2] | Parameter of CALYPSO input file, means the range of formula unit per cell. | +| **model_devi_jobs["Volume"]** | List of int |[300] | Parameter of CALYPSO input file, means the colume per formula unit(angstrom^3). | +| **model_devi_jobs["DistanceOfIon"]** | List of float |[[ 1.48,1.44],[ 1.44,1.41]] | Parameter of CALYPSO input file, means minimal distance between atoms of each chemical species. Unit is in angstrom. | +| **model_devi_jobs["PsoRatio"]** | List of float |[0.6] | Parameter of CALYPSO input file, means the proportion of the structures generated by PSO. | +| **model_devi_jobs["PopSize"]** | List of int |[5] | Parameter of CALYPSO input file, means the number of structures to be generated in one step in CALYPSO. | +| **model_devi_jobs["MaxStep"]** | List of int |[3] | Parameter of CALYPSO input file, means the number of max step in CALYPSO.| +| **model_devi_jobs["ICode"]** | List of int |[13] | Parameter of CALYPSO input file, means the chosen of local optimization, 1 is vasp and 13 is ASE with dp. | +| **model_devi_jobs["Split"]** | String |"T" | Parameter of CALYPSO input file, means that generating structures and optimizing structures are split into two parts, in dpgen workflow, Split must be T. | +| **model_devi_jobs["PSTRESS"]** | List of float |[0.001] | Same as PSTRESS in INCAR. | +| **model_devi_jobs["fmax"]** | List of float |[0.01] | The convergence criterion is that the force on all individual atoms should be less than *fmax*. | +| *in machine file* +| **model_devi["deepmdkit_python"]** | String | "/home/zhenyu/soft/deepmd-kit/bin/python" | A python path with deepmd package. | +| **model_devi["calypso_path"]** | string | "/home/zhenyu/workplace/debug" | The absolute path of calypso.x.| #### Rules for cp2k input at dictionary form Converting cp2k input is very simple as dictionary used to dpgen input. You just need follow some simple rule: @@ -1352,7 +1381,7 @@ mem_limit | Interger | 16 | Maximal memory permitted to apply for the job. | group_size | Integer | 5 | DP-GEN will put these jobs together in one submitting script. | user_forward_files | List of str | ["/path_to/vdw_kernel.bindat"] | These files will be uploaded in each calculation task. You should make sure provide the path exists. | user_backward_files | List of str | ["HILLS"] | Besides DP-GEN's normal output, these files will be downloaded after each calculation. You should make sure these files can be generated. - + ## Troubleshooting 1. The most common problem is whether two settings correspond with each other, including: - The order of elements in `type_map` and `mass_map` and **`fp_pp_files`**. diff --git a/dpgen/generator/lib/calypso_check_outcar.py b/dpgen/generator/lib/calypso_check_outcar.py new file mode 100644 index 000000000..c07a00590 --- /dev/null +++ b/dpgen/generator/lib/calypso_check_outcar.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import numpy as np +import os,sys,glob,time +from deepmd.calculator import DP +from ase.io import read + +''' +check if structure optimization worked well +if not, this script will generate a fake outcar +''' + +def Get_Element_Num(elements): + '''Using the Atoms.symples to Know Element&Num''' + element = [] + ele = {} + element.append(elements[0]) + for x in elements: + if x not in element : + element.append(x) + for x in element: + ele[x] = elements.count(x) + return element, ele + +def Write_Contcar(element, ele, lat, pos): + '''Write CONTCAR''' + f = open('CONTCAR','w') + f.write('ASE-DPKit-FAILED-nan\n') + f.write('1.0\n') + for i in range(3): + f.write('%15.10f %15.10f %15.10f\n' % tuple(lat[i])) + for x in element: + f.write(x + ' ') + f.write('\n') + for x in element: + f.write(str(ele[x]) + ' ') + f.write('\n') + f.write('Direct\n') + na = sum(ele.values()) + dpos = np.dot(pos,np.linalg.inv(lat)) + for i in range(na): + f.write('%15.10f %15.10f %15.10f\n' % tuple(dpos[i])) + +def Write_Outcar(element, ele, volume, lat, pos, ene, force, stress,pstress): + '''Write OUTCAR''' + f = open('OUTCAR','w') + for x in element: + f.write('VRHFIN =' + str(x) + '\n') + f.write('ions per type =') + for x in element: + f.write('%5d' % ele[x]) + #f.write('\nvolume of cell :\n') + f.write('\nDirection XX YY ZZ XY YZ ZX\n') + f.write('in kB') + f.write('%15.6f' % stress[0]) + f.write('%15.6f' % stress[1]) + f.write('%15.6f' % stress[2]) + f.write('%15.6f' % stress[3]) + f.write('%15.6f' % stress[4]) + f.write('%15.6f' % stress[5]) + f.write('\n') + ext_pressure = np.sum(stress[0] + stress[1] + stress[2])/3.0 - pstress + f.write('external pressure = %20.6f kB Pullay stress = %20.6f kB\n'% (ext_pressure, pstress)) + f.write('volume of cell : %20.6f\n' % volume) + f.write('direct lattice vectors\n') + for i in range(3): + f.write('%10.6f %10.6f %10.6f\n' % tuple(lat[i])) + f.write('POSITION TOTAL-FORCE(eV/Angst)\n') + f.write('-------------------------------------------------------------------\n') + na = sum(ele.values()) + for i in range(na): + f.write('%15.6f %15.6f %15.6f' % tuple(pos[i])) + f.write('%15.6f %15.6f %15.6f\n' % tuple(force[i])) + f.write('-------------------------------------------------------------------\n') + f.write('energy without entropy= %20.6f %20.6f\n' % (ene, ene)) + enthalpy = ene + pstress * volume / 1602.17733 + f.write('enthalpy is TOTEN = %20.6f %20.6f\n' % (enthalpy, enthalpy)) + +def check(): + + from deepmd.calculator import DP + from ase.io import read + model_path = sys.argv[1] + Model_List = glob.glob('%s/graph*pb'%model_path) + calc = DP(model='%s'%(Model_List[0])) # init the model before iteration + + to_be_opti = read('POSCAR') + to_be_opti.calc = calc + # --------------------------------- + # for failed outcar + atoms_symbols_f = to_be_opti.get_chemical_symbols() + element_f, ele_f = Get_Element_Num(atoms_symbols_f) + atoms_vol_f = to_be_opti.get_volume() + atoms_stress_f = to_be_opti.get_stress() + atoms_stress_f = atoms_stress_f/(0.01*0.6242) + atoms_lat_f = to_be_opti.cell + atoms_pos_f = to_be_opti.positions + atoms_force_f = to_be_opti.get_forces() + atoms_ene_f = 610612509 + # --------------------------------- + Write_Contcar(element_f, ele_f, atoms_lat_f, atoms_pos_f) + Write_Outcar(element_f, ele_f, atoms_vol_f, atoms_lat_f, atoms_pos_f,atoms_ene_f, atoms_force_f, atoms_stress_f * -10.0, 0) + +cwd = os.getcwd() +if not os.path.exists(os.path.join(cwd,'OUTCAR')): + check() diff --git a/dpgen/generator/lib/calypso_run_model_devi.py b/dpgen/generator/lib/calypso_run_model_devi.py new file mode 100644 index 000000000..c4d5b5f27 --- /dev/null +++ b/dpgen/generator/lib/calypso_run_model_devi.py @@ -0,0 +1,124 @@ +import argparse +import copy +import dpdata +import glob +import math +import numpy as np +import os +import sys +import shutil +from deepmd.infer import calc_model_devi +from deepmd.infer import DeepPot as DP + + +def write_model_devi_out(devi, fname): + assert devi.shape[1] == 8 + #assert devi.shape[1] == 7 + header = '%5s' % 'step' + for item in 'vf': + header += '%16s%16s%16s' % (f'max_devi_{item}', f'min_devi_{item}',f'avg_devi_{item}') + header += '%16s'%str('min_dis') + np.savetxt(fname, + devi, + fmt=['%5d'] + ['%17.6e' for _ in range(7)], + delimiter='', + header=header) + return devi + + +def Modd(all_models,type_map): + + # Model Devi + + cwd = os.getcwd() + graphs = [DP(model) for model in all_models] + + Devis = [] + pcount = 0 + strus_lists = glob.glob(os.path.join(cwd,'*.structures')) + for num, strus_path in enumerate(strus_lists): + + structures_data = dpdata.System(strus_path,'deepmd/npy',type_map=type_map) + + # every 500 confs in one task dir + nnum = structures_data.get_nframes() + if nnum == 0: + continue + else: + num_per_task = math.ceil(nnum/500) + + + for temp in range(num_per_task): + task_name = os.path.join(cwd,'task.%03d.%03d'%(num,temp)) + put_poscar = os.path.join(task_name,'traj') + if not os.path.exists(task_name): + os.mkdir(task_name) + os.mkdir(put_poscar) + else: + shutil.rmtree(task_name) + os.mkdir(task_name) + os.mkdir(put_poscar) + devis = [] + if (nnum - (temp+1)*500) >= 0: + temp_sl = range(temp*500,(temp+1)*500) + else: + temp_sl = range(temp*500,nnum) + + new_index = 0 + for index,frameid in enumerate(temp_sl): + pdata = structures_data[frameid] + pdata.to_vasp_poscar(os.path.join(put_poscar,'%s.poscar'%str(index))) + nopbc = pdata.nopbc + coord = pdata.data['coords'] + cell = pdata.data['cells'] + atom_types = pdata.data['atom_types'] + devi = calc_model_devi(coord,cell,atom_types,graphs,nopbc=nopbc) + # ------------------------------------------------------------------------------------ + # append min-distance in devi list + dis = pdata.to_ase_structure()[0].get_all_distances(mic=True) + row,col = np.diag_indices_from(dis) + dis[row,col] = 10000 + min_dis = np.nanmin(dis) + devi = np.append(devi[0],min_dis) + t = [devi] + devi = np.array(t) + # ------------------------------------------------------------------------------------ + temp_d = copy.deepcopy(devi) + temp_D = copy.deepcopy(devi) + devis.append(temp_d) + Devis.append(temp_D) + devis[index][0][0] = np.array(index) + Devis[pcount][0][0] = np.array(pcount) + pcount += 1 + new_index += 1 + devis = np.vstack(devis) + write_model_devi_out(devis,os.path.join(task_name, 'model_devi.out')) + + Devis = np.vstack(Devis) + write_model_devi_out(Devis,os.path.join(cwd,'Model_Devi.out')) + + f = open(os.path.join(os.path.abspath(os.path.join(cwd,os.pardir)),'record.calypso'),'a+') + f.write('4') + f.close() + +if __name__ == '__main__': + + cwd = os.getcwd() + model_path = os.path.join(os.path.abspath(os.path.join(cwd,os.pardir)),'gen_stru_analy') + parser = argparse.ArgumentParser(description='calc model-devi by `all_models` and `type_map`') + parser.add_argument( + '--all_models', + type=str, + nargs='+', + default=model_path, + help='the path of models which will be used to do model-deviation', + ) + parser.add_argument( + '--type_map', + nargs='+', + help='the type map of models which will be used to do model-deviation', + ) + args = parser.parse_args() + #print(vars(args)) + Modd(args.all_models,args.type_map) + #Modd(sys.argv[1],sys.argv[2]) diff --git a/dpgen/generator/lib/calypso_run_opt.py b/dpgen/generator/lib/calypso_run_opt.py new file mode 100644 index 000000000..3344d0f37 --- /dev/null +++ b/dpgen/generator/lib/calypso_run_opt.py @@ -0,0 +1,176 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import os,sys,glob,time +import numpy as np +from ase.io import read +from ase.optimize import BFGS,QuasiNewton,LBFGS +from ase.constraints import UnitCellFilter, ExpCellFilter +from deepmd.calculator import DP +''' +structure optimization with DP model and ASE +PSTRESS and fmax should exist in input.dat +''' + +def Get_Element_Num(elements): + '''Using the Atoms.symples to Know Element&Num''' + element = [] + ele = {} + element.append(elements[0]) + for x in elements: + if x not in element : + element.append(x) + for x in element: + ele[x] = elements.count(x) + return element, ele + +def Write_Contcar(element, ele, lat, pos): + '''Write CONTCAR''' + f = open('CONTCAR','w') + f.write('ASE-DPKit-Optimization\n') + f.write('1.0\n') + for i in range(3): + f.write('%15.10f %15.10f %15.10f\n' % tuple(lat[i])) + for x in element: + f.write(x + ' ') + f.write('\n') + for x in element: + f.write(str(ele[x]) + ' ') + f.write('\n') + f.write('Direct\n') + na = sum(ele.values()) + dpos = np.dot(pos,np.linalg.inv(lat)) + for i in range(na): + f.write('%15.10f %15.10f %15.10f\n' % tuple(dpos[i])) + +def Write_Outcar(element, ele, volume, lat, pos, ene, force, stress,pstress): + '''Write OUTCAR''' + f = open('OUTCAR','w') + for x in element: + f.write('VRHFIN =' + str(x) + '\n') + f.write('ions per type =') + for x in element: + f.write('%5d' % ele[x]) + #f.write('\nvolume of cell :\n') + f.write('\nDirection XX YY ZZ XY YZ ZX\n') + f.write('in kB') + f.write('%15.6f' % stress[0]) + f.write('%15.6f' % stress[1]) + f.write('%15.6f' % stress[2]) + f.write('%15.6f' % stress[3]) + f.write('%15.6f' % stress[4]) + f.write('%15.6f' % stress[5]) + f.write('\n') + ext_pressure = np.sum(stress[0] + stress[1] + stress[2])/3.0 - pstress + f.write('external pressure = %20.6f kB Pullay stress = %20.6f kB\n'% (ext_pressure, pstress)) + f.write('volume of cell : %20.6f\n' % volume) + f.write('direct lattice vectors\n') + for i in range(3): + f.write('%10.6f %10.6f %10.6f\n' % tuple(lat[i])) + f.write('POSITION TOTAL-FORCE(eV/Angst)\n') + f.write('-------------------------------------------------------------------\n') + na = sum(ele.values()) + for i in range(na): + f.write('%15.6f %15.6f %15.6f' % tuple(pos[i])) + f.write('%15.6f %15.6f %15.6f\n' % tuple(force[i])) + f.write('-------------------------------------------------------------------\n') + f.write('energy without entropy= %20.6f %20.6f\n' % (ene, ene/na)) + enthalpy = ene + pstress * volume / 1602.17733 + f.write('enthalpy is TOTEN = %20.6f %20.6f\n' % (enthalpy, enthalpy/na)) + +def Write_calylog(templog): + '''For Write Evolve Structures Log into caly.log''' + f = open('opt.log','a+') + f.write(templog+'\n') + f.close() +def read_stress_fmax(): + pstress = 0 + fmax = 0.01 + #assert os.path.exists('./input.dat'), 'input.dat does not exist!' + try: + f = open('input.dat','r') + except: + assert os.path.exists('../input.dat'),' now we are in %s, do not find ../input.dat'%(os.getcwd()) + f = open('../input.dat','r') + lines = f.readlines() + f.close() + for line in lines: + if line[0] == '#': + continue + if 'PSTRESS' in line or 'pstress' in line: + pstress = float(line.split('=')[1]) + if 'fmax' in line: + fmax = float(line.split('=')[1]) + return fmax,pstress + + +def run_opt(fmax,stress): + '''Using the ASE&DP to Optimize Configures''' + ''' > 600 Steps Called Failure Optimization''' + + os.system('mv OUTCAR OUTCAR-last') + is_dpgen = True + nn = 1 + try: + model_path = sys.argv[1] + Model_List = glob.glob('%s/graph*pb'%model_path) + calc = DP(model=Model_List[0]) # init the model before iteration + except: + assert os.path.exists('graph.pb'), 'did not found graph.pb in this directory %s, or did you forget to add args?'%(os.getcwd()) + calc = DP(model='graph.pb') # init the model before iteration + is_dpgen = False + nn = 3 + + print('Start to Optimize Structures by DP----------') + + Opt_Step = 600 + start = time.time() + # pstress kbar + pstress = stress + # kBar to eV/A^3 + # 1 eV/A^3 = 160.21766028 GPa + # 1 / 160.21766028 ~ 0.006242 + aim_stress = 1.0 * pstress* 0.01 * 0.6242 / 10.0 + to_be_opti = read('POSCAR') + to_be_opti.calc = calc + ucf = UnitCellFilter(to_be_opti, scalar_pressure=aim_stress) + atoms_vol_2 = to_be_opti.get_volume() + for i in range(nn): + if is_dpgen: + opt = LBFGS(ucf,trajectory='traj.traj') + else: + opt = LBFGS(ucf) + #opt = QuasiNewton(to_be_opti) + #opt = BFGS(to_be_opti) + #opt = BFGS(to_be_opti,trajectory='traj.traj',logfile='opt.log') + opt.run(fmax=fmax,steps=Opt_Step) + + atoms_lat = to_be_opti.cell + atoms_pos = to_be_opti.positions + atoms_force = to_be_opti.get_forces() + atoms_stress = to_be_opti.get_stress() + # eV/A^3 to GPa + atoms_stress = atoms_stress/(0.01*0.6242) + #atoms_num = to_be_opti.get_atomic_numbers() + atoms_symbols = to_be_opti.get_chemical_symbols() + #atoms_formula = to_be_opti.get_chemical_formula() + atoms_ene = to_be_opti.get_potential_energy() + atoms_vol = to_be_opti.get_volume() + + element, ele = Get_Element_Num(atoms_symbols) + + Write_Contcar(element, ele, atoms_lat, atoms_pos) + Write_Outcar(element, ele, atoms_vol, atoms_lat, atoms_pos,atoms_ene, atoms_force, atoms_stress * -10.0, pstress) + + + stop = time.time() + _cwd = os.getcwd() + _cwd = os.path.basename(_cwd) + print('%s is done, time: %s' % (_cwd,stop-start)) + +def run(): + fmax, stress = read_stress_fmax() + run_opt(fmax, stress) + +if __name__=='__main__': + run() diff --git a/dpgen/generator/lib/make_calypso.py b/dpgen/generator/lib/make_calypso.py new file mode 100644 index 000000000..4c5ce7d66 --- /dev/null +++ b/dpgen/generator/lib/make_calypso.py @@ -0,0 +1,161 @@ +#!/usr/bin/env python3 +import os +import shutil +import json +import numpy as np + +def make_calypso_input(nameofatoms,numberofatoms, + numberofformula,volume, + distanceofion,psoratio,popsize, + maxstep,icode,split,vsc, + maxnumatom,ctrlrange,pstress,fmax): + ret = "################################ The Basic Parameters of CALYPSO ################################\n" + ret+= "# A string of one or several words contain a descriptive name of the system (max. 40 characters).\n" + assert (nameofatoms != None ) + ret+= "SystemName = %s\n"%(''.join(nameofatoms)) + ret+= "# Number of different atomic species in the simulation.\n" + ret+= "NumberOfSpecies = %d\n"%(len(nameofatoms)) + ret+= "# Element symbols of the different chemical species.\n" + ret+= "NameOfAtoms = %s\n"%(' '.join(nameofatoms)) + ret+= "# Number of atoms for each chemical species in one formula unit. \n" + assert numberofatoms != None or len(numberofatoms) == len(nameofatoms) + ret+= "NumberOfAtoms = %s\n"%(' '.join(list(map(str,numberofatoms)))) + ret+= "# The range of formula unit per cell in your simulation. \n" + assert numberofformula != None or len(numberofformula) == 2 or type(numberofformula) == type([1,2]) + ret+= "NumberOfFormula = %s\n"%(' '.join(list(map(str,numberofformula)))) + ret+= "# The volume per formula unit. Unit is in angstrom^3.\n" + ret+= "Volume = %s\n"%(volume[0]) + ret+= "# Minimal distance between atoms of each chemical species. Unit is in angstrom.\n" + assert len(distanceofion) == len(nameofatoms) #"check distance of ions and the number of atoms" + assert len(distanceofion[0]) == len(nameofatoms) + ret+= "@DistanceOfIon \n" + for temp in distanceofion: + ret+="%4s \n"%(' '.join(list(map(str,temp)))) + ret+= "@End\n" + ret+= "# It determines which algorithm should be adopted in the simulation.\n" + ret+= "Ialgo = 2\n" + ret+= "# Ialgo = 1 for Global PSO\n" + ret+= "# Ialgo = 2 for Local PSO (default value)\n" + ret+= "# The proportion of the structures generated by PSO.\n" + assert (0 <= psoratio[0] <= 1 ) + ret+= "PsoRatio = %s\n"%(psoratio[0]) + ret+= "# The population size. Normally, it has a larger number for larger systems.\n" + assert popsize[0] != None or popsize!=None or type(popsize) == type([0,1]) or type(popsize[0]) == type(0) + ret+= "PopSize = %d\n"%(popsize[0]) + assert maxstep[0] != None or maxstep!=None or type(maxstep) == type([0,1]) or type(maxstep[0]) == type(0) + ret+= "# The Max step for iteration\n" + ret+= "MaxStep = %d\n"%(maxstep[0]) + ret+= "#It determines which method should be adopted in generation the random structure. \n" + ret+= "GenType= 1 \n" + ret+= "# 1 under symmetric constraints\n" + ret+= "# 2 grid method for large system\n" + ret+= "# 3 and 4 core grow method \n" + ret+= "# 0 combination of all method\n" + ret+= "# If GenType=3 or 4, it determined the small unit to grow the whole structure\n" + ret+= "# It determines which local optimization method should be interfaced in the simulation.\n" + assert icode != None or type(icode) == type([0,1]) or type(icode[0]) == type(0) + ret+= "ICode= %d\n"%(icode[0]) + ret+= "# ICode= 1 interfaced with VASP\n" + ret+= "# ICode= 2 interfaced with SIESTA\n" + ret+= "# ICode= 3 interfaced with GULP\n" + ret+= "# The number of lbest for local PSO\n" + ret+= "NumberOfLbest=4\n" + ret+= "# The Number of local optimization for each structure.\n" + ret+= "NumberOfLocalOptim= 3\n" + ret+= "# The command to perform local optimiztion calculation (e.g., VASP, SIESTA) on your computer.\n" + ret+= "Command = sh submit.sh\n" + ret+= "MaxTime = 9000 \n" + ret+= "# If True, a previous calculation will be continued.\n" + ret+= "PickUp = F\n" + ret+= "# At which step will the previous calculation be picked up.\n" + ret+= "PickStep = 1\n" + ret+= "# If True, the local optimizations performed by parallel\n" + ret+= "Parallel = F\n" + ret+= "# The number node for parallel \n" + ret+= "NumberOfParallel = 4\n" + assert split != None + ret+= "Split = %s\n"%(split) + assert pstress != None or type(pstress) == type([200]) + ret+= "PSTRESS = %f\n"%(pstress[0]) + assert fmax != None or type(fmax) == type([200]) + ret+= "fmax = %f\n"%(fmax[0]) + ret+= "################################ End of The Basic Parameters of CALYPSO #######################\n" + if vsc == 'T': + assert len(ctrlrange) == len(nameofatoms) #'check distance of ions and the number of atoms' + ret+= "##### The Parameters For Variational Stoichiometry ##############\n" + ret+= "## If True, Variational Stoichiometry structure prediction is performed\n" + ret+= "VSC = %s\n"%(vsc) + ret+= "# The Max Number of Atoms in unit cell\n" + ret+= "MaxNumAtom = %s\n"%(maxnumatom[0]) + ret+= "# The Variation Range for each type atom \n" + ret+= "@CtrlRange\n" + for ttemp in ctrlrange: + ret+="%4s \n"%(' '.join(list(map(str,ttemp)))) + ret+= "@end\n" + ret+= "###################End Parameters for VSC ##########################\n" + return ret + +def _make_model_devi_buffet(jdata,calypso_run_opt_path): + + calypso_input_path = jdata.get('calypso_input_path') + shutil.copyfile(os.path.join(calypso_input_path,'input.dat'),os.path.join(calypso_run_opt_path, 'input.dat')) + +def _make_model_devi_native_calypso(iter_index,model_devi_jobs, calypso_run_opt_path): + + for iiidx, jobbs in enumerate(model_devi_jobs): + if iter_index in jobbs.get('times'): + cur_job = model_devi_jobs[iiidx] + + work_path = os.path.dirname(calypso_run_opt_path) + with open(os.path.join(work_path, 'cur_job.json'), 'w') as outfile: + json.dump(cur_job, outfile, indent = 4) + + # Crystal Parameters + nameofatoms = cur_job.get('NameOfAtoms') + numberofatoms = cur_job.get('NumberOfAtoms') + numberofformula = cur_job.get('NumberOfFormula',[1,1]) + volume = cur_job.get('Volume') + distanceofion = cur_job.get('DistanceOfIon') + psoratio = cur_job.get('PsoRatio') + popsize = cur_job.get('PopSize') + maxstep = cur_job.get('MaxStep') + icode = cur_job.get('ICode',[1]) + split = cur_job.get('Split','T') + # VSC Control + maxnumatom = None + ctrlrange = None + vsc = cur_job.get('VSC','F') + if vsc == 'T': + maxnumatom = cur_job.get('MaxNumAtom') + ctrlrange = cur_job.get('CtrlRange') + + # Optimization + pstress = cur_job.get('PSTRESS',[0.001]) + fmax = cur_job.get('fmax',[0.01]) + + # Cluster + + # 2D + + file_c = make_calypso_input(nameofatoms,numberofatoms, + numberofformula,volume, + distanceofion,psoratio,popsize, + maxstep,icode,split,vsc, + maxnumatom,ctrlrange,pstress,fmax) + with open(os.path.join(calypso_run_opt_path, 'input.dat'), 'w') as cin : + cin.write(file_c) + +def write_model_devi_out(devi, fname): + assert devi.shape[1] == 8 + #assert devi.shape[1] == 7 + header = '%5s' % 'step' + for item in 'vf': + header += '%16s%16s%16s' % (f'max_devi_{item}', f'min_devi_{item}',f'avg_devi_{item}') + header += '%16s'%str('min_dis') + np.savetxt(fname, + devi, + fmt=['%5d'] + ['%17.6e' for _ in range(7)], + delimiter='', + header=header) + return devi + diff --git a/dpgen/generator/lib/parse_calypso.py b/dpgen/generator/lib/parse_calypso.py new file mode 100644 index 000000000..123a77e94 --- /dev/null +++ b/dpgen/generator/lib/parse_calypso.py @@ -0,0 +1,35 @@ +import numpy as np +import os + +def _parse_calypso_input(var,input_path): + try: + f = open(input_path,'r') + except: + f = open(os.path.join(input_path,'input.dat'),'r') + lines = f.readlines() + f.close() + + for line in lines: + if var in line: + variable = line.split('=')[1].strip() + return variable + +def _parse_calypso_dis_mtx(numberofspecies,input_path): + try: + f = open(input_path,'r') + except: + f = open(os.path.join(input_path,'input.dat'),'r') + while True: + line = f.readline() + if len(line) == 0: + break + if '@DistanceOfIon' in line: + dis = [] + for i in range(int(numberofspecies)): + line = f.readline() + dis.append(line.split()) + f.close() + break + dis = np.array(dis) + dis = dis.reshape((1,int(numberofspecies)**2)) + return dis[0][np.argmin(dis)] diff --git a/dpgen/generator/lib/run_calypso.py b/dpgen/generator/lib/run_calypso.py new file mode 100644 index 000000000..c15989486 --- /dev/null +++ b/dpgen/generator/lib/run_calypso.py @@ -0,0 +1,411 @@ +""" +calypso as model devi engine: + 1. gen_structures + 2. analysis + 3. model devi +""" + +import copy +import dpdata +import math +import numpy as np +import os +import random +import re +import glob +import shutil +from ase.io.vasp import write_vasp +from ase.io.trajectory import Trajectory +from pathlib import Path +from distutils.version import LooseVersion +from dpgen import dlog +from dpgen.generator.lib.utils import make_iter_name +from dpgen.generator.lib.parse_calypso import _parse_calypso_input +from dpgen.dispatcher.Dispatcher import make_dispatcher, make_submission + +train_name = '00.train' +model_devi_name = '01.model_devi' +fp_name = '02.fp' +calypso_run_opt_name = 'gen_stru_analy' +calypso_model_devi_name = 'model_devi_results' + +def gen_structures(iter_index,jdata,mdata): + + # run calypso + # vsc means generate elemental, binary and ternary at the same time + vsc = jdata.get('vsc',False) # take CALYPSO as confs generator + + model_devi_group_size = mdata['model_devi_group_size'] + model_devi_resources = mdata['model_devi_resources'] + api_version = mdata.get('api_version', '0.9') + + + iter_name = make_iter_name(iter_index) + work_path = os.path.join(iter_name, model_devi_name) + assert(os.path.isdir(work_path)) + # + calypso_run_opt_path = os.path.join(work_path,calypso_run_opt_name) + calypso_model_devi_path = os.path.join(work_path,calypso_model_devi_name) + # + + calypso_path = mdata.get('model_devi_calypso_path') + #calypso_input_path = jdata.get('calypso_input_path') + popsize = int(_parse_calypso_input('PopSize',calypso_run_opt_path)) + maxstep = int(_parse_calypso_input('MaxStep',calypso_run_opt_path)) + + all_models = glob.glob(os.path.join(calypso_run_opt_path, 'graph*pb')) + model_names = [os.path.basename(ii) for ii in all_models] + + deepmdkit_python = mdata.get('model_devi_deepmdkit_python') + command = "%s calypso_run_opt.py %s 1>> model_devi.log 2>> model_devi.log" % (deepmdkit_python,os.path.abspath(calypso_run_opt_path)) + command += " || %s check_outcar.py %s " % (deepmdkit_python,os.path.abspath(calypso_run_opt_path)) + commands = [command] + + cwd = os.getcwd() + os.chdir(calypso_run_opt_path) + + forward_files = ['POSCAR', 'calypso_run_opt.py','check_outcar.py','input.dat'] + backward_files = ['OUTCAR','CONTCAR','traj.traj','model_devi.log'] + + run_calypso = calypso_path+'/calypso.x | tee log' + if not vsc: + Lpickup = _parse_calypso_input('PickUp','.') + PickUpStep = _parse_calypso_input('PickStep','.') + if os.path.exists('tag_pickup_%s'%(str(PickUpStep))): + dlog.info('caution! tag_pickup_%s exists!'%str(PickUpStep)) + Lpickup = 'F' + if Lpickup == 'T': + ftag = open('tag_pickup_%s'%(str(PickUpStep)),'w') + ftag.close() + os.remove('step') + fstep = open('step','w') + fstep.write('%12s'%str(PickUpStep)) + fstep.close() + else: + PickUpStep = 1 + try: + os.mkdir('opt') + except: + pass + #shutil.rmtree('opt') + #os.mkdir('opt') + + + for ii in range(int(PickUpStep)-1,maxstep+1): + dlog.info('CALYPSO step %s'%ii) + if ii == maxstep : + while True: + if len(glob.glob('OUTCAR_*')) == popsize: + break + os.system('%s'%run_calypso) + break + # run calypso + + os.system('%s'%(run_calypso)) + + for pop in range(ii*int(popsize),(ii+1)*int(popsize)): + try: + os.mkdir('task.%03d'%pop) + except: + shutil.rmtree('task.%03d'%pop) + os.mkdir('task.%03d'%pop) + shutil.copyfile('calypso_run_opt.py',os.path.join('task.%03d'%pop,'calypso_run_opt.py')) + shutil.copyfile('check_outcar.py',os.path.join('task.%03d'%pop,'check_outcar.py')) + shutil.copyfile('POSCAR_%s'%str(pop-ii*int(popsize)+1),os.path.join('task.%03d'%(pop),'POSCAR')) + shutil.copyfile('input.dat',os.path.join('task.%03d'%pop,'input.dat')) + #for iii in range(1,popsize+1): + # shutil.copyfile('POSCAR_%s'%str(iii),os.path.join('task.%03d'%(iii-1),'POSCAR')) + + all_task = glob.glob( "task.*") + all_task.sort() + + run_tasks_ = all_task + + run_tasks = [os.path.basename(ii) for ii in run_tasks_] + + if LooseVersion(api_version) < LooseVersion('1.0'): + warnings.warn(f"the dpdispatcher will be updated to new version." + f"And the interface may be changed. Please check the documents for more details") + dispatcher=make_dispatcher(mdata['model_devi_machine'],mdata['model_devi_resources'],'./', run_tasks, model_devi_group_size) + dispatcher.run_jobs(mdata['model_devi_resources'], + commands, + './', + run_tasks, + model_devi_group_size, + model_names, + forward_files, + backward_files, + outlog = 'model_devi.log', + errlog = 'model_devi.log') + elif LooseVersion(api_version) >= LooseVersion('1.0'): + os.chdir(cwd) + submission = make_submission( + mdata['model_devi_machine'], + mdata['model_devi_resources'], + commands=commands, + work_path=calypso_run_opt_path, + run_tasks=run_tasks, + group_size=model_devi_group_size, + forward_common_files=model_names, + forward_files=forward_files, + backward_files=backward_files, + outlog = 'model_devi.log', + errlog = 'model_devi.log') + submission.run_submission() + os.chdir(calypso_run_opt_path) + + sstep = os.path.join('opt',str(ii)) + os.mkdir(sstep) + if not os.path.exists('traj'): + os.mkdir('traj') + + for jjj in range(ii*int(popsize),(ii+1)*int(popsize)): + # to opt directory + shutil.copyfile('POSCAR_%s'%str(jjj+1-ii*int(popsize)),os.path.join(sstep,'POSCAR_%s'%str(jjj+1-ii*int(popsize))),) + shutil.copyfile(os.path.join('task.%03d'%(jjj),'OUTCAR'),os.path.join(sstep,'OUTCAR_%s'%str(jjj+1-ii*int(popsize))),) + shutil.copyfile(os.path.join('task.%03d'%(jjj),'CONTCAR'),os.path.join(sstep,'CONTCAR_%s'%str(jjj+1-ii*int(popsize))),) + # to run calypso directory + shutil.copyfile(os.path.join('task.%03d'%(jjj),'OUTCAR'),'OUTCAR_%s'%str(jjj+1-ii*int(popsize)),) + shutil.copyfile(os.path.join('task.%03d'%(jjj),'CONTCAR'),'CONTCAR_%s'%str(jjj+1-ii*int(popsize)),) + # to traj + shutil.copyfile(os.path.join('task.%03d'%(jjj),'traj.traj'),os.path.join('traj','%s.traj'%str(jjj+1)),) + + if LooseVersion(api_version) < LooseVersion('1.0'): + os.rename('jr.json','jr_%s.json'%(str(ii))) + + tlist = glob.glob('task.*') + for t in tlist: + shutil.rmtree(t) + + else: + # -------------------------------------------------------------- + # TODO(zhenyu) make this code work for other situation + component = ['Mg','Al','Cu','MgAl','MgCu','AlCu','MgAlCu'] + + for idx,com in enumerate(component): + pwd = os.getcwd() + os.mkdir(str(idx)) + shutil.copyfile(os.path.join(cwd,'calypso_input','input.dat.%s'%com),os.path.join(str(idx),'input.dat')) + os.chdir(str(idx)) + os.system(run_calypso) + os.chdir(pwd) + + name_list = Path('.').glob('*/POSCAR_*') + for idx,name in enumerate(name_list): + shutil.copyfile(name,'POSCAR_%s'%(idx+1)) + try: + os.mkdir('task.%04d'%(idx+1)) + except: + shutil.rmtree('task.%04d'%(idx+1)) + os.mkdir('task.%04d'%(idx+1)) + shutil.copyfile('calypso_run_opt.py',os.path.join('task.%04d'%(idx+1),'calypso_run_opt.py')) + shutil.copyfile('check_outcar.py',os.path.join('task.%04d'%(idx+1),'check_outcar.py')) + shutil.copyfile('POSCAR_%s'%str(idx+1),os.path.join('task.%04d'%(idx+1),'POSCAR')) + shutil.copyfile('input.dat',os.path.join('task.%04d'%(idx+1),'input.dat')) + + all_task = glob.glob( "task.*") + all_task.sort() + + run_tasks_ = all_task + + run_tasks = [os.path.basename(ii) for ii in run_tasks_] + + if LooseVersion(api_version) < LooseVersion('1.0'): + warnings.warn(f"the dpdispatcher will be updated to new version." + f"And the interface may be changed. Please check the documents for more details") + dispatcher=make_dispatcher(mdata['model_devi_machine'],mdata['model_devi_resources'],'./', run_tasks, model_devi_group_size) + dispatcher.run_jobs(mdata['model_devi_resources'], + commands, + './', + run_tasks, + model_devi_group_size, + model_names, + forward_files, + backward_files, + outlog = 'model_devi.log', + errlog = 'model_devi.log') + elif LooseVersion(api_version) >= LooseVersion('1.0'): + os.chdir(cwd) + submission = make_submission( + mdata['model_devi_machine'], + mdata['model_devi_resources'], + commands=commands, + work_path=calypso_run_opt_path, + run_tasks=run_tasks, + group_size=model_devi_group_size, + forward_common_files=model_names, + forward_files=forward_files, + backward_files=backward_files, + outlog = 'model_devi.log', + errlog = 'model_devi.log') + submission.run_submission() + os.chdir(calypso_run_opt_path) + + os.mkdir('opt') + if not os.path.exists('traj'): + os.mkdir('traj') + for jjj in range(len(all_task)): + # to opt directory + shutil.copyfile('POSCAR_%s'%str(jjj+1),os.path.join('opt','POSCAR_%s'%str(jjj+1)),) + shutil.copyfile(os.path.join('task.%04d'%(jjj+1),'OUTCAR'),os.path.join('opt','OUTCAR_%s'%str(jjj+1)),) + shutil.copyfile(os.path.join('task.%04d'%(jjj+1),'CONTCAR'),os.path.join('opt','CONTCAR_%s'%str(jjj+1)),) + # to run calypso directory + shutil.copyfile(os.path.join('task.%04d'%(jjj+1),'OUTCAR'),'OUTCAR_%s'%str(jjj+1),) + shutil.copyfile(os.path.join('task.%04d'%(jjj+1),'CONTCAR'),'CONTCAR_%s'%str(jjj+1),) + # to traj + shutil.copyfile(os.path.join('task.%04d'%(jjj+1),'traj.traj'),os.path.join('traj','%s.traj'%str(jjj+1)),) + + tlist = glob.glob('task.*') + for t in tlist: + shutil.rmtree(t) + # -------------------------------------------------------------- + + os.chdir(cwd) + os.chdir(work_path) + f = open('record.calypso','a+') + f.write('2\n') + f.close() + os.chdir(cwd) + +def analysis(iter_index,jdata,calypso_run_opt_path,calypso_model_devi_path): + + # Analysis + + + #dlog.info('$$$$$$$$$$$$$$$ Analysis Started $$$$$$$$$$$$$$$$$$') + + ms = dpdata.MultiSystems() + + cwd = os.getcwd() + iter_name = make_iter_name(iter_index) + work_path = os.path.join(iter_name, model_devi_name) + result_path = os.path.join(calypso_run_opt_path,'results') + + # trajs to be model devi + traj_path = os.path.join(calypso_run_opt_path,'traj') + traj_list = glob.glob(traj_path+'/*.traj') + + #dlog.info('len(traj_list) %s'%str(len(traj_list))) + + # read confs from traj + record_traj_num = 0 + for traj_name in traj_list: + traj_num = os.path.basename(traj_name).split('.')[0] + trajs_origin = Trajectory(traj_name) + + record_traj_num += len(trajs_origin) + if len(trajs_origin) >= 20 : + trajs = [trajs_origin[iii] for iii in [4,9,-10,-5,-1]] + elif 5<=len(trajs_origin)<20: + trajs = [trajs_origin[random.randint(1,len(trajs_origin)-1)] for iii in range(4)] + trajs.append(trajs[-1]) + elif 3<= len(trajs_origin) <5: + trajs = [trajs_origin[round((len(trajs_origin)-1)/2)] ] + trajs.append(trajs[-1]) + elif len(trajs_origin) == 2: + trajs = [trajs_origin[0],trajs_origin[-1] ] + elif len(trajs_origin) == 1: + trajs = [trajs_origin[0] ] + else: + pass + + for idx, traj in enumerate(trajs): + write_vasp(os.path.join( + traj_path,'%03d.%03d.poscar' % ( + int(traj_num), int(idx) + ) + ), + traj) + + traj_pos_list = glob.glob(traj_path+'/*.poscar') + + #dlog.info('traj_num %s'%str(len(traj_pos_list))) + #dlog.info('total_traj_num %s'%str(record_traj_num)) + + for npos in traj_pos_list: + try: + ms.append(dpdata.System(npos, type_map = jdata['type_map'])) + except Exception as e: + dlog.info(npos,'failed : ',e) + + if len(ms) == 0: + print('too little confs, ') + return + + if os.path.exists(os.path.join(result_path,'deepmd')): + shutil.rmtree(os.path.join(result_path,'deepmd')) + ms.to_deepmd_raw(os.path.join(result_path,'deepmd')) + ms.to_deepmd_npy(os.path.join(result_path,'deepmd')) + + + split_lists = glob.glob(os.path.join(result_path,'deepmd','*')) + for i,split_list in enumerate(split_lists): + #ss = dpdata.System(split_list,fmt='deepmd') + #for j in range(ss.get_nframes()): + # ss.to('vasp/poscar',os.path.join(split_list,'%03d.%03d.poscar'%(i,j)),frame_idx=j) + strus_path = os.path.join(calypso_model_devi_path,'%03d.structures'%i) + if not os.path.exists(strus_path): + shutil.copytree(split_list,strus_path) + else: + shutil.rmtree(strus_path) + shutil.copytree(split_list,strus_path) + + os.chdir(cwd) + os.chdir(work_path) + f = open('record.calypso','a+') + f.write('3\n') + f.close() + os.chdir(cwd) + + +def run_calypso_model_devi (iter_index, + jdata, + mdata) : + + dlog.info('start running CALYPSO') + + + iter_name = make_iter_name(iter_index) + work_path = os.path.join(iter_name, model_devi_name) + assert(os.path.isdir(work_path)) + + calypso_run_opt_path = os.path.join(work_path,calypso_run_opt_name) + calypso_model_devi_path = os.path.join(work_path,calypso_model_devi_name) + + cwd = os.getcwd() + + record_calypso_path = os.path.join(work_path,'record.calypso') + while True: + if not os.path.exists(record_calypso_path): + f = open(record_calypso_path,'w') + f.write('1\n') + lines = '1' + f.close() + else: + f = open(record_calypso_path,'r') + lines = f.readlines() + f.close() + + if lines[-1].strip().strip('\n') == '1': + # Gen Structures + gen_structures(iter_index,jdata,mdata) + + elif lines[-1].strip().strip('\n') == '2': + # Analysis & to deepmd/raw + analysis(iter_index,jdata,calypso_run_opt_path,calypso_model_devi_path) + + elif lines[-1].strip().strip('\n') == '3': + # Model Devi + _calypso_run_opt_path = os.path.abspath(calypso_run_opt_path) + all_models = glob.glob(os.path.join(_calypso_run_opt_path, 'graph*pb')) + cwd = os.getcwd() + os.chdir(calypso_model_devi_path) + args = ' '.join(['calypso_run_model_devi.py', '--all_models',' '.join(all_models),'--type_map',' '.join(jdata.get('type_map'))]) + deepmdkit_python = mdata.get('model_devi_deepmdkit_python') + os.system(f'{deepmdkit_python} {args} ') + #Modd(iter_index,calypso_model_devi_path,all_models,jdata) + os.chdir(cwd) + + elif lines[-1].strip().strip('\n') == '4': + #dlog.info('Model Devi is done.') + break diff --git a/dpgen/generator/run.py b/dpgen/generator/run.py index 92bdb8c2a..d43b019a7 100644 --- a/dpgen/generator/run.py +++ b/dpgen/generator/run.py @@ -41,6 +41,9 @@ from dpgen.generator.lib.utils import log_task from dpgen.generator.lib.utils import symlink_user_forward_files from dpgen.generator.lib.lammps import make_lammps_input, get_dumped_forces +from dpgen.generator.lib.make_calypso import _make_model_devi_native_calypso,_make_model_devi_buffet +from dpgen.generator.lib.run_calypso import gen_structures,analysis,run_calypso_model_devi +from dpgen.generator.lib.parse_calypso import _parse_calypso_input,_parse_calypso_dis_mtx from dpgen.generator.lib.vasp import write_incar_dict from dpgen.generator.lib.vasp import make_vasp_incar_user_dict from dpgen.generator.lib.vasp import incar_upper @@ -79,6 +82,12 @@ fp_name = '02.fp' fp_task_fmt = data_system_fmt + '.%06d' cvasp_file=os.path.join(ROOT_PATH,'generator/lib/cvasp.py') +# for calypso +calypso_run_opt_name = 'gen_stru_analy' +calypso_model_devi_name = 'model_devi_results' +calypso_run_model_devi_file = os.path.join(ROOT_PATH,'generator/lib/calypso_run_model_devi.py') +check_outcar_file = os.path.join(ROOT_PATH,'generator/lib/calypso_check_outcar.py') +run_opt_file = os.path.join(ROOT_PATH,'generator/lib/calypso_run_opt.py') def get_job_names(jdata) : jobkeys = [] @@ -230,11 +239,12 @@ def make_train (iter_index, "By default, the picking probability of data from one system or one iter is proportional to the number of batches (the number of frames divided by batch_size) of that systems or iter.\n" \ "Detailed discussion about init-model (in Chinese) please see https://mp.weixin.qq.com/s/qsKMZ0j270YhQKvwXUiFvQ") + model_devi_engine = jdata.get('model_devi_engine', "lammps") if iter_index > 0 and _check_empty_iter(iter_index-1, fp_task_min) : log_task('prev data is empty, copy prev model') copy_model(numb_models, iter_index-1, iter_index) return - elif iter_index > 0 and _check_skip_train(model_devi_jobs[iter_index-1]): + elif model_devi_engine != 'calypso' and iter_index > 0 and _check_skip_train(model_devi_jobs[iter_index-1]): log_task('skip training at step %d ' % (iter_index-1)) copy_model(numb_models, iter_index-1, iter_index) return @@ -291,6 +301,10 @@ def make_train (iter_index, old_range = len(init_data_sys) fp_path = os.path.join(make_iter_name(ii), fp_name) fp_data_sys = glob.glob(os.path.join(fp_path, "data.*")) + if model_devi_engine == 'calypso': + _modd_path = os.path.join(make_iter_name(ii), model_devi_name, calypso_model_devi_name) + sys_list = glob.glob(os.path.join(_modd_path, "*.structures")) + sys_batch_size = ["auto" for aa in range(len(sys_list))] for jj in fp_data_sys : sys_idx = int(jj.split('.')[-1]) if jdata.get('use_clusters', False): @@ -771,17 +785,34 @@ def revise_by_keys(lmp_lines, keys, values): lmp_lines[ii] = lmp_lines[ii].replace(kk, str(vv)) return lmp_lines - def make_model_devi (iter_index, jdata, mdata) : # The MD engine to perform model deviation # Default is lammps model_devi_engine = jdata.get('model_devi_engine', "lammps") + model_devi_jobs = jdata['model_devi_jobs'] - if (iter_index >= len(model_devi_jobs)) : - return False - cur_job = model_devi_jobs[iter_index] + if model_devi_engine != 'calypso': + if (iter_index >= len(model_devi_jobs)) : + return False + else: + # mode 1: generate structures according to the user-provided input.dat file, so calypso_input_path and model_devi_max_iter are needed + if "calypso_input_path" in jdata: + try: + maxiter = jdata.get('model_devi_max_iter') + except KeyError: + raise KeyError('calypso_input_path key exists so you should provide model_devi_max_iter key to control the max iter number') + # mode 2: control each iteration to generate structures in specific way by providing model_devi_jobs key + else: + try: + maxiter = max(model_devi_jobs[-1].get('times')) + except KeyError: + raise KeyError('did not find model_devi_jobs["times"] key') + if (iter_index > maxiter) : + print(f'iter_index is {iter_index} and maxiter is {maxiter}') + return False + if "sys_configs_prefix" in jdata: sys_configs = [] for sys_list in jdata["sys_configs"]: @@ -792,7 +823,13 @@ def make_model_devi (iter_index, sys_configs = jdata['sys_configs'] shuffle_poscar = jdata['shuffle_poscar'] - sys_idx = expand_idx(cur_job['sys_idx']) + if model_devi_engine != 'calypso': + cur_job = model_devi_jobs[iter_index] + sys_idx = expand_idx(cur_job['sys_idx']) + else: + cur_job = [] + sys_idx = [] + if (len(sys_idx) != len(list(set(sys_idx)))) : raise RuntimeError("system index should be uniq") conf_systems = [] @@ -811,9 +848,26 @@ def make_model_devi (iter_index, models = sorted(glob.glob(os.path.join(train_path, "graph*pb"))) work_path = os.path.join(iter_name, model_devi_name) create_path(work_path) + if model_devi_engine == 'calypso': + calypso_run_opt_path = os.path.join(work_path,calypso_run_opt_name) + calypso_model_devi_path = os.path.join(work_path,calypso_model_devi_name) + create_path(calypso_run_opt_path) + create_path(calypso_model_devi_path) + # run model devi script + calypso_run_model_devi_script = os.path.join(calypso_model_devi_path,'calypso_run_model_devi.py') + shutil.copyfile(calypso_run_model_devi_file,calypso_run_model_devi_script) + # run confs opt script + run_opt_script = os.path.join(calypso_run_opt_path,'calypso_run_opt.py') + shutil.copyfile(run_opt_file,run_opt_script) + # check outcar script + check_outcar_script = os.path.join(calypso_run_opt_path,'check_outcar.py') + shutil.copyfile(check_outcar_file,check_outcar_script) for mm in models : model_name = os.path.basename(mm) - os.symlink(mm, os.path.join(work_path, model_name)) + if model_devi_engine != 'calypso': + os.symlink(mm, os.path.join(work_path, model_name)) + else: + os.symlink(mm, os.path.join(calypso_run_opt_path, model_name)) with open(os.path.join(work_path, 'cur_job.json'), 'w') as outfile: json.dump(cur_job, outfile, indent = 4) @@ -848,6 +902,8 @@ def make_model_devi (iter_index, sys_counter += 1 input_mode = "native" + if "calypso_input_path" in jdata: + input_mode = "buffet" if "template" in cur_job: input_mode = "revise_template" use_plm = jdata.get('model_devi_plumed', False) @@ -857,17 +913,20 @@ def make_model_devi (iter_index, _make_model_devi_native(iter_index, jdata, mdata, conf_systems) elif model_devi_engine == "gromacs": _make_model_devi_native_gromacs(iter_index, jdata, mdata, conf_systems) + elif model_devi_engine == "calypso": + _make_model_devi_native_calypso(iter_index,model_devi_jobs, calypso_run_opt_path) # generate input.dat automatic in each iter else: raise RuntimeError("unknown model_devi engine", model_devi_engine) elif input_mode == "revise_template": _make_model_devi_revmat(iter_index, jdata, mdata, conf_systems) + elif input_mode == "buffet": + _make_model_devi_buffet(jdata,calypso_run_opt_path) # generate confs according to the input.dat provided else: raise RuntimeError('unknown model_devi input mode', input_mode) #Copy user defined forward_files symlink_user_forward_files(mdata=mdata, task_type="model_devi", work_path=work_path) return True - def _make_model_devi_revmat(iter_index, jdata, mdata, conf_systems): model_devi_jobs = jdata['model_devi_jobs'] if (iter_index >= len(model_devi_jobs)) : @@ -1212,9 +1271,10 @@ def _make_model_devi_native_gromacs(iter_index, jdata, mdata, conf_systems): -def run_model_devi (iter_index, - jdata, - mdata) : +def run_md_model_devi (iter_index, + jdata, + mdata) : + #rmdlog.info("This module has been run !") model_devi_exec = mdata['model_devi_command'] @@ -1331,6 +1391,14 @@ def run_model_devi (iter_index, errlog = 'model_devi.log') submission.run_submission() +def run_model_devi(iter_index,jdata,mdata): + + model_devi_engine = jdata.get("model_devi_engine", "lammps") + if model_devi_engine != "calypso": + run_md_model_devi(iter_index,jdata,mdata) + else: + run_calypso_model_devi(iter_index,jdata,mdata) + def post_model_devi (iter_index, jdata, mdata) : @@ -1387,6 +1455,15 @@ def check_bad_box(conf_name, ratio = np.max(lengths) / np.min(dists) if ratio > float(value): is_bad = True + # + elif key == 'wrap_ratio': + ratio=[sys['cells'][0][1][0]/sys['cells'][0][0][0],sys['cells'][0][2][1]/sys['cells'][0][1][1],sys['cells'][0][2][0]/sys['cells'][0][0][0]] + if np.max(np.abs(ratio)) > float(value): + is_bad = True + elif key == 'tilt_ratio': + ratio=[sys['cells'][0][1][0]/sys['cells'][0][1][1],sys['cells'][0][2][1]/sys['cells'][0][2][2],sys['cells'][0][2][0]/sys['cells'][0][2][2]] + if np.max(np.abs(ratio)) > float(value): + is_bad= True else: raise RuntimeError('unknow key', key) return is_bad @@ -1417,10 +1494,17 @@ def _select_by_model_devi_standard( v_trust_lo : float, v_trust_hi : float, cluster_cutoff : float, + model_devi_engine : str, model_devi_skip : int = 0, model_devi_f_avg_relative : bool = False, detailed_report_make_fp : bool = True, ): + if model_devi_engine == 'calypso': + iter_name = modd_system_task[0].split('/')[0] + _work_path = os.path.join(iter_name, model_devi_name) + calypso_run_opt_path = os.path.join(_work_path,calypso_run_opt_name) + numofspecies = _parse_calypso_input('NumberOfSpecies',calypso_run_opt_path) + min_dis = _parse_calypso_dis_mtx(numofspecies,calypso_run_opt_path) fp_candidate = [] if detailed_report_make_fp: fp_rest_accurate = [] @@ -1434,11 +1518,22 @@ def _select_by_model_devi_standard( with warnings.catch_warnings(): warnings.simplefilter("ignore") all_conf = _read_model_devi_file(tt, model_devi_f_avg_relative) + + if all_conf.shape == (7,): + all_conf = all_conf.reshape(1,all_conf.shape[0]) + elif model_devi_engine == 'calypso' and all_conf.shape == (8,): + all_conf = all_conf.reshape(1,all_conf.shape[0]) for ii in range(all_conf.shape[0]) : if all_conf[ii][0] < model_devi_skip : continue cc = int(all_conf[ii][0]) if cluster_cutoff is None: + if model_devi_engine == 'calypso': + if float(all_conf[ii][-1]) <= float(min_dis): + if detailed_report_make_fp: + fp_rest_failed.append([tt, cc]) + counter['failed'] += 1 + continue if (all_conf[ii][1] < v_trust_hi and all_conf[ii][1] >= v_trust_lo) or \ (all_conf[ii][4] < f_trust_hi and all_conf[ii][4] >= f_trust_lo) : fp_candidate.append([tt, cc]) @@ -1452,7 +1547,10 @@ def _select_by_model_devi_standard( fp_rest_accurate.append([tt, cc]) counter['accurate'] += 1 else : - raise RuntimeError('md traj %s frame %d with f devi %f does not belong to either accurate, candidiate and failed, it should not happen' % (tt, ii, all_conf[ii][4])) + if model_devi_engine == 'calypso': + dlog.info('ase opt traj %s frame %d with f devi %f does not belong to either accurate, candidiate and failed '% (tt, ii, all_conf[ii][4])) + else: + raise RuntimeError('md traj %s frame %d with f devi %f does not belong to either accurate, candidiate and failed, it should not happen' % (tt, ii, all_conf[ii][4])) else: idx_candidate = np.where(np.logical_and(all_conf[ii][7:] < f_trust_hi, all_conf[ii][7:] >= f_trust_lo))[0] for jj in idx_candidate: @@ -1590,6 +1688,35 @@ def _make_fp_vasp_inner (modd_path, fp_params map parameters for fp """ + # -------------------------------------------------------------------------------------------------------------------------------------- + model_devi_engine = jdata.get('model_devi_engine', 'lammps') + if model_devi_engine == 'calypso': + iter_name = work_path.split('/')[0] + _work_path = os.path.join(iter_name, model_devi_name) + calypso_run_opt_path = os.path.join(_work_path,calypso_run_opt_name) + numofspecies = _parse_calypso_input('NumberOfSpecies',calypso_run_opt_path) + min_dis = _parse_calypso_dis_mtx(numofspecies,calypso_run_opt_path) + + calypso_total_fp_num = 300 + modd_path = os.path.join(modd_path,calypso_model_devi_name) + model_devi_skip = -1 + with open(os.path.join(modd_path,'Model_Devi.out'),'r') as summfile: + summary = np.loadtxt(summfile) + summaryfmax = summary[:,-4] + dis = summary[:,-1] + acc = np.where((summaryfmax <= f_trust_lo) & (dis > float(min_dis))) + fail = np.where((summaryfmax > f_trust_hi) | (dis <= float(min_dis))) + nnan = np.where(np.isnan(summaryfmax)) + + acc_num = len(acc[0]) + fail_num = len(fail[0]) + nan_num = len(nnan[0]) + tot = len(summaryfmax) - nan_num + candi_num = tot - acc_num - fail_num + dlog.info("summary accurate_ratio: {0:8.4f}% candidata_ratio: {1:8.4f}% failed_ratio: {2:8.4f}% in {3:d} structures".format( + acc_num*100/tot,candi_num*100/tot,fail_num*100/tot,tot )) + # -------------------------------------------------------------------------------------------------------------------------------------- + modd_task = glob.glob(os.path.join(modd_path, "task.*")) modd_task.sort() system_index = [] @@ -1640,6 +1767,7 @@ def _trust_limitation_check(sys_idx, lim): f_trust_lo_sys, f_trust_hi_sys, v_trust_lo_sys, v_trust_hi_sys, cluster_cutoff, + model_devi_engine, model_devi_skip, model_devi_f_avg_relative = model_devi_f_avg_relative, detailed_report_make_fp = detailed_report_make_fp, @@ -1661,6 +1789,10 @@ def _trust_limitation_check(sys_idx, lim): # print a report fp_sum = sum(counter.values()) + + if fp_sum == 0: + dlog.info('system {0:s} has no fp task, maybe the model devi is nan %'.format(ss)) + continue for cc_key, cc_value in counter.items(): dlog.info("system {0:s} {1:9s} : {2:6d} in {3:6d} {4:6.2f} %".format(ss, cc_key, cc_value, fp_sum, cc_value/fp_sum*100)) random.shuffle(fp_candidate) @@ -1687,9 +1819,29 @@ def _trust_limitation_check(sys_idx, lim): this_fp_task_max = int(fp_task_max * (accurate_ratio - fp_accurate_threshold) / (fp_accurate_soft_threshold - fp_accurate_threshold)) else: this_fp_task_max = 0 + # ---------------------------------------------------------------------------- + if model_devi_engine == 'calypso': + calypso_intend_fp_num_temp = (len(fp_candidate)/candi_num)*calypso_total_fp_num + if calypso_intend_fp_num_temp < 1: + calypso_intend_fp_num = 1 + else: + calypso_intend_fp_num = int(calypso_intend_fp_num_temp) + # ---------------------------------------------------------------------------- numb_task = min(this_fp_task_max, len(fp_candidate)) if (numb_task < fp_task_min): numb_task = 0 + + # ---------------------------------------------------------------------------- + if (model_devi_engine == 'calypso' and len(jdata.get('type_map')) == 1) or \ + (model_devi_engine == 'calypso' and len(jdata.get('type_map')) > 1 and candi_num <= calypso_total_fp_num): + numb_task = min(this_fp_task_max, len(fp_candidate)) + if (numb_task < fp_task_min): + numb_task = 0 + elif (model_devi_engine == 'calypso' and len(jdata.get('type_map')) > 1 and candi_num > calypso_total_fp_num): + numb_task = calypso_intend_fp_num + if (len(fp_candidate) < numb_task): + numb_task = 0 + # ---------------------------------------------------------------------------- dlog.info("system {0:s} accurate_ratio: {1:8.4f} thresholds: {2:6.4f} and {3:6.4f} eff. task min and max {4:4d} {5:4d} number of fp tasks: {6:6d}".format(ss, accurate_ratio, fp_accurate_soft_threshold, fp_accurate_threshold, fp_task_min, this_fp_task_max, numb_task)) # make fp tasks model_devi_engine = jdata.get("model_devi_engine", "lammps") @@ -1702,13 +1854,18 @@ def _trust_limitation_check(sys_idx, lim): conf_name = os.path.join(tt, "traj") if model_devi_engine == "lammps": conf_name = os.path.join(conf_name, str(ii) + '.lammpstrj') + ffmt = 'lammps/dump' elif model_devi_engine == "gromacs": conf_name = os.path.join(conf_name, str(ii) + '.gromacstrj') + ffmt = 'lammps/dump' + elif model_devi_engine == "calypso": + conf_name = os.path.join(conf_name, str(ii) + '.poscar') + ffmt = 'vasp/poscar' else: raise RuntimeError("unknown model_devi engine", model_devi_engine) conf_name = os.path.abspath(conf_name) if skip_bad_box is not None: - skip = check_bad_box(conf_name, skip_bad_box) + skip = check_bad_box(conf_name, skip_bad_box, fmt=ffmt) if skip: count_bad_box += 1 continue @@ -1720,9 +1877,10 @@ def _trust_limitation_check(sys_idx, lim): count_bad_cluster +=1 continue - # link job.json - job_name = os.path.join(tt, "job.json") - job_name = os.path.abspath(job_name) + if model_devi_engine != 'calypso': + # link job.json + job_name = os.path.join(tt, "job.json") + job_name = os.path.abspath(job_name) if cluster_cutoff is not None: # take clusters @@ -1739,8 +1897,15 @@ def _trust_limitation_check(sys_idx, lim): cwd = os.getcwd() os.chdir(fp_task_path) if cluster_cutoff is None: - os.symlink(os.path.relpath(conf_name), 'conf.dump') - os.symlink(os.path.relpath(job_name), 'job.json') + if model_devi_engine != 'calypso': + os.symlink(os.path.relpath(conf_name), 'conf.dump') + os.symlink(os.path.relpath(job_name), 'job.json') + else: + os.symlink(os.path.relpath(conf_name), 'POSCAR') + fjob = open('job.json','w+') + fjob.write('{"model_devi_engine":"calypso"}') + fjob.close() + #os.system('touch job.json') else: os.symlink(os.path.relpath(poscar_name), 'POSCAR') np.save("atom_pref", new_system.data["atom_pref"]) @@ -1751,6 +1916,8 @@ def _trust_limitation_check(sys_idx, lim): dlog.info("system {0:s} skipped {1:6d} confs with bad box, {2:6d} remains".format(ss, count_bad_box, numb_task - count_bad_box)) if count_bad_cluster > 0: dlog.info("system {0:s} skipped {1:6d} confs with bad cluster, {2:6d} remains".format(ss, count_bad_cluster, numb_task - count_bad_cluster)) + if model_devi_engine == 'calypso': + dlog.info("summary accurate_ratio: {0:8.4f}% candidata_ratio: {1:8.4f}% failed_ratio: {2:8.4f}% in {3:d} structures".format( acc_num*100/tot,candi_num*100/tot,fail_num*100/tot,tot )) if cluster_cutoff is None: cwd = os.getcwd() for idx, task in enumerate(fp_tasks): @@ -1765,6 +1932,8 @@ def _trust_limitation_check(sys_idx, lim): dump_to_deepmd_raw('conf.dump', 'deepmd.raw', type_map, fmt='gromacs/gro', charge=charges_recorder[idx]) else: dump_to_deepmd_raw('conf.dump', 'deepmd.raw', type_map, fmt='gromacs/gro', charge=None) + elif model_devi_engine == 'calypso': + pass else: raise RuntimeError("unknown model_devi engine", model_devi_engine) os.chdir(cwd) @@ -2502,8 +2671,10 @@ def post_fp_vasp (iter_index, rfailed=None): ratio_failed = rfailed if rfailed else jdata.get('ratio_failed',0.05) - model_devi_jobs = jdata['model_devi_jobs'] - assert (iter_index < len(model_devi_jobs)) + model_devi_engine = jdata.get('model_devi_engine', "lammps") + if model_devi_engine != 'calypso': + model_devi_jobs = jdata['model_devi_jobs'] + assert (iter_index < len(model_devi_jobs)) use_ele_temp = jdata.get('use_ele_temp', 0) iter_name = make_iter_name(iter_index) diff --git a/tests/generator/context.py b/tests/generator/context.py index a943bc895..3ee10b9c8 100644 --- a/tests/generator/context.py +++ b/tests/generator/context.py @@ -5,6 +5,8 @@ from dpgen.generator.lib.gaussian import detect_multiplicity from dpgen.generator.lib.ele_temp import NBandsEsti from dpgen.generator.lib.lammps import get_dumped_forces +from dpgen.generator.lib.make_calypso import make_calypso_input,write_model_devi_out +from dpgen.generator.lib.parse_calypso import _parse_calypso_input,_parse_calypso_dis_mtx param_file = 'param-mg-vasp.json' param_file_v1 = 'param-mg-vasp-v1.json' diff --git a/tests/generator/test_calypso.py b/tests/generator/test_calypso.py new file mode 100644 index 000000000..b302cfca6 --- /dev/null +++ b/tests/generator/test_calypso.py @@ -0,0 +1,94 @@ +import os,sys,json,glob,shutil,textwrap +import dpdata +import numpy as np +import unittest +from pathlib import Path + +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) +__package__ = 'generator' + +from .context import make_calypso_input +from .context import write_model_devi_out +from .context import _parse_calypso_input +from .context import _parse_calypso_dis_mtx + +# temp dir +test_path = Path('.').joinpath('calypso_test_path') +test_path.mkdir(parents=True,exist_ok=True) +os.system('rm calypso_test_path/*') +fmax = 0.01 +cwd = os.getcwd() + +model_devi = np.array([[0.000000e+00, 2.328491e-02, 5.476687e-09, 1.009454e-02, + 3.279617e-02, 4.053224e-03, 1.869795e-02, 2.184905e+00], + [1.000000e+00, 3.668334e-02, 8.200870e-09, 1.706517e-02, + 2.844074e-02, 7.093109e-03, 1.623275e-02, 2.424708e+00], + [2.000000e+00, 2.832296e-02, 4.828951e-08, 1.573961e-02, + 2.443331e-02, 2.871548e-03, 1.489787e-02, 2.564113e+00]]) + +model_devi_jobs = {"model_devi_jobs": {"times":[4],"NameOfAtoms":["Mg","Al","Cu"],"NumberOfAtoms":[1,1,1],"NumberOfFormula":[1,4],"Volume":[30],"DistanceOfIon":[[1.48,1.44,1.59],[1.44,1.41,1.56],[1.59,1.56,1.70]],"PsoRatio":[0.6],"PopSize":[5],"MaxStep":[3],"ICode":[13],"Split":"T","VSC":"T","MaxNumAtom":[31], + "CtrlRange":[[1,10],[1,10],[1,10]],"PSTRESS":[0],"fmax":[0.01]}} + + +class TestCALYPSOScript(unittest.TestCase): + def setUp(self): + pass + + def tearDown(self): + pass + + def test_write_model_devi_out(self): + #devi = write_model_devi_out(model_devi, 'calypso_test_path/model_devi.out') + #ndevi = np.loadtxt('calypso_test_path/model_devi.out') + devi = write_model_devi_out(model_devi, 'model_devi.out') + ndevi = np.loadtxt('model_devi.out') + self.assertEqual(ndevi[2,4],model_devi[2,4]) + os.remove('model_devi.out') + + def test_make_calypso_input(self): + ret = make_calypso_input(["Mg","Al","Cu"],[1,1,1],[1,4],[30],[ + [1.48,1.44,1.59],[1.44,1.41,1.56],[1.59,1.56,1.70] + ],[0.6],[5],[3],[13],"T","T",[31],[[1,10],[1,10],[1,10]],[0],[0.01]) + #with open('calypso_test_path/input.dat','w') as fin: + with open('input.dat','w') as fin: + fin.write(ret) + f = open('input.dat') + #f = open('calypso_test_path/input.dat') + lines = f.readlines() + f.close() + for line in lines : + if line[0] == '#': + continue + if 'PopSize' in line: + temp_1 = line.split('=')[1].strip() + self.assertEqual(int(temp_1),5) + if 'MaxStep' in line: + temp_2 = line.split('=')[1].strip() + self.assertEqual(int(temp_2),3) + os.remove('input.dat') + break + + def test_parse_calypso_input(self): + ret = make_calypso_input(["Mg","Al","Cu"],[1,1,1],[1,4],[30],[ + [1.48,1.44,1.59],[1.44,1.41,1.56],[1.59,1.56,1.70] + ],[0.6],[5],[3],[13],"T","T",[31],[[1,10],[1,10],[1,10]],[0],[0.01]) + #with open('calypso_test_path/input.dat','w') as fin: + with open('input.dat','w') as fin: + fin.write(ret) + formula = _parse_calypso_input('NumberOfFormula','input.dat').split() + #formula = _parse_calypso_input('NumberOfFormula',calypso_data).split() + formula = list(map(int,formula)) + self.assertEqual(formula,model_devi_jobs.get('model_devi_jobs').get('NumberOfFormula')) + + nameofatoms = _parse_calypso_input('NameOfAtoms','input.dat').split() + #nameofatoms = _parse_calypso_input('NameOfAtoms',calypso_data).split() + self.assertEqual(nameofatoms,model_devi_jobs.get('model_devi_jobs').get('NameOfAtoms')) + + min_dis = _parse_calypso_dis_mtx(len(nameofatoms),'input.dat') + #min_dis = _parse_calypso_dis_mtx(len(nameofatoms),calypso_data) + self.assertEqual(float(min_dis),np.nanmin(model_devi_jobs.get('model_devi_jobs').get('DistanceOfIon'))) + os.remove('input.dat') + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/tests/generator/test_make_fp.py b/tests/generator/test_make_fp.py index 1687b695d..8158888f8 100644 --- a/tests/generator/test_make_fp.py +++ b/tests/generator/test_make_fp.py @@ -578,6 +578,7 @@ def test_make_fp_abacus(self): make_fp(0, jdata, {}) _check_sel(self, 0, jdata['fp_task_max'], jdata['model_devi_f_trust_lo'], jdata['model_devi_f_trust_hi']) _check_poscars(self, 0, jdata['fp_task_max'], jdata['type_map']) + _check_poscars(self, 0, jdata['fp_task_max'], jdata['type_map']) _check_abacus_input(self, 0) _check_abacus_kpt(self, 0) _check_potcar(self, 0, jdata['fp_pp_path'], jdata['fp_pp_files']) @@ -912,7 +913,8 @@ def test_make_fp_pwmat(self): _check_poscars(self, 0, jdata['fp_task_max'], jdata['type_map']) _check_pwmat_input(self, 0) _check_potcar(self, 0, jdata['fp_pp_path'], jdata['fp_pp_files']) - shutil.rmtree('iter.000000') + os.system('rm -r iter.000000') + #shutil.rmtree('iter.000000') if __name__ == '__main__': unittest.main() From 25269cf5dcf41cbcbb1d1593df193dfcf6d795cc Mon Sep 17 00:00:00 2001 From: Liu Renxi <75369672+Liu-RX@users.noreply.github.com> Date: Sun, 24 Apr 2022 20:36:28 +0800 Subject: [PATCH 7/9] Add ABACUS/lcao deepks interface to dpgen init and run. (#705) * add abacus+lcao+dpks interface for dpgen init and run. * fix test abacus make input bug. * Update requirements.txt add dpdata==0.2.6 to requirements. * Update setup.py update dpdata to 0.2.6 * fix bugs concerning abacus in README * update abacus example files to dpmd 2.x and dpdispatcher new version. Co-authored-by: LiuRenxi Co-authored-by: Han Wang --- README.md | 4 + dpgen/data/gen.py | 114 ++- dpgen/data/tools/create_random_disturb.py | 2 +- dpgen/generator/lib/abacus_scf.py | 159 ++-- dpgen/generator/run.py | 62 +- examples/init/abacus/CuW.json | 6 + examples/init/abacus/INPUT | 13 +- examples/init/abacus/INPUT.md | 18 +- .../methane/machine.json | 75 ++ .../methane/param.json | 152 ++++ .../methane/machine.json | 149 ++-- .../dp1.x-lammps-ABACUS-pw/methane/param.json | 29 +- requirements.txt | 1 + setup.py | 2 +- tests/data/abacus.out/box.raw | 17 +- tests/data/abacus.out/coord.raw | 17 +- tests/data/abacus.out/energy.raw | 17 +- tests/data/abacus.out/force.raw | 17 +- tests/data/abacus.out/virial.raw | 17 +- .../sys-0004-0001/scale-0.950/000000/INPUT | 15 +- .../scale-0.950/000000/OUT.ABACUS/INPUT | 263 ------ .../scale-0.950/000000/OUT.ABACUS/MD_dump | 72 ++ .../scale-0.950/000000/OUT.ABACUS/STRU_MD | 27 - .../000000/OUT.ABACUS/STRU_READIN_ADJUST.cif | 24 - .../000000/OUT.ABACUS/md_pos_1.cif | 24 - .../000000/OUT.ABACUS/md_pos_2.cif | 24 - .../000000/OUT.ABACUS/md_pos_3.cif | 24 - .../000000/OUT.ABACUS/running_md.log | 742 +++++++++-------- .../sys-0004-0001/scale-0.950/000000/STRU | 17 +- .../sys-0004-0001/scale-0.950/000001/INPUT | 15 +- .../scale-0.950/000001/OUT.ABACUS/INPUT | 263 ------ .../scale-0.950/000001/OUT.ABACUS/MD_dump | 72 ++ .../scale-0.950/000001/OUT.ABACUS/STRU_MD | 27 - .../000001/OUT.ABACUS/STRU_READIN_ADJUST.cif | 24 - .../000001/OUT.ABACUS/md_pos_1.cif | 24 - .../000001/OUT.ABACUS/md_pos_2.cif | 24 - .../000001/OUT.ABACUS/md_pos_3.cif | 24 - .../000001/OUT.ABACUS/running_md.log | 782 ++++++++++-------- .../sys-0004-0001/scale-0.950/000001/STRU | 23 +- .../sys-0004-0001/scale-0.950/000002/INPUT | 20 - .../scale-0.950/000002/OUT.ABACUS/INPUT | 263 ------ .../scale-0.950/000002/OUT.ABACUS/STRU_MD | 27 - .../000002/OUT.ABACUS/STRU_READIN_ADJUST.cif | 24 - .../000002/OUT.ABACUS/md_pos_1.cif | 24 - .../000002/OUT.ABACUS/md_pos_2.cif | 24 - .../000002/OUT.ABACUS/md_pos_3.cif | 24 - .../000002/OUT.ABACUS/running_md.log | 701 ---------------- .../sys-0004-0001/scale-0.950/000002/STRU | 25 - tests/data/test_coll_abacus.py | 18 +- tests/generator/param-methane-abacus.json | 1 - tests/generator/test_make_fp.py | 2 +- 51 files changed, 1656 insertions(+), 2878 deletions(-) create mode 100644 examples/run/dp1.x-lammps-ABACUS-lcao-dpks/methane/machine.json create mode 100644 examples/run/dp1.x-lammps-ABACUS-lcao-dpks/methane/param.json delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/INPUT create mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/MD_dump delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/STRU_MD delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/STRU_READIN_ADJUST.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_1.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_2.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_3.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/INPUT create mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/MD_dump delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/STRU_MD delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/STRU_READIN_ADJUST.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_1.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_2.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_3.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/INPUT delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/INPUT delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/STRU_MD delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/STRU_READIN_ADJUST.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_1.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_2.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_3.cif delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/running_md.log delete mode 100644 tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/STRU diff --git a/README.md b/README.md index 7b4ee04d8..30e9decc6 100644 --- a/README.md +++ b/README.md @@ -614,6 +614,10 @@ The bold notation of key (such aas **type_map**) means that it's a necessary key | *fp_style == cp2k* | **user_fp_params** | Dict | |Parameters for cp2k calculation. find detail in manual.cp2k.org. only the kind section must be set before use. we assume that you have basic knowledge for cp2k input. | **external_input_path** | String | | Conflict with key:user_fp_params, use the template input provided by user, some rules should be followed, read the following text in detail. +| *fp_style == ABACUS* +| **user_fp_params** | Dict | |Parameters for ABACUS INPUT. find detail [Here](https://github.com/deepmodeling/abacus-develop/blob/develop/docs/input-main.md#out-descriptor). If `deepks_model` is set, the model file should be in the pseudopotential directory. +| **fp_orb_files** | List | |List of atomic orbital files. The files should be in pseudopotential directory. +| **fp_dpks_descriptor** | String | |DeePKS descriptor file name. The file should be in pseudopotential directory. One can choose the model-deviation engine by specifying the key `model_devi_engine`. If `model_devi_engine` is not specified, the default model-deviation engine will be LAMMPS. diff --git a/dpgen/data/gen.py b/dpgen/data/gen.py index 1e3cba355..43932bd80 100644 --- a/dpgen/data/gen.py +++ b/dpgen/data/gen.py @@ -136,15 +136,28 @@ def stru_ele(supercell_stru, stru_out, eles, natoms, jdata, path_work): for iatom in range(natoms[iele]): supercell_stru["types"].append(iele) pp_file_names = [os.path.basename(a) for a in jdata['potcars']] + orb_file_names = None + dpks_descriptor_name = None + if 'orb_files' in jdata: + orb_file_names = [os.path.basename(a) for a in jdata['orb_files']] + if 'dpks_descriptor' in jdata: + dpks_descriptor_name = os.path.basename(jdata['dpks_descriptor']) supercell_stru["atom_masses"] = jdata["atom_masses"] supercell_stru["atom_names"] = eles - stru_text = make_abacus_scf_stru(supercell_stru, pp_file_names) + stru_text = make_abacus_scf_stru(supercell_stru, pp_file_names, orb_file_names, dpks_descriptor_name) with open(stru_out, "w") as f: f.write(stru_text) absolute_pp_file_path = [os.path.abspath(a) for a in jdata["potcars"]] + if 'orb_files' in jdata: + absolute_orb_file_path = [os.path.abspath(a) for a in jdata['orb_files']] + if 'dpks_descriptor' in jdata: + absolute_dpks_descriptor_path = os.path.abspath(jdata['dpks_descriptor']) for ipp, pp_file in enumerate(absolute_pp_file_path): os.symlink(pp_file, os.path.join(path_work, pp_file_names[ipp])) - + if 'orb_files' in jdata: + os.symlink(absolute_orb_file_path[ipp], os.path.join(path_work, orb_file_names[ipp])) + if 'dpks_descriptor' in jdata: + os.symlink(absolute_dpks_descriptor_path, os.path.join(path_work, dpks_descriptor_name)) def poscar_natoms(lines) : numb_atoms = 0 @@ -217,7 +230,14 @@ def poscar_scale_abacus(poscar_in, poscar_out, scale, jdata): stru["cells"] *= scale stru["coords"] *= scale pp_files = [os.path.basename(a) for a in jdata['potcars']] - ret = make_abacus_scf_stru(stru, pp_files) + orb_file_names = None + dpks_descriptor_name = None + if 'orb_files' in jdata: + orb_file_names = [os.path.basename(a) for a in jdata['orb_files']] + if 'dpks_descriptor' in jdata: + dpks_descriptor_name = os.path.basename(jdata['dpks_descriptor']) + ret = make_abacus_scf_stru(stru, pp_files, orb_file_names, dpks_descriptor_name) + #ret = make_abacus_scf_stru(stru, pp_files) with open(poscar_out, "w") as fp: fp.write(ret) @@ -351,7 +371,13 @@ def make_super_cell_STRU(jdata) : from_struct=get_abacus_STRU(from_file, n_ele=len(jdata["elements"])) from_struct = make_supercell_abacus(from_struct, super_cell) pp_file_names = [os.path.basename(a) for a in jdata['potcars']] - stru_text = make_abacus_scf_stru(from_struct, pp_file_names) + orb_file_names = None + dpks_descriptor_name = None + if 'orb_files' in jdata: + orb_file_names = [os.path.basename(a) for a in jdata['orb_files']] + if 'dpks_descriptor' in jdata: + dpks_descriptor_name = os.path.basename(jdata['dpks_descriptor']) + stru_text = make_abacus_scf_stru(from_struct, pp_file_names, orb_file_names, dpks_descriptor_name) with open(to_file, "w") as fp: fp.write(stru_text) # if kspacing is specified in json file, use kspacing to generate KPT (rather than directly using specified KPT). @@ -372,12 +398,20 @@ def make_super_cell_STRU(jdata) : create_path(path_work) cwd = os.getcwd() absolute_pp_file_path = [os.path.abspath(a) for a in jdata['potcars']] + if 'orb_files' in jdata: + absolute_orb_file_path = [os.path.abspath(a) for a in jdata['orb_files']] + if 'dpks_descriptor' in jdata: + absolute_dpks_descriptor_path = os.path.abspath(jdata['dpks_descriptor']) to_file = os.path.abspath(to_file) os.chdir(path_work) try: os.symlink(os.path.relpath(to_file), 'STRU') for ipp, pp_file in enumerate(absolute_pp_file_path): os.symlink(pp_file, pp_file_names[ipp]) # create pseudo-potential files + if 'orb_files' in jdata: + os.symlink(absolute_orb_file_path[ipp], orb_file_names[ipp]) + if 'dpks_descriptor' in jdata: + os.symlink(absolute_dpks_descriptor_path, dpks_descriptor_name) except FileExistsError: pass os.chdir(cwd) @@ -528,6 +562,13 @@ def make_abacus_relax (jdata, mdata) : jdata['relax_kpt'] = os.path.relpath(jdata['relax_kpt']) shutil.copy2( jdata['relax_kpt'], os.path.join(work_dir, 'KPT')) + + if "dpks_model" in jdata: + dpks_model_absolute_path = os.path.abspath(jdata["dpks_model"]) + assert(os.path.isfile(dpks_model_absolute_path)) + dpks_model_name = os.path.basename(jdata["dpks_model"]) + shutil.copy2( dpks_model_absolute_path, + os.path.join(work_dir, dpks_model_name)) os.chdir(work_dir) @@ -536,9 +577,13 @@ def make_abacus_relax (jdata, mdata) : os.chdir(ss) ln_src = os.path.relpath(os.path.join(work_dir,'INPUT')) kpt_src = os.path.relpath(os.path.join(work_dir,'KPT')) + if "dpks_model" in jdata: + ksmd_src = os.path.relpath(os.path.join(work_dir,dpks_model_name)) try: os.symlink(ln_src, 'INPUT') os.symlink(kpt_src, 'KPT') + if "dpks_model" in jdata: + os.symlink(ksmd_src, dpks_model_name) except FileExistsError: pass os.chdir(work_dir) @@ -624,6 +669,12 @@ def pert_scaled(jdata) : pert_atom = jdata['pert_atom'] pert_numb = jdata['pert_numb'] pp_file = [os.path.basename(a) for a in jdata['potcars']] + orb_file_names = None + dpks_descriptor_name = None + if 'orb_files' in jdata: + orb_file_names = [os.path.basename(a) for a in jdata['orb_files']] + if 'dpks_descriptor' in jdata: + dpks_descriptor_name = os.path.basename(jdata['dpks_descriptor']) from_poscar = False if 'from_poscar' in jdata : from_poscar = jdata['from_poscar'] @@ -671,7 +722,7 @@ def pert_scaled(jdata) : stru_in = get_abacus_STRU(pos_in) stru_out = shuffle_stru_data(stru_in) with open(pos_out, "w") as fp: - fp.write(make_abacus_scf_stru(stru_out, pp_file)) + fp.write(make_abacus_scf_stru(stru_out, pp_file, orb_file_names, dpks_descriptor_name)) else : shutil.copy2(pos_in, pos_out) os.remove(pos_in) @@ -693,7 +744,7 @@ def pert_scaled(jdata) : stru_in = get_abacus_STRU(pos_in) stru_out = shuffle_stru_data(stru_in) with open(pos_out, "w") as fp: - fp.write(make_abacus_scf_stru(stru_out, pp_file)) + fp.write(make_abacus_scf_stru(stru_out, pp_file, orb_file_names, dpks_descriptor_name)) else : shutil.copy2(pos_in, pos_out) os.chdir(cwd) @@ -790,6 +841,28 @@ def make_abacus_md(jdata, mdata) : if 'md_kpt' in jdata: shutil.copy2(jdata['md_kpt'], os.path.join(path_md, 'KPT')) + orb_file_names = None + orb_file_abspath = None + dpks_descriptor_name = None + dpks_descriptor_abspath = None + dpks_model_name = None + dpks_model_abspath = None + if 'orb_files' in jdata: + orb_file_names = [os.path.basename(a) for a in jdata['orb_files']] + orb_file_abspath = [os.path.abspath(a) for a in jdata['orb_files']] + for iorb, orb_file in enumerate(orb_file_names): + shutil.copy2(orb_file_abspath[iorb], + os.path.join(path_md, orb_file)) + if 'dpks_descriptor' in jdata: + dpks_descriptor_name = os.path.basename(jdata['dpks_descriptor']) + dpks_descriptor_abspath = os.path.abspath(jdata['dpks_descriptor']) + shutil.copy2(dpks_descriptor_abspath, + os.path.join(path_md, dpks_descriptor_name)) + if 'dpks_model' in jdata: + dpks_model_name = os.path.basename(jdata['dpks_model']) + dpks_model_abspath = os.path.abspath(jdata['dpks_model']) + shutil.copy2(dpks_model_abspath, + os.path.join(path_md, dpks_model_name)) for pp_file in jdata['potcars']: shutil.copy2(pp_file, os.path.join(path_md, os.path.basename(pp_file))) @@ -829,6 +902,13 @@ def make_abacus_md(jdata, mdata) : try: for pp_file in [os.path.basename(a) for a in jdata['potcars']]: os.symlink(os.path.relpath(os.path.join(path_md, pp_file)), pp_file) + if 'orb_files' in jdata: + for orb_file in orb_file_names: + os.symlink(os.path.relpath(os.path.join(path_md, orb_file)), orb_file) + if 'dpks_model' in jdata: + os.symlink(os.path.relpath(os.path.join(path_md, dpks_model_name)), dpks_model_name) + if 'dpks_descriptor' in jdata: + os.symlink(os.path.relpath(os.path.join(path_md, dpks_descriptor_name)), dpks_descriptor_name) except FileExistsError: pass @@ -1049,7 +1129,16 @@ def run_abacus_relax(jdata, mdata): #machine_type = mdata['fp_machine']['machine_type'] work_dir = os.path.join(jdata['out_dir'], global_dirname_02) pp_files = [os.path.basename(a) for a in jdata["potcars"]] - forward_files = ["STRU", "INPUT", "KPT"] + pp_files + orb_file_names = [] + dpks_descriptor_name = [] + dpks_model_name = [] + if 'orb_files' in jdata: + orb_file_names = [os.path.basename(a) for a in jdata['orb_files']] + if 'dpks_descriptor' in jdata: + dpks_descriptor_name = [os.path.basename(jdata['dpks_descriptor'])] + if 'dpks_model' in jdata: + dpks_model_name = [os.path.basename(jdata['dpks_model'])] + forward_files = ["STRU", "INPUT", "KPT"] + pp_files + orb_file_names + dpks_descriptor_name + dpks_model_name user_forward_files = mdata.get("fp" + "_user_forward_files", []) forward_files += [os.path.basename(file) for file in user_forward_files] backward_files = ["OUT.ABACUS"] @@ -1174,7 +1263,16 @@ def run_abacus_md(jdata, mdata): pert_numb = jdata['pert_numb'] md_nstep = jdata['md_nstep'] - forward_files = ["STRU", "INPUT", "KPT"] + orb_file_names = [] + dpks_descriptor_name = [] + dpks_model_name = [] + if 'orb_files' in jdata: + orb_file_names = [os.path.basename(a) for a in jdata['orb_files']] + if 'dpks_descriptor' in jdata: + dpks_descriptor_name = [os.path.basename(jdata['dpks_descriptor'])] + if 'dpks_model' in jdata: + dpks_model_name = [os.path.basename(jdata['dpks_model'])] + forward_files = ["STRU", "INPUT", "KPT"] + orb_file_names + dpks_descriptor_name + dpks_model_name for pp_file in [os.path.basename(a) for a in jdata['potcars']]: forward_files.append(pp_file) user_forward_files = mdata.get("fp" + "_user_forward_files", []) diff --git a/dpgen/data/tools/create_random_disturb.py b/dpgen/data/tools/create_random_disturb.py index 542a16096..67d507c64 100755 --- a/dpgen/data/tools/create_random_disturb.py +++ b/dpgen/data/tools/create_random_disturb.py @@ -220,7 +220,7 @@ def create_disturbs_abacus_dev(fin, nfile, dmax=1.0, etmax=0.1, ofmt="abacus", d # Writing it fout = fin + str(fid) + '.' + ofmt print("Creating %s ..." % fout) - ret = make_abacus_scf_stru(stru_d, stru_d['pp_files']) + ret = make_abacus_scf_stru(stru_d, stru_d['pp_files'], stru_d['orb_files'], stru_d['dpks_descriptor']) with open(fout, "w") as fp: fp.write(ret) if write_d: diff --git a/dpgen/generator/lib/abacus_scf.py b/dpgen/generator/lib/abacus_scf.py index fde813487..256eb1d9d 100644 --- a/dpgen/generator/lib/abacus_scf.py +++ b/dpgen/generator/lib/abacus_scf.py @@ -20,70 +20,74 @@ def make_abacus_scf_input(fp_params): # Make INPUT file for abacus pw scf calculation. ret = "INPUT_PARAMETERS\n" ret += "calculation scf\n" - assert(fp_params['ntype'] >= 0 and type(fp_params["ntype"]) == int), "'ntype' should be a positive integer." - ret += "ntype %d\n" % fp_params['ntype'] - #ret += "pseudo_dir ./\n" - if "ecutwfc" in fp_params: - assert(fp_params["ecutwfc"] >= 0) , "'ntype' should be non-negative." - ret += "ecutwfc %f\n" % fp_params["ecutwfc"] - if "dr2" in fp_params: - ret += "dr2 %e\n" % fp_params["dr2"] - if "niter" in fp_params: - assert(fp_params['niter'] >= 0 and type(fp_params["niter"])== int), "'niter' should be a positive integer." - ret += "niter %d\n" % fp_params["niter"] - if "basis_type" in fp_params: - assert(fp_params["basis_type"] in ["pw", "lcao", "lcao_in_pw"]) , "'basis_type' must in 'pw', 'lcao' or 'lcao_in_pw'." - ret+= "basis_type %s\n" % fp_params["basis_type"] - if "dft_functional" in fp_params: - ret += "dft_functional %s\n" % fp_params["dft_functional"] - if "gamma_only" in fp_params: - assert(fp_params["gamma_only"] ==1 ) , "'gamma_only' should be 1. Multi-k algorithm will be supported after the KPT generator is completed." - ret+= "gamma_only %d\n" % fp_params["gamma_only"] - if "mixing_type" in fp_params: - assert(fp_params["mixing_type"] in ["plain", "kerker", "pulay", "pulay-kerker", "broyden"]) - ret += "mixing_type %s\n" % fp_params["mixing_type"] - if "mixing_beta" in fp_params: - assert(fp_params["mixing_beta"] >= 0 and fp_params["mixing_beta"] < 1), "'mixing_beta' should between 0 and 1." - ret += "mixing_beta %f\n" % fp_params["mixing_beta"] - if "symmetry" in fp_params: - assert(fp_params["symmetry"] == 0 or fp_params["symmetry"] == 1), "'symmetry' should be either 0 or 1." - ret += "symmetry %d\n" % fp_params["symmetry"] - if "nbands" in fp_params: - assert(fp_params["nbands"] > 0 and type(fp_params["nbands"]) == int), "'nbands' should be a positive integer." - ret += "nbands %d\n" % fp_params["nbands"] - if "nspin" in fp_params: - assert(fp_params["nspin"] == 1 or fp_params["nspin"] == 2 or fp_params["nspin"] == 4), "'nspin' can anly take 1, 2 or 4" - ret += "nspin %d\n" % fp_params["nspin"] - if "ks_solver" in fp_params: - assert(fp_params["ks_solver"] in ["cg", "dav", "lapack", "genelpa", "hpseps", "scalapack_gvx"]), "'ks_sover' should in 'cgx', 'dav', 'lapack', 'genelpa', 'hpseps', 'scalapack_gvx'." - ret += "ks_solver %s\n" % fp_params["ks_solver"] - if "smearing" in fp_params: - assert(fp_params["smearing"] in ["gaussian", "fd", "fixed", "mp", "mp2", "mv"]), "'smearing' should in 'gaussian', 'fd', 'fixed', 'mp', 'mp2', 'mv'. " - ret += "smearing %s\n" % fp_params["smearing"] - if "sigma" in fp_params: - assert(fp_params["sigma"] >= 0), "'sigma' should be non-negative." - ret += "sigma %f\n" % fp_params["sigma"] - if "force" in fp_params: - assert(fp_params["force"] == 0 or fp_params["force"] == 1), "'force' should be either 0 or 1." - ret += "force %d\n" % fp_params["force"] - if "stress" in fp_params: - assert(fp_params["stress"] == 0 or fp_params["stress"] == 1), "'stress' should be either 0 or 1." - ret += "stress %d\n" % fp_params["stress"] - #paras for deepks - if "out_descriptor" in fp_params: - assert(fp_params["out_descriptor"] == 0 or fp_params["out_descriptor"] == 1), "'out_descriptor' should be either 0 or 1." - ret += "out_descriptor %d\n" % fp_params["out_descriptor"] - if "lmax_descriptor" in fp_params: - assert(fp_params["lmax_descriptor"] >= 0), "'lmax_descriptor' should be a positive integer." - ret += "lmax_descriptor %d\n" % fp_params["lmax_descriptor"] - if "deepks_scf" in fp_params: - assert(fp_params["deepks_scf"] == 0 or fp_params["deepks_scf"] == 1), "'deepks_scf' should be either 0 or 1." - ret += "deepks_scf %d\n" % fp_params["deepks_scf"] - if "model_file" in fp_params: - ret += "model_file %s\n" % fp_params["model_file"] + for key in fp_params: + if key == 'ntype': + assert(fp_params['ntype'] >= 0 and type(fp_params["ntype"]) == int), "'ntype' should be a positive integer." + ret += "ntype %d\n" % fp_params['ntype'] + #ret += "pseudo_dir ./\n" + elif key == "ecutwfc": + assert(fp_params["ecutwfc"] >= 0) , "'ntype' should be non-negative." + ret += "ecutwfc %f\n" % fp_params["ecutwfc"] + elif key == "dr2": + ret += "dr2 %e\n" % fp_params["dr2"] + elif key == "niter": + assert(fp_params['niter'] >= 0 and type(fp_params["niter"])== int), "'niter' should be a positive integer." + ret += "niter %d\n" % fp_params["niter"] + elif key == "basis_type": + assert(fp_params["basis_type"] in ["pw", "lcao", "lcao_in_pw"]) , "'basis_type' must in 'pw', 'lcao' or 'lcao_in_pw'." + ret+= "basis_type %s\n" % fp_params["basis_type"] + elif key == "dft_functional": + ret += "dft_functional %s\n" % fp_params["dft_functional"] + elif key == "gamma_only": + #assert(fp_params["gamma_only"] ==1 ) , "'gamma_only' should be 1. Multi-k algorithm will be supported after the KPT generator is completed." + ret+= "gamma_only %d\n" % fp_params["gamma_only"] + elif key == "mixing_type": + assert(fp_params["mixing_type"] in ["plain", "kerker", "pulay", "pulay-kerker", "broyden"]) + ret += "mixing_type %s\n" % fp_params["mixing_type"] + elif key == "mixing_beta": + assert(fp_params["mixing_beta"] >= 0 and fp_params["mixing_beta"] < 1), "'mixing_beta' should between 0 and 1." + ret += "mixing_beta %f\n" % fp_params["mixing_beta"] + elif key == "symmetry": + assert(fp_params["symmetry"] == 0 or fp_params["symmetry"] == 1), "'symmetry' should be either 0 or 1." + ret += "symmetry %d\n" % fp_params["symmetry"] + elif key == "nbands": + assert(fp_params["nbands"] > 0 and type(fp_params["nbands"]) == int), "'nbands' should be a positive integer." + ret += "nbands %d\n" % fp_params["nbands"] + elif key == "nspin": + assert(fp_params["nspin"] == 1 or fp_params["nspin"] == 2 or fp_params["nspin"] == 4), "'nspin' can anly take 1, 2 or 4" + ret += "nspin %d\n" % fp_params["nspin"] + elif key == "ks_solver": + assert(fp_params["ks_solver"] in ["cg", "dav", "lapack", "genelpa", "hpseps", "scalapack_gvx"]), "'ks_sover' should in 'cgx', 'dav', 'lapack', 'genelpa', 'hpseps', 'scalapack_gvx'." + ret += "ks_solver %s\n" % fp_params["ks_solver"] + elif key == "smearing": + assert(fp_params["smearing"] in ["gaussian", "fd", "fixed", "mp", "mp2", "mv"]), "'smearing' should in 'gaussian', 'fd', 'fixed', 'mp', 'mp2', 'mv'. " + ret += "smearing %s\n" % fp_params["smearing"] + elif key == "sigma": + assert(fp_params["sigma"] >= 0), "'sigma' should be non-negative." + ret += "sigma %f\n" % fp_params["sigma"] + elif key == "force": + assert(fp_params["force"] == 0 or fp_params["force"] == 1), "'force' should be either 0 or 1." + ret += "force %d\n" % fp_params["force"] + elif key == "stress": + assert(fp_params["stress"] == 0 or fp_params["stress"] == 1), "'stress' should be either 0 or 1." + ret += "stress %d\n" % fp_params["stress"] + #paras for deepks + elif key == "deepks_out_labels": + assert(fp_params["deepks_out_labels"] == 0 or fp_params["deepks_out_labels"] == 1), "'deepks_out_labels' should be either 0 or 1." + ret += "deepks_out_labels %d\n" % fp_params["deepks_out_labels"] + elif key == "deepks_descriptor_lmax": + assert(fp_params["deepks_descriptor_lmax"] >= 0), "'deepks_descriptor_lmax' should be a positive integer." + ret += "deepks_descriptor_lmax %d\n" % fp_params["deepks_descriptor_lmax"] + elif key == "deepks_scf": + assert(fp_params["deepks_scf"] == 0 or fp_params["deepks_scf"] == 1), "'deepks_scf' should be either 0 or 1." + ret += "deepks_scf %d\n" % fp_params["deepks_scf"] + elif key == "deepks_model": + ret += "deepks_model %s\n" % fp_params["deepks_model"] + else: + ret += "%s %s\n" % (key, str(fp_params[key])) return ret -def make_abacus_scf_stru(sys_data, fp_pp_files, fp_params = None): +def make_abacus_scf_stru(sys_data, fp_pp_files, fp_orb_files = None, fp_dpks_descriptor = None, fp_params = None): atom_names = sys_data['atom_names'] atom_numbs = sys_data['atom_numbs'] assert(len(atom_names) == len(fp_pp_files)), "the number of pp_files must be equal to the number of atom types. " @@ -127,15 +131,15 @@ def make_abacus_scf_stru(sys_data, fp_pp_files, fp_params = None): natom_tot += 1 assert(natom_tot == sum(atom_numbs)) - if fp_params is not None and "basis_type" in fp_params and fp_params["basis_type"]=="lcao": + if fp_orb_files is not None: ret +="\nNUMERICAL_ORBITAL\n" - assert(len(fp_params["orb_files"])==len(atom_names)) + assert(len(fp_orb_files)==len(atom_names)) for iatom in range(len(atom_names)): - ret += fp_params["orb_files"][iatom] +"\n" + ret += fp_orb_files[iatom] +"\n" - if fp_params is not None and "deepks_scf" in fp_params and fp_params["out_descriptor"]==1: + if fp_dpks_descriptor is not None: ret +="\nNUMERICAL_DESCRIPTOR\n" - ret +=fp_params["proj_file"][0]+"\n" + ret +="%s\n"%fp_dpks_descriptor return ret @@ -199,13 +203,29 @@ def get_natoms_from_stru(geometry_inlines): atom_numbs.append(int(geometry_inlines[iline+2].split()[0])) iline += 3+atom_numbs[-1] return atom_names, atom_numbs + +def get_additional_from_STRU(geometry_inlines, nele): + dpks_descriptor_kw = "NUMERICAL_DESCRIPTOR" + orb_file_kw = "NUMERICAL_ORBITAL" + dpks_descriptor = None + orb_file = None + for iline in range(len(geometry_inlines)): + if len(geometry_inlines[iline]) > 0: + if orb_file_kw == geometry_inlines[iline].split()[0]: + orb_file = [] + for iele in range(nele): + orb_file.append(geometry_inlines[iline + iele + 1].rstrip()) + if dpks_descriptor_kw == geometry_inlines[iline].split()[0]: + dpks_descriptor = geometry_inlines[iline + 1].rstrip() + return orb_file, dpks_descriptor + def get_abacus_STRU(STRU, INPUT = None, n_ele = None): # read in geometry from STRU file. n_ele is the number of elements. # Either n_ele or INPUT should be provided. with open(STRU, 'r') as fp: geometry_inlines = fp.read().split('\n') for iline, line in enumerate(geometry_inlines): - if line.split() == []: + if line.split() == [] or len(line) == 0: del geometry_inlines[iline] geometry_inlines.append("") celldm, cell = get_cell(geometry_inlines) @@ -223,6 +243,7 @@ def get_abacus_STRU(STRU, INPUT = None, n_ele = None): inlines = ["ntype %d" %len(atom_numbs)] atom_names, natoms, types, coords = get_coords(celldm, cell, geometry_inlines, inlines) masses, pp_files = get_mass_from_STRU(geometry_inlines, inlines, atom_names) + orb_files, dpks_descriptor = get_additional_from_STRU(geometry_inlines, len(masses)) data = {} data['atom_names'] = atom_names data['atom_numbs'] = natoms @@ -231,6 +252,8 @@ def get_abacus_STRU(STRU, INPUT = None, n_ele = None): data['coords'] = coords data['atom_masses'] = masses # Notice that this key is not defined in dpdata system. data['pp_files'] = pp_files + data['orb_files'] = orb_files + data['dpks_descriptor'] = dpks_descriptor return data def make_supercell_abacus(from_struct, super_cell): diff --git a/dpgen/generator/run.py b/dpgen/generator/run.py index d43b019a7..dc7a91d3b 100644 --- a/dpgen/generator/run.py +++ b/dpgen/generator/run.py @@ -2190,6 +2190,44 @@ def sys_link_fp_vasp_pp (iter_index, os.symlink(os.path.join('..', 'POTCAR.%s' % ii), 'POTCAR') os.chdir(cwd) +def _link_fp_abacus_orb_descript (iter_index, + jdata) : + # assume lcao orbital files, numerical descrptors and model for dpks are all in fp_pp_path. + fp_pp_path = jdata['fp_pp_path'] + + fp_orb_files = jdata['fp_orb_files'] + assert(os.path.exists(fp_pp_path)) + fp_dpks_descriptor = None + fp_dpks_model = None + if "fp_dpks_descriptor" in jdata: + fp_dpks_descriptor = jdata["fp_dpks_descriptor"] + if "user_fp_params" in jdata: + if "deepks_model" in jdata["user_fp_params"]: + fp_dpks_model = jdata["user_fp_params"]["deepks_model"] + + fp_pp_path = os.path.abspath(fp_pp_path) + + iter_name = make_iter_name(iter_index) + work_path = os.path.join(iter_name, fp_name) + + fp_tasks = glob.glob(os.path.join(work_path, 'task.*')) + fp_tasks.sort() + if len(fp_tasks) == 0 : + return + cwd = os.getcwd() + for ii in fp_tasks: + os.chdir(ii) + for jj in fp_orb_files: + orb_file = os.path.join(fp_pp_path, jj) + os.symlink(orb_file, jj) + if fp_dpks_descriptor is not None: + descrptor = os.path.join(fp_pp_path, fp_dpks_descriptor) + os.symlink(descrptor, fp_dpks_descriptor) + if fp_dpks_model is not None: + dpks_model = os.path.join(fp_pp_path, fp_dpks_model) + os.symlink(dpks_model, fp_dpks_model) + os.chdir(cwd) + def _make_fp_vasp_configs(iter_index, jdata): fp_task_max = jdata['fp_task_max'] @@ -2288,8 +2326,20 @@ def make_fp_abacus_scf(iter_index, iter_name = make_iter_name(iter_index) work_path = os.path.join(iter_name, fp_name) fp_pp_files = jdata['fp_pp_files'] + fp_orb_files = None + fp_dpks_descriptor = None + assert('user_fp_params' in jdata.keys()) if 'user_fp_params' in jdata.keys() : fp_params = jdata['user_fp_params'] + # for lcao + if 'basis_type' in fp_params: + if fp_params['basis_type'] == 'lcao': + assert('fp_orb_files' in jdata and type(jdata['fp_orb_files']) == list and len(jdata['fp_orb_files']) == len(fp_pp_files)) + fp_orb_files = jdata['fp_orb_files'] + if 'deepks_out_labels' in fp_params: + if fp_params['deepks_out_labels'] == 1: + assert('fp_dpks_descriptor' in jdata and type(jdata['fp_dpks_descriptor']) == str) + fp_dpks_descriptor = jdata['fp_dpks_descriptor'] #user_input = True else: raise RuntimeError("Key 'user_fp_params' and its value have to be specified in parameter json file.") @@ -2305,13 +2355,16 @@ def make_fp_abacus_scf(iter_index, ret_kpt = make_abacus_scf_kpt(fp_params) with open("KPT", "w") as fp: fp.write(ret_kpt) - ret_stru = make_abacus_scf_stru(sys_data, fp_pp_files, fp_params) + ret_stru = make_abacus_scf_stru(sys_data, fp_pp_files, fp_orb_files, fp_dpks_descriptor, fp_params) with open("STRU", "w") as fp: fp.write(ret_stru) os.chdir(cwd) # link pp files _link_fp_vasp_pp(iter_index, jdata) + if 'basis_type' in fp_params: + if fp_params['basis_type'] == 'lcao': + _link_fp_abacus_orb_descript(iter_index, jdata) def make_fp_siesta(iter_index, @@ -2621,6 +2674,13 @@ def run_fp (iter_index, run_fp_inner(iter_index, jdata, mdata, forward_files, backward_files, _qe_check_fin, log_file = 'output') elif fp_style == "abacus/scf": forward_files = ["INPUT", "STRU", "KPT"] + fp_pp_files + if "fp_orb_files" in jdata: + forward_files += jdata["fp_orb_files"] + if "fp_dpks_descriptor" in jdata: + forward_files.append(jdata["fp_dpks_descriptor"]) + if "user_fp_params" in jdata: + if "deepks_model" in jdata["user_fp_params"]: + forward_files.append(jdata["user_fp_params"]["deepks_model"]) backward_files = ["output", "OUT.ABACUS"] run_fp_inner(iter_index, jdata, mdata, forward_files, backward_files, _abacus_scf_check_fin, log_file = 'output') elif fp_style == "siesta": diff --git a/examples/init/abacus/CuW.json b/examples/init/abacus/CuW.json index bfa0b8dba..9abd406ce 100644 --- a/examples/init/abacus/CuW.json +++ b/examples/init/abacus/CuW.json @@ -16,10 +16,16 @@ "Cu_ONCV_PBE-1.0.upf", "W_ONCV_PBE-1.0.upf" ], + "orb_files":[ + "Cu_gga_9au_60Ry_4s2p2d1f.orb", + "W_gga_10au_60Ry_4s2p2d2f.orb" + ], "relax_incar": "INPUT", "relax_kpt": "KPT", "md_kpt": "KPT", "md_incar": "INPUT.md", + "dpks_descriptor": "jle.orb", + "dpks_model": "model.ptg", "scale": [ 0.99 ], diff --git a/examples/init/abacus/INPUT b/examples/init/abacus/INPUT index e6fce1bcf..5087da7c5 100644 --- a/examples/init/abacus/INPUT +++ b/examples/init/abacus/INPUT @@ -1,19 +1,16 @@ INPUT_PARAMETERS calculation relax -atom_file STRU -kpoint_file KPT pseudo_dir ./ ntype 2 symmetry 1 ecutwfc 90 -npool 4 -charge_extrap second-order mixing_type pulay mixing_beta 0.4 -dr2 1e-6 -nstep 3 + force_thr_ev 0.02 -move_method cg -out_stru 0 +relax_method cg + +basis_type lcao +deepks_model model.ptg diff --git a/examples/init/abacus/INPUT.md b/examples/init/abacus/INPUT.md index f9d59da2b..33533afe3 100644 --- a/examples/init/abacus/INPUT.md +++ b/examples/init/abacus/INPUT.md @@ -1,19 +1,17 @@ INPUT_PARAMETERS calculation md -atom_file STRU -kpoint_file KPT pseudo_dir ./ ntype 2 symmetry 1 ecutwfc 90 - -npool 4 -charge_extrap second-order +scf_thr 1e-2 mixing_type pulay mixing_beta 0.4 -dr2 1e-6 -nstep 1 -force_thr_ev 0.02 -move_method cg -out_stru 0 +basis_type lcao +md_nstep 3 +cal_stress 1 +deepks_model model.ptg + +md_tfirst 10 +md_tfreq 0.1 diff --git a/examples/run/dp1.x-lammps-ABACUS-lcao-dpks/methane/machine.json b/examples/run/dp1.x-lammps-ABACUS-lcao-dpks/methane/machine.json new file mode 100644 index 000000000..ee4d2f305 --- /dev/null +++ b/examples/run/dp1.x-lammps-ABACUS-lcao-dpks/methane/machine.json @@ -0,0 +1,75 @@ +{ + "api_version": "1.0", + "train": [ + { + "command": "dp", + "machine": { + "batch_type": "PBS", + "context_type": "SSHContext", + "local_root": "./", + "remote_root": "/home/user1234/work_path_dpdispatcher_test", + "remote_profile": { + "hostname": "39.xxx.xx.xx", + "username": "user1234" + } + }, + "resources": { + "number_node": 1, + "cpu_per_node": 4, + "gpu_per_node": 1, + "queue_name": "T4_4_15", + "group_size": 1, + "custom_flags":["#SBATCH --mem=32G"], + "strategy": {"if_cuda_multi_devices": true}, + "para_deg": 3, + "source_list": ["/home/user1234/deepmd.1.2.4.env"] + } + } + ], + "model_devi":[ + { + "command": "lmp", + "machine":{ + "batch_type": "PBS", + "context_type": "SSHContext", + "local_root": "./", + "remote_root": "/home/user1234/work_path_dpdispatcher_test", + "remote_profile": { + "hostname": "39.xxx.xx.xx", + "username": "user1234" + } + }, + "resources": { + "number_node": 1, + "cpu_per_node": 4, + "gpu_per_node": 1, + "queue_name": "T4_4_15", + "group_size": 5, + "source_list": ["/home/user1234/deepmd.1.2.4.env"] + } + } + ], + "fp":[ + { + "command": "ABACUS.mpi", + "machine":{ + "batch_type": "PBS", + "context_type": "SSHContext", + "local_root": "./", + "remote_root": "/home/user1234/work_path_dpdispatcher_test", + "remote_profile": { + "hostname": "39.xxx.xx.xx", + "username": "user1234" + } + }, + "resources": { + "number_node": 1, + "cpu_per_node": 32, + "gpu_per_node": 0, + "queue_name": "G_32_128", + "group_size": 1, + "source_list": ["~/abacus.env"] + } + } + ] + } \ No newline at end of file diff --git a/examples/run/dp1.x-lammps-ABACUS-lcao-dpks/methane/param.json b/examples/run/dp1.x-lammps-ABACUS-lcao-dpks/methane/param.json new file mode 100644 index 000000000..a578b4a64 --- /dev/null +++ b/examples/run/dp1.x-lammps-ABACUS-lcao-dpks/methane/param.json @@ -0,0 +1,152 @@ +{ + "type_map": ["H", "C"], + "mass_map": [1.0, 12.0], + + "_comment": "initial data set for Training and the number of frames in each training batch", + "init_data_prefix": "/home/mhchen_pkuhpc/mhchen_cls/lustre2/5_liurenxi/5_ABACUS_dpgen_interface/5_dpgen_examples/dpgen-example/run_abacus/", + "init_data_sys": [ + "abacus_init_data" + ], + "init_batch_size": [ + 8 + ], + + "_comment": "configurations for starting MD in Exploration and batch sizes when traning snapshots derived from these configs (if they were selected)", + "sys_configs_prefix": "/home/mhchen_pkuhpc/mhchen_cls/lustre2/5_liurenxi/5_ABACUS_dpgen_interface/5_dpgen_examples/dpgen-example/run", + "sys_configs": [ + [ + "CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale-1.000/000000/POSCAR", + "CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale-1.000/000001/POSCAR", + "CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale-1.000/00000[2-9]/POSCAR" + ], + [ + "CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale-1.000/00001*/POSCAR" + ] + ], + "sys_batch_size": [ + 8, + 8 + ], + + "_comment": " 00.train ", + "numb_models": 4, + + "default_training_param": { + "model": { + "type_map": ["H","C"], + "descriptor": { + "type": "se_a", + "sel": [16,4], + "rcut_smth": 0.5, + "rcut": 5.0, + "neuron": [10,20,40], + "resnet_dt": false, + "axis_neuron": 12, + "seed": 0 + }, + "fitting_net": { + "neuron": [120,120,120], + "resnet_dt": true, + "coord_norm": true, + "type_fitting_net": false, + "seed": 0 + } + }, + "loss": { + "start_pref_e": 0.02, + "limit_pref_e": 2, + "start_pref_f": 1000, + "limit_pref_f": 1, + "start_pref_v": 0, + "limit_pref_v": 0 + }, + "learning_rate": { + "type": "exp", + "start_lr": 0.001, + "decay_steps": 180, + "decay_rate": 0.95 + }, + "training": { + "set_prefix": "set", + "numb_steps": 2000, + "batch_size": 1, + "disp_file": "lcurve.out", + "disp_freq": 1000, + "numb_test": 4, + "save_freq": 1000, + "save_ckpt": "model.ckpt", + "disp_training": true, + "time_training": true, + "profiling": false, + "profiling_file": "timeline.json", + "_comment": "that's all" + } + }, + + "_comment": " 01.model_devi ", + "model_devi_dt": 0.002, + "model_devi_skip": 0, + "model_devi_f_trust_lo": 0.05, + "model_devi_f_trust_hi": 0.15, + "model_devi_e_trust_lo": 1e-3, + "model_devi_e_trust_hi": 1e-1, + "model_devi_clean_traj": false, + "model_devi_jobs": [ + { + "sys_idx": [ + 0 + ], + "temps": [ + 100 + ], + "press": [ + 1 + ], + "trj_freq": 10, + "nsteps": 3000, + "ensemble": "nvt", + "_idx": "00" + }, + { + "sys_idx": [ + 1 + ], + "temps": [ + 150 + ], + "press": [ + 1 + ], + "trj_freq": 10, + "nsteps": 9000, + "ensemble": "nvt", + "_idx": "01" + } + ], + + "_comment": " 02.fp ", + "fp_style": "abacus/scf", + "shuffle_poscar": false, + "fp_task_max": 50, + "fp_task_min": 8, + "fp_pp_path": "./", + "fp_pp_files": [ "H_ONCV_PBE-1.0.upf","C_ONCV_PBE-1.0.upf"], + "fp_orb_files": ["H_gga_8au_60Ry_2s1p.orb", "C_gga_8au_60Ry_2s2p1d.orb"], + "fp_dpks_descriptor": "jle.orb", + "user_fp_params":{ + "ntype": 2, + "cal_force": 1, + "cal_stress": 1, + "deepks_model": "model.ptg", + "deepks_out_labels": 1, + "basis_type": "lcao", + "gamma_only": 1, + "ecutwfc": 80, + "mixing_type": "pulay", + "mixing_beta": 0.4, + "symmetry": 1, + "nbands": 5, + "nspin": 1, + "smearing_method": "fixed" + } +} diff --git a/examples/run/dp1.x-lammps-ABACUS-pw/methane/machine.json b/examples/run/dp1.x-lammps-ABACUS-pw/methane/machine.json index 292d05e3b..ee4d2f305 100644 --- a/examples/run/dp1.x-lammps-ABACUS-pw/methane/machine.json +++ b/examples/run/dp1.x-lammps-ABACUS-pw/methane/machine.json @@ -1,88 +1,75 @@ { - "train":[ - { - "machine":{ - "machine_type": "slurm", - "host_name": "localhost", - "port": 22, - "username": "", - "work_path": "/home/mhchen_pkuhpc/mhchen_cls/lustre2/5_liurenxi/5_ABACUS_dpgen_interface/5_dpgen_examples/dpgen-example/run_abacus" + "api_version": "1.0", + "train": [ + { + "command": "dp", + "machine": { + "batch_type": "PBS", + "context_type": "SSHContext", + "local_root": "./", + "remote_root": "/home/user1234/work_path_dpdispatcher_test", + "remote_profile": { + "hostname": "39.xxx.xx.xx", + "username": "user1234" + } }, - - "resources":{ - "numb_node": 1, - "numb_gpu": 1, - "task_per_node": 1, - "partition": "", - "exclude_list": [], - "mem_limit": 0, - "source_list": ["/home/mhchen_pkuhpc/mhchen_cls/lustre2/5_liurenxi/5_ABACUS_dpgen_interface/env.sh"], - "module_list": [], - "time_limit": "23:0:0", - "account":"", - "qos": "" - }, - "python_path": "/home/mhchen_pkuhpc/mhchen_cls/lustre2/5_liurenxi/5_dpgen_interface/4_deepmd-kit/dpmd_install/bin/python" - } + "resources": { + "number_node": 1, + "cpu_per_node": 4, + "gpu_per_node": 1, + "queue_name": "T4_4_15", + "group_size": 1, + "custom_flags":["#SBATCH --mem=32G"], + "strategy": {"if_cuda_multi_devices": true}, + "para_deg": 3, + "source_list": ["/home/user1234/deepmd.1.2.4.env"] + } + } ], -"model_devi": [ - { - "machine": { - "machine_type": "slurm", - "hostname": "localhost", - "port": 22, - "username": "", - "work_path": "/home/mhchen_pkuhpc/mhchen_cls/lustre2/5_liurenxi/5_ABACUS_dpgen_interface/5_dpgen_examples/dpgen-example/run_abacus" - }, - "resources": { - "num_node": 1, - "num_gpu": 0, - "task_per_node": 2, - "partition": "cn-large", - "exclude_list": [], - "mem_limit": 0, - "source_list": ["/home/mhchen_pkuhpc/mhchen_cls/lustre2/5_liurenxi/5_ABACUS_dpgen_interface/env.sh"], - "module_list": [], - "time_limit": "14:00:00", - "account": "", - "qos": "", - "allow_failure":true - }, - "command": "mpirun -n 2 lmp", - "group_size": 6 - } -], -"fp": [ - { + "model_devi":[ + { + "command": "lmp", "machine":{ - "machine_type": "slurm", - "hostname": "localhost", - "port": 22, - "username": "", - "work_path": "/home/mhchen_pkuhpc/mhchen_cls/lustre2/5_liurenxi/5_ABACUS_dpgen_interface/5_dpgen_examples/dpgen-example/run_abacus" + "batch_type": "PBS", + "context_type": "SSHContext", + "local_root": "./", + "remote_root": "/home/user1234/work_path_dpdispatcher_test", + "remote_profile": { + "hostname": "39.xxx.xx.xx", + "username": "user1234" + } }, "resources": { - "cvasp": false, - "numb_node": 1, - "partition": "cn-large", - "task_per_node": 4, - - "numb_gpu": 0, - "exclude_list": [], - "with_mpi": false, - "mem_limit": 0, - "source_list":[ - "/home/mhchen_pkuhpc/mhchen_cls/lustre2/5_liurenxi/5_ABACUS_dpgen_interface/env.sh" - ], - "module_list":[], - "time_limit": "48:0:0", - "account": "", - "qos": "", - "_comment": "that's all" + "number_node": 1, + "cpu_per_node": 4, + "gpu_per_node": 1, + "queue_name": "T4_4_15", + "group_size": 5, + "source_list": ["/home/user1234/deepmd.1.2.4.env"] + } + } + ], + "fp":[ + { + "command": "ABACUS.mpi", + "machine":{ + "batch_type": "PBS", + "context_type": "SSHContext", + "local_root": "./", + "remote_root": "/home/user1234/work_path_dpdispatcher_test", + "remote_profile": { + "hostname": "39.xxx.xx.xx", + "username": "user1234" + } }, - "command": "mpirun -np 4 ABACUS.mpi.2.1.0", - "group_size": 150 - } - -] -} + "resources": { + "number_node": 1, + "cpu_per_node": 32, + "gpu_per_node": 0, + "queue_name": "G_32_128", + "group_size": 1, + "source_list": ["~/abacus.env"] + } + } + ] + } \ No newline at end of file diff --git a/examples/run/dp1.x-lammps-ABACUS-pw/methane/param.json b/examples/run/dp1.x-lammps-ABACUS-pw/methane/param.json index 916a0c9fb..a5e684d3d 100644 --- a/examples/run/dp1.x-lammps-ABACUS-pw/methane/param.json +++ b/examples/run/dp1.x-lammps-ABACUS-pw/methane/param.json @@ -67,22 +67,19 @@ "decay_rate": 0.95 }, "training": { - "systems": [], - "set_prefix": "set", - "stop_batch": 36000, - "batch_size": 1, - "seed": 1, - "_comment": "frequencies counted in batch", - "disp_file": "lcurve.out", - "disp_freq": 1000, - "numb_test": 4, - "save_freq": 1000, - "save_ckpt": "model.ckpt", - "load_ckpt": "model.ckpt", - "disp_training": true, - "time_training": true, - "profiling": false, - "profiling_file": "timeline.json" + "set_prefix": "set", + "numb_steps": 2000, + "batch_size": 1, + "disp_file": "lcurve.out", + "disp_freq": 1000, + "numb_test": 4, + "save_freq": 1000, + "save_ckpt": "model.ckpt", + "disp_training": true, + "time_training": true, + "profiling": false, + "profiling_file": "timeline.json", + "_comment": "that's all" } }, diff --git a/requirements.txt b/requirements.txt index ab3889a32..2e4600c67 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ monty==2.0.4 ase==3.17.0 paramiko==2.6.0 custodian==2019.2.10 +dpdata==0.2.6 diff --git a/setup.py b/setup.py index e051389bf..3a86a8bd7 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ with open(path.join('dpgen', '_date.py'), 'w') as fp : fp.write('date = \'%s\'' % today) -install_requires=['numpy>=1.14.3', 'dpdata>=0.2.4', 'pymatgen>=2019.1.13', 'ase', 'monty>2.0.0', 'paramiko', 'custodian','GromacsWrapper>=0.8.0', 'dpdispatcher>=0.3.11'] +install_requires=['numpy>=1.14.3', 'dpdata>=0.2.6', 'pymatgen>=2019.1.13', 'ase', 'monty>2.0.0', 'paramiko', 'custodian','GromacsWrapper>=0.8.0', 'dpdispatcher>=0.3.11'] setuptools.setup( name=NAME, diff --git a/tests/data/abacus.out/box.raw b/tests/data/abacus.out/box.raw index 113faa567..39b35371c 100644 --- a/tests/data/abacus.out/box.raw +++ b/tests/data/abacus.out/box.raw @@ -1,9 +1,8 @@ -9.500003794601733276e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794601733276e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794601733276e+00 -9.500003794601733276e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794601733276e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794601733276e+00 -9.500003794601733276e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794601733276e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794601733276e+00 -9.706914375293798969e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.813826031966266683e-01 9.684068716817010980e+00 0.000000000000000000e+00 1.582462665518686029e-01 -1.638176684236652414e-01 9.582973862484221783e+00 -9.706914375293798969e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.813826031966266683e-01 9.684068716817010980e+00 0.000000000000000000e+00 1.582462665518686029e-01 -1.638176684236652414e-01 9.582973862484221783e+00 -9.706914375293798969e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.813826031966266683e-01 9.684068716817010980e+00 0.000000000000000000e+00 1.582462665518686029e-01 -1.638176684236652414e-01 9.582973862484221783e+00 -9.270692588887365915e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.282384570089394570e-02 9.562095206948105997e+00 0.000000000000000000e+00 1.695607748098341694e-01 -3.003052827686297777e-02 9.586097959903160159e+00 -9.270692588887365915e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.282384570089394570e-02 9.562095206948105997e+00 0.000000000000000000e+00 1.695607748098341694e-01 -3.003052827686297777e-02 9.586097959903160159e+00 -9.270692588887365915e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.282384570089394570e-02 9.562095206948105997e+00 0.000000000000000000e+00 1.695607748098341694e-01 -3.003052827686297777e-02 9.586097959903160159e+00 +9.500003794602772444e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794602772444e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794602772444e+00 +9.500003794602772444e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794602772444e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794602772444e+00 +9.500003794602772444e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794602772444e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794602772444e+00 +9.500003794602772444e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794602772444e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.500003794602772444e+00 +9.679120507628656611e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.483195033755180525e-02 9.384493548173903577e+00 0.000000000000000000e+00 2.108941915338771733e-01 -3.198873651008774660e-02 9.460865082843536555e+00 +9.679120507628656611e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.483195033755180525e-02 9.384493548173903577e+00 0.000000000000000000e+00 2.108941915338771733e-01 -3.198873651008774660e-02 9.460865082843536555e+00 +9.679120507628656611e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.483195033755180525e-02 9.384493548173903577e+00 0.000000000000000000e+00 2.108941915338771733e-01 -3.198873651008774660e-02 9.460865082843536555e+00 +9.679120507628656611e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.483195033755180525e-02 9.384493548173903577e+00 0.000000000000000000e+00 2.108941915338771733e-01 -3.198873651008774660e-02 9.460865082843536555e+00 diff --git a/tests/data/abacus.out/coord.raw b/tests/data/abacus.out/coord.raw index e7cdddd7b..75fa25209 100644 --- a/tests/data/abacus.out/coord.raw +++ b/tests/data/abacus.out/coord.raw @@ -1,9 +1,8 @@ -5.097445536080835282e+00 3.891296554306815647e+00 3.462257382935012284e+00 3.796296516360798901e+00 4.557085320243889015e+00 4.168354664972580892e+00 5.223520086438995236e+00 5.328267128278273645e+00 4.206763180314156081e+00 5.007081499986584028e+00 3.977917588905994339e+00 5.081172029580683258e+00 4.779784409196943251e+00 4.440311273600644704e+00 4.230028689607135739e+00 -5.103858038642191453e+00 3.880191049870926445e+00 3.446696376719454946e+00 3.775406008016469528e+00 4.559602821249458593e+00 4.167053164452720893e+00 5.232839590161499466e+00 5.347001135761228596e+00 4.206288180124425402e+00 5.011717501838350408e+00 3.968455585126571261e+00 5.098652036562749679e+00 4.779831909215916497e+00 4.440254273577877164e+00 4.230019189603340557e+00 -5.119884545043685620e+00 3.852460538794483913e+00 3.407831861195739442e+00 3.723554987305532915e+00 4.565872823753895915e+00 4.163823163162556185e+00 5.256010099416533521e+00 5.393560654358571682e+00 4.205100679650100481e+00 5.023279006456379925e+00 3.944876575708369693e+00 5.142219053964794284e+00 4.779936409257657282e+00 4.440121273524752610e+00 4.229990689591956787e+00 -5.096427141274351591e+00 3.892434814655956199e+00 3.461810975926975509e+00 3.799155116014967248e+00 4.554677025268077273e+00 4.165565410440091654e+00 5.223901104614204094e+00 5.330327801876574512e+00 4.211142034130066492e+00 5.005414683285621003e+00 3.981651944054248382e+00 5.086652109180486825e+00 4.779872942327282992e+00 4.438974334583333459e+00 4.227730161886026572e+00 -5.103261184602785328e+00 3.880885452800337809e+00 3.445730745785726690e+00 3.777497491778390781e+00 4.557324506181583246e+00 4.164214211125480958e+00 5.232832268549433508e+00 5.348378395685436715e+00 4.210605387593767013e+00 5.009806980159292600e+00 3.972575732728341968e+00 5.103211488014860464e+00 4.780001031169360814e+00 4.438972368771311849e+00 4.227845157572376777e+00 -5.120317329672263718e+00 3.852138687647257420e+00 3.405769744779167496e+00 3.723931089270374528e+00 4.563947804773200723e+00 4.160850587299749215e+00 5.255117341672209008e+00 5.393433560233562574e+00 4.209187107462120103e+00 5.020812710907808452e+00 3.949719756157049844e+00 5.144657849970104557e+00 4.780287402210577241e+00 4.438957933990210769e+00 4.228123063814388516e+00 -5.092902177223409765e+00 3.892432334041243447e+00 3.458357388798343202e+00 3.803614275703672387e+00 4.550054118936396108e+00 4.167057610973984083e+00 5.219810487586725500e+00 5.333212587629732937e+00 4.208594173434244468e+00 5.008144400245305050e+00 3.980022803515795626e+00 5.084715596479592925e+00 4.787731765421213481e+00 4.439473528109648903e+00 4.223443039174134661e+00 -5.100124249224302631e+00 3.880379635300070795e+00 3.441466684192993952e+00 3.782477175789192625e+00 4.552601510199592028e+00 4.165821004337156630e+00 5.229095946058231803e+00 5.351937001907162816e+00 4.208009421458690724e+00 5.012598716327302917e+00 3.971175194607369896e+00 5.100829827150191065e+00 4.787754168232674523e+00 4.439444151121876736e+00 4.223663519427212520e+00 -5.118183394455877000e+00 3.850590682409233079e+00 3.399700055381695840e+00 3.730032485145450494e+00 4.558979655559638466e+00 4.162695936402228014e+00 5.252297961232436307e+00 5.398442395905188818e+00 4.206437301393266104e+00 5.023908229323359897e+00 3.948874057084713840e+00 5.141254402247102284e+00 4.787753781670383901e+00 4.439366062742222674e+00 4.224171582619086429e+00 +5.113541513666988614e+00 3.863321621856395272e+00 3.422849405750413077e+00 3.744792403700195393e+00 4.563437071260724842e+00 4.165241540969359946e+00 5.246389149540494401e+00 5.374789016472041325e+00 4.205651317203156658e+00 5.018535901976148850e+00 3.954367808247492011e+00 5.125120084596087366e+00 4.780862619202477681e+00 4.438958262478904793e+00 4.229719203879755085e+00 +5.120025271365844510e+00 3.856579371274426293e+00 3.414705952782826515e+00 3.737785044340109497e+00 4.567585642723551942e+00 4.159519054131839866e+00 5.250084679248121944e+00 5.385581123343794019e+00 4.200962896678091418e+00 5.021803418638587146e+00 3.949167678661201553e+00 5.132094095892159480e+00 4.780322156232239550e+00 4.438706615138793055e+00 4.230691143249183384e+00 +5.130668193311530345e+00 3.842257606605119058e+00 3.395862296092527544e+00 3.714827908695999437e+00 4.573237572833039444e+00 4.153228609383069703e+00 5.260288809266615573e+00 5.408911614680068425e+00 4.196383384031074470e+00 5.028390217665488215e+00 3.936998920621842313e+00 5.152530157847158954e+00 4.779946425252074249e+00 4.438497469932701556e+00 4.231469808740525806e+00 +5.139819240552561119e+00 3.829166724568353608e+00 3.378433997779851872e+00 3.691026689252517201e+00 4.577843098496067853e+00 4.148427493258955323e+00 5.270227718944992645e+00 5.430404213260533908e+00 4.193244443684692513e+00 5.034444098407153234e+00 3.925351014385712656e+00 5.173263307232290664e+00 4.779833739227024481e+00 4.438383380785650978e+00 4.231858841799698290e+00 +5.113130842373807994e+00 3.868695650279761811e+00 3.415487571001170508e+00 3.744651239412133403e+00 4.563580662541786737e+00 4.164111062857862144e+00 5.240406961795859964e+00 5.372954889528233302e+00 4.205693456774174166e+00 5.018637881428192671e+00 3.954691356908634603e+00 5.129125907828851361e+00 4.777789213993123951e+00 4.437703393219351256e+00 4.232924724680167117e+00 +5.119291532870520633e+00 3.862413940254995293e+00 3.408309249042009270e+00 3.737114389353814126e+00 4.567707592816605100e+00 4.158438791080364183e+00 5.244273868122562909e+00 5.384140787221159741e+00 4.201093323698148474e+00 5.021865322738613635e+00 3.949477760356338241e+00 5.135847808612812315e+00 4.777309286134913791e+00 4.437382988427210684e+00 4.233825195674564945e+00 +5.129194981686882038e+00 3.849057223489113166e+00 3.391777933906729103e+00 3.712887216905144339e+00 4.573278252293058621e+00 4.152308704082664725e+00 5.254885805290236078e+00 5.408420515728852074e+00 4.196773594748246516e+00 5.028351580134470034e+00 3.937225159892942195e+00 5.155667666999540266e+00 4.777076424627810347e+00 4.437027035111054118e+00 4.234426241708828975e+00 +5.137770373040658534e+00 3.836513195982588886e+00 3.376448677962978095e+00 3.687820383509105238e+00 4.577748259206027015e+00 4.147750333825657165e+00 5.265244251783798290e+00 5.430908726685756527e+00 4.193982473292017232e+00 5.034322955639100705e+00 3.925327005711702455e+00 5.175896964276449630e+00 4.777089989406817061e+00 4.436815864047960467e+00 4.234631824221919416e+00 diff --git a/tests/data/abacus.out/energy.raw b/tests/data/abacus.out/energy.raw index d6e8aa5d7..bfa98ed00 100644 --- a/tests/data/abacus.out/energy.raw +++ b/tests/data/abacus.out/energy.raw @@ -1,9 +1,8 @@ --2.191299378191779965e+02 --2.194405277004599952e+02 --2.198624336150280101e+02 --2.191326527145239993e+02 --2.194421046524030032e+02 --2.198623721410370138e+02 --2.191187282189270036e+02 --2.194341917153120107e+02 --2.198612731451000002e+02 +-2.194176123439999913e+02 +-2.194929689141850133e+02 +-2.196084128243170142e+02 +-2.196339131271809890e+02 +-2.194202173360000074e+02 +-2.194938055581540084e+02 +-2.196077839102829898e+02 +-2.196330220266449942e+02 diff --git a/tests/data/abacus.out/force.raw b/tests/data/abacus.out/force.raw index 4144adc07..0cb5a096b 100644 --- a/tests/data/abacus.out/force.raw +++ b/tests/data/abacus.out/force.raw @@ -1,9 +1,8 @@ -1.340516999999999959e+00 -2.319939999999999891e+00 -3.252981999999999818e+00 -4.366520999999999653e+00 5.253839999999999621e-01 -2.713240000000000096e-01 1.946277000000000035e+00 3.914839999999999876e+00 -1.002760000000000040e-01 9.686479999999999535e-01 -1.975710000000000077e+00 3.652965000000000018e+00 1.110799999999999982e-01 -1.445730000000000071e-01 -2.838299999999999851e-02 -1.004871000000000070e+00 -1.739881000000000011e+00 -2.441946999999999868e+00 -3.252618000000000009e+00 3.932160000000000100e-01 -2.014640000000000042e-01 1.449497000000000035e+00 2.920978999999999992e+00 -7.423100000000000531e-02 7.239849999999999897e-01 -1.478039000000000103e+00 2.737074999999999925e+00 7.426499999999999768e-02 -9.627499999999999947e-02 -1.943299999999999889e-02 -3.081909999999999927e-01 -5.357279999999999820e-01 -7.577249999999999819e-01 -9.752370000000000205e-01 1.223179999999999962e-01 -5.883499999999999841e-02 4.313279999999999892e-01 8.821980000000000377e-01 -2.097399999999999959e-02 2.183859999999999968e-01 -4.492929999999999979e-01 8.426649999999999974e-01 1.733200000000000018e-02 -1.949499999999999844e-02 -5.131000000000000144e-03 -1.427623000000000086e+00 -2.413518999999999970e+00 -3.360831999999999820e+00 -4.528626000000000040e+00 5.543489999999999807e-01 -2.825799999999999979e-01 1.865701999999999972e+00 3.772834000000000021e+00 -1.115990000000000038e-01 9.166830000000000256e-01 -1.897685000000000066e+00 3.461780000000000079e+00 3.186169999999999836e-01 -1.597900000000000015e-02 2.932310000000000194e-01 -1.068959999999999910e+00 -1.799541999999999975e+00 -2.503127999999999798e+00 -3.353024000000000004e+00 4.141170000000000129e-01 -2.095920000000000005e-01 1.397261000000000086e+00 2.832427000000000028e+00 -9.248800000000000077e-02 6.915970000000000173e-01 -1.440531999999999924e+00 2.608916999999999931e+00 1.952059999999999906e-01 -6.470000000000000057e-03 1.962909999999999933e-01 -3.321569999999999800e-01 -5.401329999999999742e-01 -7.446800000000000086e-01 -9.782939999999999969e-01 1.297010000000000107e-01 -6.194899999999999712e-02 4.260439999999999783e-01 8.800499999999999989e-01 -5.013700000000000101e-02 2.190239999999999965e-01 -4.777859999999999885e-01 8.186620000000000008e-01 1.069000000000000072e-03 8.167999999999999913e-03 3.810399999999999898e-02 -1.508321999999999941e+00 -2.517781999999999965e+00 -3.530746999999999858e+00 -4.418461999999999890e+00 5.307359999999999856e-01 -2.590069999999999872e-01 1.940423000000000009e+00 3.914120000000000044e+00 -1.216489999999999932e-01 9.302350000000000341e-01 -1.848592999999999931e+00 3.369225999999999832e+00 3.948200000000000320e-02 -7.847999999999999421e-02 5.421770000000000200e-01 -1.133156999999999970e+00 -1.856662000000000035e+00 -2.608308000000000071e+00 -3.288841000000000125e+00 4.018760000000000110e-01 -1.963060000000000083e-01 1.454909000000000008e+00 2.915560000000000151e+00 -1.033980000000000038e-01 7.166339999999999932e-01 -1.407418999999999976e+00 2.547271999999999981e+00 -1.585999999999999910e-02 -5.335600000000000065e-02 3.607400000000000051e-01 -3.706369999999999942e-01 -5.229000000000000314e-01 -7.455789999999999917e-01 -9.850360000000000227e-01 1.368810000000000027e-01 -6.710800000000000098e-02 4.571290000000000076e-01 8.672569999999999446e-01 -6.185999999999999832e-02 2.617059999999999942e-01 -4.714160000000000017e-01 8.086250000000000382e-01 -1.044360000000000011e-01 -9.821999999999999134e-03 6.592199999999999449e-02 +6.681760905239999548e-01 -1.155967561983000103e+00 -1.620154186473999891e+00 -2.080502119690000207e+00 2.497103336489999992e-01 -1.295823446350000130e-01 9.348012021010000394e-01 1.879024337850000004e+00 -4.843350938899999847e-02 4.774995971179999965e-01 -9.733571309149999795e-01 1.797915441510999912e+00 2.522994699999999902e-05 5.900213989999999586e-04 2.545989869999999906e-04 +4.902549688719999854e-01 -8.603996332259999935e-01 -1.205700903469000052e+00 -1.763823817171999986e+00 1.889546707599999986e-01 -9.843194327899999763e-02 7.252026927829999803e-01 1.420961754764999974e+00 -1.878482660100000076e-02 3.788428604390000065e-01 -7.845533793900000274e-01 1.495612918186999929e+00 1.695232950780000136e-01 3.503658709100000018e-02 -1.726952448380000005e-01 +1.600251149420000019e-01 -3.088749268920000235e-01 -4.309845942409999964e-01 -8.343811928180000503e-01 5.437479820200000202e-02 -2.141280961400000155e-02 2.937467391099999880e-01 5.233057998300000291e-01 2.732362033599999851e-02 1.460526182509999937e-01 -3.256663520390000177e-01 6.880404890289999464e-01 2.345567205150000112e-01 5.686068089900000316e-02 -2.629667055100000095e-01 +-1.014967635109999960e-01 1.250831527160000123e-01 1.800253993350000026e-01 8.654394694999999540e-03 -6.285089338900000377e-02 5.043301099599999809e-02 -5.771566249800000326e-02 -1.984398833290000053e-01 6.496074637099999438e-02 -5.642669293500000155e-02 7.369607476700000548e-02 -2.676083779900000070e-02 2.069847242489999961e-01 6.251154923500000515e-02 -2.686583189019999818e-01 +6.006731840350000295e-01 -1.059740442672999938e+00 -1.418495993187999904e+00 -2.191135947068000078e+00 2.451885403140000030e-01 -1.190902165670000012e-01 9.706092934319999754e-01 1.961304510034000081e+00 -2.998638941900000007e-02 4.691260984799999756e-01 -9.761709706690000488e-01 1.745238499110000063e+00 1.507273711209999867e-01 -1.705816370059999865e-01 -1.776658999359999880e-01 +4.420952958250000120e-01 -8.015875351619999867e-01 -1.052519150428000039e+00 -1.844676097365000045e+00 1.816663955479999870e-01 -8.535898558099999645e-02 7.507074338789999635e-01 1.480714365731000015e+00 9.302213549999999468e-04 3.713432452559999875e-01 -7.909188087580000248e-01 1.452768625602999908e+00 2.805301224060000043e-01 -6.987441735900000450e-02 -3.158207109480000163e-01 +1.486986759820000115e-01 -3.179899281079999751e-01 -3.700184322000000248e-01 -8.545027028670000302e-01 4.119800933300000328e-02 -2.061590459000000198e-03 2.997173780390000042e-01 5.403247622500000347e-01 4.908535374100000265e-02 1.399911739220000007e-01 -3.386418890180000196e-01 6.657504093030000014e-01 2.660954749230000083e-01 7.510904554300000535e-02 -3.427557403859999852e-01 +-8.944999494800000284e-02 7.442795737500000619e-02 1.800067342520000058e-01 3.338775485699999740e-02 -7.984094083499999883e-02 7.354084325800000488e-02 -6.629687001900000376e-02 -2.143503895849999952e-01 8.691687501900000057e-02 -6.278862867499999945e-02 5.975731948900000340e-02 -3.768322513999999845e-02 1.851477387859999935e-01 1.600060535560000052e-01 -3.027812273889999850e-01 diff --git a/tests/data/abacus.out/virial.raw b/tests/data/abacus.out/virial.raw index 81d860769..e73cb6b06 100644 --- a/tests/data/abacus.out/virial.raw +++ b/tests/data/abacus.out/virial.raw @@ -1,9 +1,8 @@ -5.795858174693855780e+00 3.443092965380536302e-02 1.929418518002443822e-02 3.443092965380536302e-02 5.716638835032358479e+00 -2.389685573149830794e-02 1.929418518002443822e-02 -2.389685573149830794e-02 5.617522216398079138e+00 -4.408988076950304702e+00 2.176542487386309843e-02 1.214803211126708540e-02 2.176542487386309843e-02 4.359248625442528002e+00 -1.506503678236161513e-02 1.214803211126708540e-02 -1.506503678236161513e-02 4.296671356642591810e+00 -1.386467678460361785e+00 -6.721258240496656147e-04 -3.665654374793160769e-04 -6.721258240496656147e-04 1.386947691887250755e+00 5.415536098234567707e-04 -3.665654374793160769e-04 5.415536098234567707e-04 1.389181332961759718e+00 -5.920273248601972682e+00 -6.039738868480488271e-02 -5.548276701405261552e-02 -6.039738868480488271e-02 5.605862281032128358e+00 1.215189545474988780e-01 -5.548276701405261552e-02 1.215189545474988780e-01 5.558883535614017823e+00 -4.490640109820734693e+00 -4.527006960785832923e-02 -4.134669356180990796e-02 -4.527006960785832923e-02 4.293001025437428453e+00 7.126623109612076346e-02 -4.134669356180990796e-02 7.126623109612076346e-02 4.248516980437247348e+00 -1.394114722102968162e+00 -1.766924844126081806e-02 -1.462129465140290206e-02 -1.766924844126081806e-02 1.399656251812032570e+00 -1.912491203874137902e-02 -1.462129465140290206e-02 -1.912491203874137902e-02 1.360744660235811310e+00 -5.844498499100296840e+00 -6.853191054575857519e-03 -1.324669162954480450e-01 -6.853191054575857519e-03 5.775330648915621978e+00 2.461468284624128700e-01 -1.324669162954480450e-01 2.461468284624128700e-01 5.611345206312754463e+00 -4.456000939126254501e+00 -1.359924298733263329e-02 -9.024508563996384847e-02 -1.359924298733263329e-02 4.394864279944473040e+00 1.488666274174575976e-01 -9.024508563996384847e-02 1.488666274174575976e-01 4.279539092748385620e+00 -1.432096287462409911e+00 -2.596479489866933624e-02 -1.308794539607722671e-02 -2.596479489866933624e-02 1.380061149718328606e+00 -2.498250948476371872e-02 -1.308794539607722671e-02 -2.498250948476371872e-02 1.354370036932820875e+00 +2.925185435890660823e+00 -1.143066424579545657e-04 8.881725950484575360e-05 -1.143066424579545657e-04 2.926987607980041428e+00 -1.622153345284976810e-04 8.881725950484575360e-05 -1.622153345284976810e-04 2.926977964750569594e+00 +2.436657435753112111e+00 -1.143020376950368636e-02 4.544063554962263218e-02 -1.143020376950368636e-02 2.255249757662518117e+00 -6.082814107967922379e-02 4.544063554962263218e-02 -6.082814107967922379e-02 2.339991196674894525e+00 +1.122805829437958147e+00 4.027865798844964401e-03 5.579882761091184418e-02 4.027865798844964401e-03 8.632917807339579586e-01 -6.449198040758287453e-02 5.579882761091184418e-02 -6.449198040758287453e-02 9.953008144738632046e-01 +-8.627979325430941426e-02 3.478382138386666711e-02 3.502648607774696415e-02 3.478382138386666711e-02 -3.189408991107919311e-01 -2.448769152305691615e-02 3.502648607774696415e-02 -2.448769152305691615e-02 -1.845621096491250612e-01 +3.025236369053594832e+00 6.359114793509076935e-02 5.382261098457663540e-02 6.359114793509076935e-02 2.940675387546062058e+00 -7.889899733201287402e-02 5.382261098457663540e-02 -7.889899733201287402e-02 2.733246715970101715e+00 +2.509450100200702138e+00 3.496063080696146241e-02 8.455888007773477988e-02 3.496063080696146241e-02 2.273669135860442836e+00 -1.139127866385887533e-01 8.455888007773477988e-02 -1.139127866385887533e-01 2.186437923758526747e+00 +1.138305236971204781e+00 1.726041882590492391e-02 6.262916189679723633e-02 1.726041882590492391e-02 8.889569868360537308e-01 -6.779923277145767646e-02 6.262916189679723633e-02 -6.779923277145767646e-02 9.244179456601920863e-01 +-1.187496309838749348e-01 2.448581565458010298e-02 1.754917825266641071e-02 2.448581565458010298e-02 -2.962521051255574966e-01 7.964505747695275681e-03 1.754917825266641071e-02 7.964505747695275681e-03 -1.987105956507752014e-01 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/INPUT b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/INPUT index c3181c397..f38b2d7d0 100644 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/INPUT +++ b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/INPUT @@ -1,20 +1,17 @@ INPUT_PARAMETERS calculation md -atom_file STRU -kpoint_file KPT pseudo_dir ./ ntype 2 symmetry 1 ecutwfc 90 -npool 1 - mixing_type pulay mixing_beta 0.4 +basis_type lcao +md_nstep 3 +cal_stress 1 +deepks_model model.ptg -nstep 3 -force_thr_ev 0.02 -#move_method cg -out_stru 0 -stress 1 +md_tfirst 10 +md_tfreq 0.1 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/INPUT b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/INPUT deleted file mode 100644 index 63bd0ed40..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/INPUT +++ /dev/null @@ -1,263 +0,0 @@ -INPUT_PARAMETERS -#Parameters (1.General) -suffix ABACUS #the name of main output directory -latname test #the name of lattice name -atom_file STRU #the filename of file containing atom positions -kpoint_file KPT #the name of file containing k points -pseudo_dir .// #the directory containing pseudo files -orbital_dir #the directory containing orbital files -pseudo_type auto #the type pseudo files -pseudo_rcut 15 #cut-off radius for radial integration -renormwithmesh 0 #0: use our own mesh to do radial renormalization; 1: use mesh as in QE -lmaxmax 2 #maximum of l channels used -dft_functional none #exchange correlation functional -calculation md #test; scf; relax; nscf; ienvelope; istate; -ntype 2 #atom species number -nspin 1 #1: single spin; 2: up and down spin; 4: noncollinear spin -nbands 0 #number of bands -nbands_sto 0 #number of stochastic bands -nbands_istate 5 #number of bands around Fermi level for istate calulation -nche_sto 0 #number of orders for Chebyshev expansion in stochastic DFT -symmetry 0 #turn symmetry on or off -set_vel 0 #read velocity from STRU or not -symmetry_prec 1e-05 #accuracy for symmetry -nelec 0 #input number of electrons -tot_magnetization 0 #total magnetization of the system - -#Parameters (2.PW) -ecutwfc 90 ##energy cutoff for wave functions -diago_cg_maxiter 50 #max iteration number for cg -diago_cg_prec 1 #diago_cg_prec -ethr 0.01 #threshold for eigenvalues is cg electron iterations -dr2 1e-09 #charge density error -start_wfc atomic #start wave functions are from 'atomic' or 'file' -start_charge atomic #start charge is from 'atomic' or file -charge_extrap atomic #atomic; first-order; second-order; dm:coefficients of SIA -out_charge 0 #>0 output charge density for selected electron steps -out_potential 0 #output realspace potential -out_wf 0 #output wave functions -out_dos 0 #output energy and dos -out_band 0 #output energy and band structure -restart_save 0 #print to disk every step for restart -restart_load 0 #restart from disk -read_file_dir auto #directory of files for reading -nx 0 #number of points along x axis for FFT grid -ny 0 #number of points along y axis for FFT grid -nz 0 #number of points along z axis for FFT grid -cell_factor 1.2 #used in the construction of the pseudopotential tables - -#Parameters (3.Relaxation) -ks_solver cg #cg; dav; lapack; genelpa; hpseps; scalapack_gvx -niter 40 ##number of electron iterations -force_set 0 #output the force_set or not -nstep 3 #number of ion iteration steps -out_stru 0 #output the structure files after each ion step -force_thr 0.00077787 #force threshold, unit: Ry/Bohr -force_thr_ev 0.02 #force threshold, unit: eV/Angstrom -force_thr_ev2 0 #force invalid threshold, unit: eV/Angstrom -cg_threshold 0.5 #threshold for switching from cg to bfgs, unit: eV/Angstrom -stress_thr 0.01 #stress threshold -press1 0 #target pressure, unit: KBar -press2 0 #target pressure, unit: KBar -press3 0 #target pressure, unit: KBar -bfgs_w1 0.01 #wolfe condition 1 for bfgs -bfgs_w2 0.5 #wolfe condition 2 for bfgs -trust_radius_max 0.8 #maximal trust radius, unit: Bohr -trust_radius_min 1e-05 #minimal trust radius, unit: Bohr -trust_radius_ini 0.5 #initial trust radius, unit: Bohr -stress 1 #calculate the stress or not -fixed_axes None #which axes are fixed -move_method cg #bfgs; sd; cg; cg_bfgs; -out_level m #ie(for electrons); i(for ions); -out_dm 0 #>0 output density matrix -out_descriptor 0 #>0 compute descriptor for deepks -lmax_descriptor 2 #>0 lmax used in descriptor for deepks - -#Parameters (4.LCAO) -basis_type pw #PW; LCAO in pw; LCAO -new_dm 1 #Type of density matrix; 0: old 1: new -search_radius -1 #input search radius (Bohr) -search_pbc 1 #input periodic boundary condition -lcao_ecut 0 #energy cutoff for LCAO -lcao_dk 0.01 #delta k for 1D integration in LCAO -lcao_dr 0.01 #delta r for 1D integration in LCAO -lcao_rmax 30 #max R for 1D two-center integration table -out_hs 0 #output H and S matrix -out_hs2 0 #output H(R) and S(R) matrix -out_r 0 #output r(R) matrix -out_lowf 0 #ouput LCAO wave functions -bx 1 #division of an element grid in FFT grid along x -by 1 #division of an element grid in FFT grid along y -bz 1 #division of an element grid in FFT grid along z - -#Parameters (5.Smearing) -smearing fixed #type of smearing: gauss; fd; fixed; mp; mp2; mv -sigma 0.01 #energy range for smearing - -#Parameters (6.Charge Mixing) -mixing_type pulay #plain; kerker; pulay; pulay-kerker; broyden -mixing_beta 0.4 #mixing parameter: 0 means no new charge -mixing_ndim 8 #mixing dimension in pulay -mixing_gg0 0 #mixing parameter in kerker - -#Parameters (7.DOS) -dos_emin_ev -15 #minimal range for dos -dos_emax_ev 15 #maximal range for dos -dos_edelta_ev 0.01 #delta energy for dos -dos_scale 0.01 #scale dos range by -dos_sigma 0.07 #gauss b coefficeinet(default=0.07) - -#Parameters (8.Technique) -gamma_only 0 #gamma only, only used in LCAO basis -diago_proc 8 #number of proc used to diago -npool 1 #number of pools for k points, pw only -mem_saver 0 #memory saver for many k points used -printe 100 #print band energy for selectively ionic steps - -#Parameters (9.SIAO) -selinv_npole 40 #number of selected poles -selinv_temp 2000 #temperature for Fermi-Dirac distribution -selinv_gap 0 #supposed gap in the calculation -selinv_deltae 2 #expected energy range -selinv_mu -1 #chosen mu as Fermi energy -selinv_threshold 0.001 #threshold for calculated electron number -selinv_niter 50 #max number of steps to update mu - -#Parameters (10.Molecular dynamics) -md_mdtype 1 #choose ensemble -md_potential FP #choose potential -md_dt 1 #time step -mnhc 4 #number of Nose-Hoover chains -md_qmass 1 #mass of thermostat -md_tfirst 0 #temperature first -md_tlast 0 #temperature last -md_dumpmdfred 1 #The period to dump MD information for monitoring and restarting MD -md_mdoutpath mdoutput #output path of md -md_rstmd 0 #whether restart -md_fixtemperature 1 #period to change temperature -md_ediff 0.0001 #parameter for constraining total energy change -md_ediffg 0.001 #parameter for constraining max force change -NVT_tau 0 #parameter for adjust effect of thermostat -NVT_control 1 #choose which thermostat used in NVT ensemble -rcut_lj 8.5 #cutoff radius of LJ potential -epsilon_lj 0.01032 #the value of epsilon for LJ potential -sigma_lj 3.405 #the value of sigma for LJ potential - -#Parameters (11.Efield) -efield 0 #add electric field -edir 1 #add electric field -emaxpos 0.5 #maximal position of efield [0,1) -eopreg 0.1 #where sawlike potential decrease -eamp 0.001 #amplitute of the efield, unit is a.u. -eamp_v 0.05144 #amplitute of the efield, unit is V/A - -#Parameters (12.Test) -out_alllog 0 #output information for each processor, when parallel -nurse 0 #for coders -colour 0 #for coders, make their live colourful -t_in_h 1 #calculate the kinetic energy or not -vl_in_h 1 #calculate the local potential or not -vnl_in_h 1 #calculate the nonlocal potential or not -vh_in_h 1 #calculate the hartree potential or not -vxc_in_h 1 #calculate the xc potential or not -vion_in_h 1 #calculate the local ionic potential or not -test_force 0 #test the force -test_stress 0 #test the force - -#Parameters (13.Other Methods) -mlwf_flag 0 #turn MLWF on or off -opt_epsilon2 0 #calculate the dielectic function -opt_nbands 0 #number of bands for optical calculation - -#Parameters (14.VdW Correction) -vdw_method none #the method of calculating vdw (none ; d2 ; d3_0 ; d3_bj -vdw_s6 default #scale parameter of d2/d3_0/d3_bj -vdw_s8 default #scale parameter of d3_0/d3_bj -vdw_a1 default #damping parameter of d3_0/d3_bj -vdw_a2 default #damping parameter of d3_bj -vdw_d 20 #damping parameter of d2 -vdw_abc 0 #third-order term? -vdw_C6_file default #filename of C6 -vdw_C6_unit Jnm6/mol #unit of C6, Jnm6/mol or eVA6 -vdw_R0_file default #filename of R0 -vdw_R0_unit A #unit of R0, A or Bohr -vdw_model radius #expression model of periodic structure, radius or period -vdw_radius default #radius cutoff for periodic structure -vdw_radius_unit Bohr #unit of radius cutoff for periodic structure -vdw_cn_thr 40 #radius cutoff for cn -vdw_cn_thr_unit Bohr #unit of cn_thr, Bohr or Angstrom -vdw_period 3 3 3 #periods of periodic structure - -#Parameters (15.spectrum) -spectral_type None #the type of the calculated spectrum -spectral_method 0 #0: tddft(linear response) -kernel_type rpa #the kernel type: rpa, tdlda ... -eels_method 0 #0: hilbert_transform method; 1: standard method -absorption_method 0 #0: vasp's method 1: pwscf's method -system bulk #the calculate system -eta 0.05 #eta(Ry) -domega 0.01 #domega(Ry) -nomega 300 #nomega -ecut_chi 1 #the dimension of chi matrix -q_start 0.1 0.1 0.1 #the position of the first q point in direct coordinate -q_direction 1 0 0 #the q direction -nq 1 #the total number of qpoints for calculation -out_epsilon 1 #output epsilon or not -out_chi 0 #output chi or not -out_chi0 0 #output chi0 or not -fermi_level 0 #the change of the fermi_level(Ry) -coulomb_cutoff 0 # turn on the coulomb_cutoff or not -kmesh_interpolation 0 #calculting -qcar 0 0 0 #(unit: 2PI/lat0) -ocp 0 #change occupation or not -ocp_set none #set occupation -lcao_box 10 10 10 #the scale for searching the existence of the overlap - mulliken 0 # mulliken charge or not -intrasmear 0 #Eta -shift 0 #shift -metalcalc 0 #metal or not -eps_degauss 0.01 #degauss in calculating epsilon0 -noncolin 0 #using non-collinear-spin -lspinorb 0 #consider the spin-orbit interaction - -#Parameters (17.exx) -exx_hybrid_type no #no, hf, pbe0, hse or opt_orb -exx_hybrid_alpha 0.25 # -exx_hse_omega 0.11 # -exx_separate_loop 1 #0 or 1 -exx_hybrid_step 100 # -exx_lambda 0.3 # -exx_pca_threshold 0 # -exx_c_threshold 0 # -exx_v_threshold 0 # -exx_dm_threshold 0 # -exx_schwarz_threshold0 # -exx_cauchy_threshold0 # -exx_ccp_threshold 1e-08 # -exx_ccp_rmesh_times 10 # -exx_distribute_type htime #htime or kmeans1 or kmeans2 -exx_opt_orb_lmax 0 # -exx_opt_orb_ecut 0 # -exx_opt_orb_tolerence0 # - -#Parameters (17.tddft) -tddft 0 #calculate tddft or not -td_dr2 1e-09 #threshold for electronic iteration of tddft -td_dt 0.02 #time of ion step -td_force_dt 0.02 #time of force change -td_val_elec_01 1 #td_val_elec_01 -td_val_elec_02 1 #td_val_elec_02 -td_val_elec_03 1 #td_val_elec_03 -td_vext 0 #add extern potential or not -td_vext_dire 1 #extern potential direction -td_timescale 0.5 #extern potential td_timescale -td_vexttype 1 #extern potential type -td_vextout 0 #output extern potential or not -td_dipoleout 0 #output dipole or not - -#Parameters (18.berry_wannier) -berry_phase 0 #calculate berry phase or not -gdir 3 #calculate the polarization in the direction of the lattice std::vector -towannier90 0 #use wannier90 code interface or not -nnkpfile seedname.nnkp #the wannier90 code nnkp file name -wannier_spin up #calculate spin in wannier90 code interface diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/MD_dump b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/MD_dump new file mode 100644 index 000000000..657704d8a --- /dev/null +++ b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/MD_dump @@ -0,0 +1,72 @@ +MDSTEP: 0 +LATTICE_CONSTANT: 1.889726125458 +LATTICE_VECTORS + 9.500003790419 0.000000000000 0.000000000000 + 0.000000000000 9.500003790419 0.000000000000 + 0.000000000000 0.000000000000 9.500003790419 +VIRIAL (KBAR) + 5.466287376582 -0.000213604563 0.000165972611 + -0.000213604563 5.469655091470 -0.000303131427 + 0.000165972611 -0.000303131427 5.469637071189 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 H 5.113541511415 3.863321620155 3.422849404243 0.668176090524 -1.155967561983 -1.620154186474 + 1 H 3.744792402051 4.563437069251 4.165241539135 -2.080502119690 0.249710333649 -0.129582344635 + 2 H 5.246389147230 5.374789014105 4.205651315351 0.934801202101 1.879024337850 -0.048433509389 + 3 H 5.018535899766 3.954367806506 5.125120082339 0.477499597118 -0.973357130915 1.797915441511 + 4 C 4.780862617097 4.438958260524 4.229719202017 0.000025229947 0.000590021399 0.000254598987 + + +MDSTEP: 1 +LATTICE_CONSTANT: 1.889726125458 +LATTICE_VECTORS + 9.500003790419 0.000000000000 0.000000000000 + 0.000000000000 9.500003790419 0.000000000000 + 0.000000000000 0.000000000000 9.500003790419 +VIRIAL (KBAR) + 4.553376212902 -0.021359595809 0.084914812388 + -0.021359595809 4.214380097102 -0.113669409004 + 0.084914812388 -0.113669409004 4.372736231610 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 H 5.120025269111 3.856579369576 3.414705951279 0.490254968872 -0.860399633226 -1.205700903469 + 1 H 3.737785042694 4.567585640712 4.159519052300 -1.763823817172 0.188954670760 -0.098431943279 + 2 H 5.250084676936 5.385581120972 4.200962894828 0.725202692783 1.420961754765 -0.018784826601 + 3 H 5.021803416427 3.949167676922 5.132094093632 0.378842860439 -0.784553379390 1.495612918187 + 4 C 4.780322154127 4.438706613184 4.230691141386 0.169523295078 0.035036587091 -0.172695244838 + + +MDSTEP: 2 +LATTICE_CONSTANT: 1.889726125458 +LATTICE_VECTORS + 9.500003790419 0.000000000000 0.000000000000 + 0.000000000000 9.500003790419 0.000000000000 + 0.000000000000 0.000000000000 9.500003790419 +VIRIAL (KBAR) + 2.098184701901 0.007526863665 0.104271142354 + 0.007526863665 1.613231388832 -0.120516017230 + 0.104271142354 -0.120516017230 1.859916370192 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 H 5.130668191052 3.842257604913 3.395862294597 0.160025114942 -0.308874926892 -0.430984594241 + 1 H 3.714827907060 4.573237570819 4.153228607554 -0.834381192818 0.054374798202 -0.021412809614 + 2 H 5.260288806950 5.408911612298 4.196383382183 0.293746739110 0.523305799830 0.027323620336 + 3 H 5.028390215451 3.936998918888 5.152530155578 0.146052618251 -0.325666352039 0.688040489029 + 4 C 4.779946423147 4.438497467978 4.231469806877 0.234556720515 0.056860680899 -0.262966705510 + + +MDSTEP: 3 +LATTICE_CONSTANT: 1.889726125458 +LATTICE_VECTORS + 9.500003790419 0.000000000000 0.000000000000 + 0.000000000000 9.500003790419 0.000000000000 + 0.000000000000 0.000000000000 9.500003790419 +VIRIAL (KBAR) + -0.161230853584 0.065000447974 0.065453914936 + 0.065000447974 -0.596004133377 -0.045760093501 + 0.065453914936 -0.045760093501 -0.344890794885 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 H 5.139819238289 3.829166722882 3.378433996292 -0.101496763511 0.125083152716 0.180025399335 + 1 H 3.691026687627 4.577843096480 4.148427491432 0.008654394695 -0.062850893389 0.050433010996 + 2 H 5.270227716624 5.430404210869 4.193244441838 -0.057715662498 -0.198439883329 0.064960746371 + 3 H 5.034444096190 3.925351012657 5.173263304954 -0.056426692935 0.073696074767 -0.026760837799 + 4 C 4.779833737122 4.438383378831 4.231858839936 0.206984724249 0.062511549235 -0.268658318902 + + diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/STRU_MD b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/STRU_MD deleted file mode 100644 index ab99de324..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/STRU_MD +++ /dev/null @@ -1,27 +0,0 @@ -ATOMIC_SPECIES -H 1.008 H_ONCV_PBE-1.0.upf -C 12.01 C_ONCV_PBE-1.0.upf - -LATTICE_CONSTANT -1.88972612546 - -LATTICE_VECTORS -9.50000379042 0 0 #latvec1 -0 9.50000379042 0 #latvec2 -0 0 9.50000379042 #latvec3 - -ATOMIC_POSITIONS -Direct - -H #label -0 #magnetism -4 #number of atoms -0.540930980325 0.402075031383 0.353895874486 1 1 1 0 0 0 -0.385586980814 0.481402417362 0.437898545951 1 1 1 0 0 0 -0.556131217776 0.57347946396 0.442495090138 1 1 1 0 0 0 -0.530202220323 0.412321251956 0.546677526283 1 1 1 0 0 0 - -C #label -0 #magnetism -1 #number of atoms -0.503163091902 0.467364749224 0.445258850036 1 1 1 0 0 0 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/STRU_READIN_ADJUST.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/STRU_READIN_ADJUST.cif deleted file mode 100644 index 779ef9f3b..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/STRU_READIN_ADJUST.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.5 -_cell_length_b 9.5 -_cell_length_c 9.5 -_cell_angle_alpha 90 -_cell_angle_beta 90 -_cell_angle_gamma 90 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.536573 0.40961 0.364448 -H 0.39961 0.479693 0.438774 -H 0.549844 0.56087 0.442817 -H 0.527061 0.418728 0.53486 -C 0.503135 0.467401 0.445266 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_1.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_1.cif deleted file mode 100644 index e09204a1c..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_1.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.5 -_cell_length_b 9.5 -_cell_length_c 9.5 -_cell_angle_alpha 90 -_cell_angle_beta 90 -_cell_angle_gamma 90 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.537248 0.408441 0.36281 -H 0.397411 0.479958 0.438637 -H 0.550825 0.562842 0.442767 -H 0.527549 0.417732 0.5367 -C 0.50314 0.467395 0.445265 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_2.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_2.cif deleted file mode 100644 index 99311ee37..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_2.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.5 -_cell_length_b 9.5 -_cell_length_c 9.5 -_cell_angle_alpha 90 -_cell_angle_beta 90 -_cell_angle_gamma 90 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.538935 0.405522 0.358719 -H 0.391953 0.480618 0.438297 -H 0.553264 0.567743 0.442642 -H 0.528766 0.41525 0.541286 -C 0.503151 0.467381 0.445262 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_3.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_3.cif deleted file mode 100644 index fde6898f6..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/md_pos_3.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.5 -_cell_length_b 9.5 -_cell_length_c 9.5 -_cell_angle_alpha 90 -_cell_angle_beta 90 -_cell_angle_gamma 90 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.540931 0.402075 0.353896 -H 0.385587 0.481402 0.437899 -H 0.556131 0.573479 0.442495 -H 0.530202 0.412321 0.546678 -C 0.503163 0.467365 0.445259 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/running_md.log b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/running_md.log index 34c025fe5..684146e69 100644 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/running_md.log +++ b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/OUT.ABACUS/running_md.log @@ -6,8 +6,8 @@ Website: http://abacus.ustc.edu.cn/ Version: Parallel, in development - Processor Number is 8 - Start Time is Fri Nov 12 18:15:13 2021 + Processor Number is 4 + Start Time is Sun Apr 17 15:10:23 2022 ------------------------------------------------------------------------------------ @@ -18,7 +18,7 @@ orbital_dir = pseudo_type = auto DRANK = 1 - DSIZE = 8 + DSIZE = 4 DCOLOR = 1 GRANK = 1 GSIZE = 1 @@ -52,9 +52,8 @@ READING ATOM TYPE 1 atom label = H - L=0, number of zeta = 1 + L=0, number of zeta = 2 L=1, number of zeta = 1 - L=2, number of zeta = 1 number of atom for this type = 4 start magnetization = FALSE start magnetization = FALSE @@ -63,8 +62,8 @@ READING ATOM TYPE 2 atom label = C - L=0, number of zeta = 1 - L=1, number of zeta = 1 + L=0, number of zeta = 2 + L=1, number of zeta = 2 L=2, number of zeta = 1 number of atom for this type = 1 start magnetization = FALSE @@ -73,12 +72,16 @@ CARTESIAN COORDINATES ( UNIT = 1.88973 Bohr ). atom x y z mag vx vy vz - tauc_H1 5.09744437597 3.89129339419 3.4622612337 0 0 0 0 - tauc_H2 3.79629251291 4.55708480448 4.16835321433 0 0 0 0 - tauc_H3 5.2235234109 5.32826990334 4.20676661344 0 0 0 0 - tauc_H4 5.00707710352 3.97791420915 5.08117016892 0 0 0 0 - tauc_C1 4.77978417423 4.4403114594 4.23003031273 0 0 0 0 + tauc_H1 5.11354151141 3.86332162016 3.42284940424 0 0 0 0 + tauc_H2 3.74479240205 4.56343706925 4.16524153913 0 0 0 0 + tauc_H3 5.24638914723 5.3747890141 4.20565131535 0 0 0 0 + tauc_H4 5.01853589977 3.95436780651 5.12512008234 0 0 0 0 + tauc_C1 4.7808626171 4.43895826052 4.22971920202 0 0 0 0 + + READING ORBITAL FILE NAMES FOR LCAO + orbital file: H_gga_8au_60Ry_2s1p.orb + orbital file: C_gga_8au_60Ry_2s2p1d.orb Volume (Bohr^3) = 5785.86022047 Volume (A^3) = 857.37500227 @@ -90,7 +93,7 @@ Reciprocal vectors: (Cartesian coordinate: in unit of 2 pi/a_0) +0.105263115896 +0 +0 +0 +0.105263115896 +0 - +0 +0 +0.105263115896 + +0 -0 +0.105263115896 @@ -117,10 +120,7 @@ Read in pseudopotential file is H_ONCV_PBE-1.0.upf pseudopotential type = NC - functional Ex = PBE - functional Ec = - functional GCEx = - functional GCEc = + exchange-correlation functional = PBE nonlocal core correction = 0 valence electrons = 1 lmax = 0 @@ -132,10 +132,7 @@ Read in pseudopotential file is C_ONCV_PBE-1.0.upf pseudopotential type = NC - functional Ex = PBE - functional Ec = - functional GCEx = - functional GCEc = + exchange-correlation functional = PBE nonlocal core correction = 0 valence electrons = 4 lmax = 1 @@ -146,7 +143,7 @@ L of projector = 1 L of projector = 1 initial pseudo atomic orbital number = 0 - NLOCAL = 45 + NLOCAL = 33 SETUP THE ELECTRONS NUMBER electron number of element H = 1 @@ -154,8 +151,10 @@ electron number of element C = 4 total electron number of element C = 4 occupied bands = 4 + NLOCAL = 33 NBANDS = 14 - DONE : SETUP UNITCELL Time : 0.086291129759 (SEC) + NBANDS = 14 + DONE : SETUP UNITCELL Time : 0.044255124405 (SEC) @@ -190,7 +189,7 @@ KPOINTS DIRECT_X DIRECT_Y DIRECT_Z WEIGHT 1 0 0 0 2 - DONE : INIT K-POINTS Time : 0.0878850566805 (SEC) + DONE : INIT K-POINTS Time : 0.0458821123466 (SEC) @@ -215,10 +214,10 @@ energy cutoff for wavefunc (unit:Ry) = 90 [fft grid for wave functions] = 120, 120, 120 [fft grid for charge/potential] = 120, 120, 120 - [fft grid division] = 1, 1, 1 - [big fft grid for charge/potential] = 120, 120, 120 - nbxx = 216000 - nrxx = 216000 + [fft grid division] = 2, 2, 2 + [big fft grid for charge/potential] = 60, 60, 60 + nbxx = 54000 + nrxx = 432000 SETUP PLANE WAVES FOR CHARGE/POTENTIAL number of plane waves = 667317 @@ -230,150 +229,138 @@ PARALLEL PW FOR CHARGE/POTENTIAL PROC COLUMNS(POT) PW - 1 1155 83417 - 2 1157 83415 - 3 1157 83415 - 4 1156 83414 - 5 1156 83414 - 6 1156 83414 - 7 1156 83414 - 8 1156 83414 + 1 2310 166830 + 2 2313 166829 + 3 2313 166829 + 4 2313 166829 --------------- sum ------------------- - 8 9249 667317 + 4 9249 667317 PARALLEL PW FOR WAVE FUNCTIONS PROC COLUMNS(W) PW - 1 289 10449 - 2 289 10453 - 3 290 10452 - 4 287 10451 - 5 293 10449 - 6 290 10448 - 7 288 10448 - 8 287 10449 + 1 575 20899 + 2 580 20900 + 3 578 20898 + 4 580 20902 --------------- sum ------------------- - 8 2313 83599 + 4 2313 83599 SETUP COORDINATES OF PLANE WAVES number of total plane waves = 667317 SETUP COORDINATES OF PLANE WAVES - number of |g| = 2438 + number of |g| = 2450 max |g| = 32.553990643 min |g| = 0 - DONE : INIT PLANEWAVE Time : 0.350971238862 (SEC) + DONE : INIT PLANEWAVE Time : 0.377468010411 (SEC) - npwx = 10449 + DONE : INIT CHARGE Time : 0.403857703321 (SEC) - SETUP NONLOCAL PSEUDOPOTENTIALS IN PLANE WAVE BASIS - H non-local projectors: - projector 1 L=0 - projector 2 L=0 - C non-local projectors: - projector 1 L=0 - projector 2 L=0 - projector 3 L=1 - projector 4 L=1 - TOTAL NUMBER OF NONLOCAL PROJECTORS = 16 - DONE : LOCAL POTENTIAL Time : 0.494807609997 (SEC) + DONE : INIT POTENTIAL Time : 0.408238855191 (SEC) - Init Non-Local PseudoPotential table : - Init Non-Local-Pseudopotential done. - DONE : NON-LOCAL POTENTIAL Time : 0.501984705625 (SEC) - start_pot = atomic - DONE : INIT POTENTIAL Time : 0.639263 (SEC) - Make real space PAO into reciprocal space. - max mesh points in Pseudopotential = 601 - dq(describe PAO in reciprocal space) = 0.01 - max q = 1143 + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + | | + | Setup numerical orbitals: | + | This part setup: numerical atomic orbitals, non-local projectors | + | and neutral potential (1D). The atomic orbitals information | + | including the radius, angular momentum and zeta number. | + | The neutral potential is the sum of local part of pseudopotential | + | and potential given by atomic charge, they will cancel out beyond | + | a certain radius cutoff, because the Z/r character. | + | | + <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - number of pseudo atomic orbitals for H is 0 - number of pseudo atomic orbitals for C is 0 - DONE : INIT BASIS Time : 0.917201 (SEC) - ...............Nose-Hoover Chain parameter initialization............... - Temperature = 0 - Temperature2 = 0 - NHC frequency = 0.00120944 - NHC chain = 4 - Qmass = 1822.89 - ............................................................... - PW ALGORITHM --------------- ION= 1 ELEC= 1-------------------------------- - K-point CG iter num Time(Sec) - 1 9.642857 1.320000 - Density error is 0.925917380140 + SETUP ONE DIMENSIONAL ORBITALS/POTENTIAL + delta k (1/Bohr) = 0.01 + delta r (Bohr) = 0.01 + dr_uniform (Bohr) = 0.001 + rmax (Bohr) = 30 + kmesh = 953 + ORBITAL L N nr dr RCUT CHECK_UNIT NEW_UNIT + 1 0 0 801 0.01 8 1 1 + 2 0 1 801 0.01 8 1 1 + 3 1 0 801 0.01 8 1 1 + ORBITAL L N nr dr RCUT CHECK_UNIT NEW_UNIT + 1 0 0 801 0.01 8 1 1 + 2 0 1 801 0.01 8 1 1 + 3 1 0 801 0.01 8 1 1 + 4 1 1 801 0.01 8 1 1 + 5 2 0 801 0.01 8 1 1 + SET NONLOCAL PSEUDOPOTENTIAL PROJECTORS + SET NONLOCAL PSEUDOPOTENTIAL PROJECTORS + max number of nonlocal projetors among all species is 4 - PW ALGORITHM --------------- ION= 1 ELEC= 2-------------------------------- - K-point CG iter num Time(Sec) - 1 2.357143 0.370000 + SETUP THE TWO-CENTER INTEGRATION TABLES - Density error is 0.103089655783 + SETUP THE DIVISION OF H/S MATRIX + divide the H&S matrix using 2D block algorithms. + nb2d = 1 + trace_loc_row dimension = 33 + trace_loc_col dimension = 33 + nloc = 289 + init_chg = atomic + nloc = 289 + searching radius is (Bohr)) = 18.89 + searching radius unit is (Bohr)) = 1.88973 - PW ALGORITHM --------------- ION= 1 ELEC= 3-------------------------------- - K-point CG iter num Time(Sec) - 1 4.500000 0.620000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 1 -------------------------------- - Density error is 0.029305943975 + Density error is 0.369103341079 - PW ALGORITHM --------------- ION= 1 ELEC= 4-------------------------------- - K-point CG iter num Time(Sec) - 1 3.928571 0.550000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 2 -------------------------------- - Density error is 0.215036462399 + Density error is 0.143573672298 - PW ALGORITHM --------------- ION= 1 ELEC= 5-------------------------------- - K-point CG iter num Time(Sec) - 1 3.285714 0.480000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 3 -------------------------------- - Density error is 0.000079236362 + Density error is 0.0734674541148 - PW ALGORITHM --------------- ION= 1 ELEC= 6-------------------------------- - K-point CG iter num Time(Sec) - 1 6.857143 0.890000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 4 -------------------------------- - Density error is 0.000065409462 + Density error is 0.00483129776793 - PW ALGORITHM --------------- ION= 1 ELEC= 7-------------------------------- - K-point CG iter num Time(Sec) - 1 3.071429 0.440000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 5 -------------------------------- - Density error is 0.000015159186 + Density error is 0.00175259574578 - PW ALGORITHM --------------- ION= 1 ELEC= 8-------------------------------- - K-point CG iter num Time(Sec) - 1 5.214286 0.690000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 6 -------------------------------- - Density error is 0.000000616832 + Density error is 0.000110712686393 - PW ALGORITHM --------------- ION= 1 ELEC= 9-------------------------------- - K-point CG iter num Time(Sec) - 1 4.357143 0.590000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 7 -------------------------------- - Density error is 0.000000158907 + Density error is 6.19582961728e-05 - PW ALGORITHM --------------- ION= 1 ELEC= 10-------------------------------- - K-point CG iter num Time(Sec) - 1 5.857143 0.760000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 8 -------------------------------- - Density error is 0.000000003032 + Density error is 1.8043377224e-06 - PW ALGORITHM --------------- ION= 1 ELEC= 11-------------------------------- - K-point CG iter num Time(Sec) - 1 6.500000 0.840000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 9 -------------------------------- - Density error is 0.000000000145 + Density error is 7.13331944904e-07 - charge density convergence is achieved - final etot is -219.129937819178 eV + LCAO ALGORITHM ------------- MD = 1 ELEC = 10 -------------------------------- + + Density error is 2.6209014458e-08 + + LCAO ALGORITHM ------------- MD = 1 ELEC = 11 -------------------------------- + Density error is 1.41723715595e-08 + LCAO ALGORITHM ------------- MD = 1 ELEC = 12 -------------------------------- + + Density error is 3.11824834896e-10 + + charge density convergence is achieved + final etot is -219.417612344 eV ><><><><><><><><><><><><><><><><><><><><><>< @@ -382,11 +369,11 @@ ><><><><><><><><><><><><><><><><><><><><><>< atom x y z - H1 +1.340517 -2.319940 -3.252982 - H2 -4.366521 +0.525384 -0.271324 - H3 +1.946277 +3.914840 -0.100276 - H4 +0.968648 -1.975710 +3.652965 - C1 +0.111080 -0.144573 -0.028383 + H1 +0.66817605 -1.1559675 -1.6201541 + H2 -2.080502 +0.24971032 -0.12958234 + H3 +0.93480114 +1.8790242 -0.048433506 + H4 +0.47749957 -0.97335707 +1.7979153 + C1 +2.5229946e-05 +0.00059002136 +0.00025459897 ><><><><><><><><><><><><><><><><><><><><><>< @@ -395,94 +382,75 @@ ><><><><><><><><><><><><><><><><><><><><><>< - +10.830707 +0.064341 +0.036055 - +0.064341 +10.682670 -0.044656 - +0.036055 -0.044656 +10.497451 + +5.466287 -0.000214 +0.000166 + -0.000214 +5.469655 -0.000303 + +0.000166 -0.000303 +5.469637 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 0 + ------------------------------------------- output Pressure for check! -Virtual Pressure is +21.340552 Kbar -Virial Term is +21.340552 Kbar -Kenetic Term is +0.000000 Kbar +Virtual Pressure is +5.474968 Kbar +Virial Term is +5.468527 Kbar +Kenetic Term is +0.006441 Kbar + - -------------------------------------------------- - Molecular Dynamics (NVT) STEP 1 - -------------------------------------------------- --------------------------------------------------- - SUMMARY OF NVT CALCULATION - -------------------------------------------------- - NVT Conservation : -16.105748 (Rydberg) - NVT Temperature : +0.000000 (K) - NVT Kinetic energy : +0.000000 (Rydberg) - NVT Potential energy : -16.105748 (Rydberg) - maxForce : +0.007343 - maxStep : +0.039821 - MD_STEP SystemE Conserved DeltaE Temperature - +1 -8.052874 -8.052874 +0.000000 +172.203317 + ><><><><><><><><><><><><><><><><><><><><><>< - PW ALGORITHM --------------- ION=+2 ELEC=+1 -------------------------------- - K-point CG iter num Time(Sec) - +1 +53.714286 +6.150000 + MD STRESS (KBAR) - Density error is +0.003432405487 + ><><><><><><><><><><><><><><><><><><><><><>< - PW ALGORITHM --------------- ION=+2 ELEC=+2 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.214286 +0.340000 + +5.471080 +0.000651 -0.003879 + +0.000651 +5.472481 -0.005115 + -0.003879 -0.005115 +5.481343 + nloc = +289 + searching radius is (Bohr)) = +18.890000 + searching radius unit is (Bohr)) = +1.889726 - Density error is +0.000062275134 + LCAO ALGORITHM ------------- MD = 2 ELEC = 1 -------------------------------- - PW ALGORITHM --------------- ION=+2 ELEC=+3 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.000000 +0.530000 + Density error is +0.010266517531 - Density error is +0.000015792053 + LCAO ALGORITHM ------------- MD = 2 ELEC = 2 -------------------------------- - PW ALGORITHM --------------- ION=+2 ELEC=+4 -------------------------------- - K-point CG iter num Time(Sec) - +1 +3.142857 +0.450000 + Density error is +0.002497371603 - Density error is +0.000001338459 + LCAO ALGORITHM ------------- MD = 2 ELEC = 3 -------------------------------- - PW ALGORITHM --------------- ION=+2 ELEC=+5 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.642857 +0.610000 + Density error is +0.001347922782 - Density error is +0.000000192378 + LCAO ALGORITHM ------------- MD = 2 ELEC = 4 -------------------------------- - PW ALGORITHM --------------- ION=+2 ELEC=+6 -------------------------------- - K-point CG iter num Time(Sec) - +1 +3.142857 +0.460000 + Density error is +0.000084761244 - Density error is +0.000000025550 + LCAO ALGORITHM ------------- MD = 2 ELEC = 5 -------------------------------- - PW ALGORITHM --------------- ION=+2 ELEC=+7 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.714286 +0.640000 + Density error is +0.000012263011 - Density error is +0.000000014039 + LCAO ALGORITHM ------------- MD = 2 ELEC = 6 -------------------------------- - PW ALGORITHM --------------- ION=+2 ELEC=+8 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.142857 +0.330000 + Density error is +0.000001314208 - Density error is +0.000000005006 + LCAO ALGORITHM ------------- MD = 2 ELEC = 7 -------------------------------- - PW ALGORITHM --------------- ION=+2 ELEC=+9 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.428571 +0.370000 + Density error is +0.000000452317 - Density error is +0.000000001075 + LCAO ALGORITHM ------------- MD = 2 ELEC = 8 -------------------------------- - PW ALGORITHM --------------- ION=+2 ELEC=+10 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.571429 +0.630000 + Density error is +0.000000076730 - Density error is +0.000000000036 + LCAO ALGORITHM ------------- MD = 2 ELEC = 9 -------------------------------- - charge density convergence is achieved - final etot is -219.440527700460 eV + Density error is +0.000000005728 + LCAO ALGORITHM ------------- MD = 2 ELEC = 10 -------------------------------- + Density error is +0.000000000431 + + charge density convergence is achieved + final etot is -219.492968914185 eV ><><><><><><><><><><><><><><><><><><><><><>< @@ -490,12 +458,12 @@ Kenetic Term is +0.000000 Kbar ><><><><><><><><><><><><><><><><><><><><><>< - atom x y z - H1 +1.004871 -1.739881 -2.441947 - H2 -3.252618 +0.393216 -0.201464 - H3 +1.449497 +2.920979 -0.074231 - H4 +0.723985 -1.478039 +2.737075 - C1 +0.074265 -0.096275 -0.019433 + atom x y z + H1 +0.49025494 -0.86039958 -1.20570083 + H2 -1.76382370 +0.18895466 -0.09843194 + H3 +0.72520265 +1.42096166 -0.01878483 + H4 +0.37884284 -0.78455333 +1.49561282 + C1 +0.16952328 +0.03503658 -0.17269523 ><><><><><><><><><><><><><><><><><><><><><>< @@ -504,113 +472,178 @@ Kenetic Term is +0.000000 Kbar ><><><><><><><><><><><><><><><><><><><><><>< - +8.239066 +0.040673 +0.022701 - +0.040673 +8.146118 -0.028152 - +0.022701 -0.028152 +8.029180 + +4.553376 -0.021360 +0.084915 + -0.021360 +4.214380 -0.113669 + +0.084915 -0.113669 +4.372736 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 1 + ------------------------------------------- output Pressure for check! -Virtual Pressure is +16.387160 Kbar -Virial Term is +16.276243 Kbar -Kenetic Term is +0.110917 Kbar +Virtual Pressure is +4.468046 Kbar +Virial Term is +4.380164 Kbar +Kenetic Term is +0.087882 Kbar + + + ><><><><><><><><><><><><><><><><><><><><><>< - -------------------------------------------------- - Molecular Dynamics (NVT) STEP 2 - -------------------------------------------------- --------------------------------------------------- - SUMMARY OF NVT CALCULATION - -------------------------------------------------- - NVT Conservation : -16.108578 (Rydberg) - NVT Temperature : +526.047604 (K) - NVT Kinetic energy : +0.019991 (Rydberg) - NVT Potential energy : -16.128576 (Rydberg) - maxForce : +0.004075 - maxStep : +0.098572 - MD_STEP SystemE Conserved DeltaE Temperature - +2 -8.064288 -8.054289 +0.000000 +1063.334415 + MD STRESS (KBAR) - PW ALGORITHM --------------- ION=+3 ELEC=+1 -------------------------------- - K-point CG iter num Time(Sec) - +1 +54.857143 +6.240000 + ><><><><><><><><><><><><><><><><><><><><><>< - Density error is +0.019351753103 + +4.628332 -0.038761 +0.085917 + -0.038761 +4.315308 -0.131320 + +0.085917 -0.131320 +4.460499 + nloc = +289 + searching radius is (Bohr)) = +18.890000 + searching radius unit is (Bohr)) = +1.889726 - PW ALGORITHM --------------- ION=+3 ELEC=+2 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.214286 +0.340000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 1 -------------------------------- - Density error is +0.000283196908 + Density error is +0.024594159592 - PW ALGORITHM --------------- ION=+3 ELEC=+3 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.071429 +0.550000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 2 -------------------------------- - Density error is +0.000097414254 + Density error is +0.005534035993 - PW ALGORITHM --------------- ION=+3 ELEC=+4 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.785714 +0.410000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 3 -------------------------------- - Density error is +0.000008367964 + Density error is +0.003088913442 - PW ALGORITHM --------------- ION=+3 ELEC=+5 -------------------------------- - K-point CG iter num Time(Sec) - +1 +3.857143 +0.540000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 4 -------------------------------- - Density error is +0.000001252601 + Density error is +0.000157548989 - PW ALGORITHM --------------- ION=+3 ELEC=+6 -------------------------------- - K-point CG iter num Time(Sec) - +1 +3.642857 +0.510000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 5 -------------------------------- - Density error is +0.000000066252 + Density error is +0.000009096313 - PW ALGORITHM --------------- ION=+3 ELEC=+7 -------------------------------- - K-point CG iter num Time(Sec) - +1 +5.071429 +0.670000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 6 -------------------------------- - Density error is +0.000000013589 + Density error is +0.000002928976 - PW ALGORITHM --------------- ION=+3 ELEC=+8 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.571429 +0.610000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 7 -------------------------------- - Density error is +0.000000024404 + Density error is +0.000001094513 - PW ALGORITHM --------------- ION=+3 ELEC=+9 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.000000 +0.320000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 8 -------------------------------- - Density error is +0.000000010839 + Density error is +0.000000078221 - PW ALGORITHM --------------- ION=+3 ELEC=+10 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.071429 +0.340000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 9 -------------------------------- - Density error is +0.000000002800 + Density error is +0.000000005822 - PW ALGORITHM --------------- ION=+3 ELEC=+11 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.000000 +0.550000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 10 -------------------------------- - Density error is +0.000000000052 + Density error is +0.000000000775 charge density convergence is achieved - final etot is -219.862433615028 eV + final etot is -219.608412824317 eV + + ><><><><><><><><><><><><><><><><><><><><><>< + + TOTAL-FORCE (eV/Angstrom) + + ><><><><><><><><><><><><><><><><><><><><><>< + + atom x y z + H1 +0.16002510 -0.30887491 -0.43098457 + H2 -0.83438114 +0.05437479 -0.02141281 + H3 +0.29374672 +0.52330577 +0.02732362 + H4 +0.14605261 -0.32566633 +0.68804044 + C1 +0.23455671 +0.05686068 -0.26296669 + + + ><><><><><><><><><><><><><><><><><><><><><>< + + TOTAL-STRESS (KBAR) + + ><><><><><><><><><><><><><><><><><><><><><>< + + +2.098185 +0.007527 +0.104271 + +0.007527 +1.613231 -0.120516 + +0.104271 -0.120516 +1.859916 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 2 + ------------------------------------------- +output Pressure for check! +Virtual Pressure is +2.031062 Kbar +Virial Term is +1.857111 Kbar +Kenetic Term is +0.173952 Kbar + ><><><><><><><><><><><><><><><><><><><><><>< + + MD STRESS (KBAR) + + ><><><><><><><><><><><><><><><><><><><><><>< + + +2.265906 -0.014782 +0.112736 + -0.014782 +1.796291 -0.144526 + +0.112736 -0.144526 +2.030990 + nloc = +289 + searching radius is (Bohr)) = +18.890000 + searching radius unit is (Bohr)) = +1.889726 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 1 -------------------------------- + + Density error is +0.022940518361 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 2 -------------------------------- + + Density error is +0.005222919162 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 3 -------------------------------- + + Density error is +0.002973846634 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 4 -------------------------------- + + Density error is +0.000161676383 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 5 -------------------------------- + + Density error is +0.000006384706 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 6 -------------------------------- + + Density error is +0.000002108229 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 7 -------------------------------- + + Density error is +0.000000600476 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 8 -------------------------------- + + Density error is +0.000000092867 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 9 -------------------------------- + + Density error is +0.000000005281 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 10 -------------------------------- + + Density error is +0.000000000291 + + charge density convergence is achieved + final etot is -219.633913127181 eV + ><><><><><><><><><><><><><><><><><><><><><>< TOTAL-FORCE (eV/Angstrom) ><><><><><><><><><><><><><><><><><><><><><>< - atom x y z - H1 +0.308191 -0.535728 -0.757725 - H2 -0.975237 +0.122318 -0.058835 - H3 +0.431328 +0.882198 -0.020974 - H4 +0.218386 -0.449293 +0.842665 - C1 +0.017332 -0.019495 -0.005131 + atom x y z + H1 -0.10149676 +0.12508314 +0.18002539 + H2 +0.00865439 -0.06285089 +0.05043301 + H3 -0.05771566 -0.19843987 +0.06496074 + H4 -0.05642669 +0.07369607 -0.02676084 + C1 +0.20698471 +0.06251155 -0.26865830 ><><><><><><><><><><><><><><><><><><><><><>< @@ -619,33 +652,33 @@ Kenetic Term is +0.110917 Kbar ><><><><><><><><><><><><><><><><><><><><><>< - +2.590889 -0.001256 -0.000685 - -0.001256 +2.591786 +0.001012 - -0.000685 +0.001012 +2.595960 + -0.161231 +0.065000 +0.065454 + +0.065000 -0.596004 -0.045760 + +0.065454 -0.045760 -0.344891 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 3 + ------------------------------------------- output Pressure for check! -Virtual Pressure is +5.870656 Kbar -Virial Term is +5.185757 Kbar -Kenetic Term is +0.684900 Kbar - - -------------------------------------------------- - Molecular Dynamics (NVT) STEP 3 - -------------------------------------------------- --------------------------------------------------- - SUMMARY OF NVT CALCULATION - -------------------------------------------------- - NVT Conservation : -16.111086 (Rydberg) - NVT Temperature : +1266.849197 (K) - NVT Kinetic energy : +0.048143 (Rydberg) - NVT Potential energy : -16.159585 (Rydberg) - maxForce : +0.000367 - maxStep : +0.114449 - MD_STEP SystemE Conserved DeltaE Temperature - +3 -8.079793 -8.055543 +0.000000 +1452.963348 +Virtual Pressure is -0.281288 Kbar +Virial Term is -0.367375 Kbar +Kenetic Term is +0.086088 Kbar + + + ><><><><><><><><><><><><><><><><><><><><><>< + + MD STRESS (KBAR) + + ><><><><><><><><><><><><><><><><><><><><><>< + + -0.072045 +0.056002 +0.072032 + +0.056002 -0.511726 -0.057839 + +0.072032 -0.057839 -0.260091 -------------------------------------------- - !FINAL_ETOT_IS -219.8624336150282090 eV + !FINAL_ETOT_IS -219.6339131271808753 eV -------------------------------------------- @@ -654,59 +687,84 @@ Kenetic Term is +0.684900 Kbar |CLASS_NAME---------|NAME---------------|TIME(Sec)-----|CALLS----|AVG------|PER%------- - total +67.074 15 +4.47 +100.00 % - Run_pw plane_wave_line +67.04 1 +67.04 +99.95 % - PW_Basis gen_pw +0.26 1 +0.26 +0.39 % - Run_MD_PW md_cells_pw +66.70 1 +66.70 +99.45 % - ppcell_vl init_vloc +0.12 1 +0.12 +0.18 % - Potential init_pot +0.46 4 +0.11 +0.68 % - FFT FFT3D +26.79 8433 +0.00 +39.94 % - Charge atomic_rho +0.12 7 +0.02 +0.18 % - Potential v_of_rho +3.52 36 +0.10 +5.25 % - H_XC_pw v_xc +3.31 39 +0.08 +4.93 % - H_Hartree_pw v_hartree +0.42 36 +0.01 +0.63 % - wavefunc wfcinit +1.06 4 +0.26 +1.58 % - pp_cell_vnl getvnl +0.15 42 +0.00 +0.22 % - Hamilt_PW diagH_subspace +3.50 36 +0.10 +5.21 % - Hamilt_PW h_psi +27.80 3259 +0.01 +41.45 % - Hamilt_PW vloc +25.80 3259 +0.01 +38.46 % - Hamilt_PW vnl +1.91 3259 +0.00 +2.85 % - Hamilt_PW add_nonlocal_pp +0.90 3259 +0.00 +1.35 % - Run_MD_PW md_ions_pw +66.15 1 +66.15 +98.63 % - Electrons self_consistent +62.27 3 +20.76 +92.84 % - Electrons c_bands +29.33 32 +0.92 +43.73 % - Hamilt diagH_pw +29.20 32 +0.91 +43.54 % - Diago_CG diag +26.09 34 +0.77 +38.90 % - Charge sum_band +2.94 32 +0.09 +4.38 % - Charge rho_mpi +1.08 32 +0.03 +1.61 % - Charge mix_rho +0.97 32 +0.03 +1.45 % - Forces cal_force_nl +0.24 3 +0.08 +0.36 % - Stress_PW cal_stress +1.94 3 +0.65 +2.89 % - Stress_Func stress_ew +22.20 2 +11.10 +33.10 % - Force_Func stress_ew +22.20 2 +11.10 +33.10 % - Stress_Func stress_gga +0.13 3 +0.04 +0.19 % - Stress_Func stres_nl +1.63 3 +0.54 +2.43 % + total +50.10576 11 +4.56 +100.00% + Run_lcao lcao_line +50.07728 1 +50.08 +99.94% + PW_Basis gen_pw +0.32423 1 +0.32 +0.65% + ORB_control set_orb_tables +1.00186 1 +1.00 +2.00% + ORB_gen_tables gen_tables +1.00186 1 +1.00 +2.00% + ORB_table_phi init_Table +0.62925 1 +0.63 +1.26% + ORB_table_phi cal_ST_Phi12_R +0.62412 126 +0.00 +1.25% + ORB_table_beta init_Table_Beta +0.22784 1 +0.23 +0.45% + ORB_table_beta VNL_PhiBeta_R +0.22637 56 +0.00 +0.45% + Potential init_pot +1.98120 8 +0.25 +3.95% + Potential set_local_pot +0.12809 8 +0.02 +0.26% + FFT FFT3D +8.39921 729 +0.01 +16.76% + Charge atomic_rho +0.18136 7 +0.03 +0.36% + Potential v_of_rho +11.06614 50 +0.22 +22.09% + XC_Functional v_xc +10.17416 54 +0.19 +20.31% + H_Hartree_pw v_hartree +1.55105 50 +0.03 +3.10% + Run_MD_LCAO opt_ions +48.33155 1 +48.33 +96.46% + NVT_NHC setup +13.23980 1 +13.24 +26.42% + MD_func force_stress +25.25482 2 +12.63 +50.40% + LOOP_elec solve_elec_stru +36.73914 4 +9.18 +73.32% + LOOP_elec set_matrix_grid +0.27334 4 +0.07 +0.55% + Grid_Technique init +0.27228 4 +0.07 +0.54% + Grid_BigCellgrid_expansion_index +0.17445 8 +0.02 +0.35% + LOOP_elec solver +36.46298 4 +9.12 +72.77% + ELEC_scf scf +36.46297 4 +9.12 +72.77% + ELEC_cbands_k cal_bands +13.00063 42 +0.31 +25.95% + Gint_k vlocal +5.98284 42 +0.14 +11.94% + Efficience each_k +6.96827 42 +0.17 +13.91% + Efficience H_k +6.91588 42 +0.16 +13.80% + LCAO_Hamilt calculate_Hk +6.91580 42 +0.16 +13.80% + Gint_k folding_vl_k +6.91479 42 +0.16 +13.80% + Gint_k Distri +6.91407 42 +0.16 +13.80% + Local_Orbital_Cha sum_bands +11.29601 42 +0.27 +22.54% + Gint_k cal_rho_k +5.36589 42 +0.13 +10.71% + Charge mix_rho +2.55638 42 +0.06 +5.10% + Force_Stress_LCAO getForceStress +10.60361 4 +2.65 +21.16% + Forces cal_force_loc +0.15708 4 +0.04 +0.31% + Stress_Func stress_loc +0.17575 4 +0.04 +0.35% + Stress_Func stress_har +0.14552 4 +0.04 +0.29% + Stress_Func stress_gga +0.41948 4 +0.10 +0.84% + Force_LCAO_k ftable_k +8.43132 4 +2.11 +16.83% + Force_LCAO_k cal_fvl_dphi_k +8.41336 4 +2.10 +16.79% + Gint_k svl_k_RealSpace +7.44687 4 +1.86 +14.86% + Gint_k evaluate_vl_force +0.94824 133427 +0.00 +1.89% + Gint_k evaluate_vl_stress +1.74281 133427 +0.00 +3.48% + Gint_k folding_force +4.25683 4 +1.06 +8.50% + MD_func md_force_stress +23.39869 2 +11.70 +46.70% ---------------------------------------------------------------------------------------- CLASS_NAME---------|NAME---------------|MEMORY(MB)-------- - +70.3196 - Charge_Pulay Rrho +13.1836 - Charge_Pulay dRrho +11.5356 - Charge_Pulay drho +11.5356 - Use_FFT porter +3.2959 - PW_Basis struc_fac +2.5457 - wavefunc evc +2.2321 - Charge rho +1.6479 - Charge rho_save +1.6479 - Charge rho_core +1.6479 - Potential vltot +1.6479 - Potential vr +1.6479 - Potential vr_eff +1.6479 - Potential vr_eff1 +1.6479 - Potential vnew +1.6479 - Charge_Pulay rho_save2 +1.6479 + +1164.1075 + ORB_table_phi Jl(x) +131.0928 + Charge_Pulay Rrho +26.3672 + Charge_Pulay dRrho +23.0713 + Charge_Pulay drho +23.0713 + Use_FFT porter +6.5918 + Grid_Meshcell index2normal +5.8017 + Grid_Meshcell index2ucell +5.8017 + PW_Basis struc_fac +5.0912 + ORB_table_phi Table_SR&TR +3.6736 + Charge rho +3.2959 + Charge rho_save +3.2959 + Charge rho_core +3.2959 + Potential vltot +3.2959 + Potential vr +3.2959 + Potential vr_eff +3.2959 + Potential vr_eff1 +3.2959 + Potential vnew +3.2959 + Charge_Pulay rho_save2 +3.2959 + init_meshball meshball_pos +2.1575 + Charge rhog +1.2728 + Charge rhog_save +1.2728 + Charge kin_r +1.2728 + Charge kin_r_save +1.2728 + Charge rhog_core +1.2728 + ORB_table_beta Table_NR +1.1560 ---------------------------------------------------------- - Start Time : Fri Nov 12 18:15:13 2021 - Finish Time : Fri Nov 12 18:16:20 2021 - Total Time : 0 h 1 mins 7 secs + Start Time : Sun Apr 17 15:10:23 2022 + Finish Time : Sun Apr 17 15:11:13 2022 + Total Time : 0 h 0 mins 50 secs diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/STRU b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/STRU index 9df80429c..4bf80593d 100644 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/STRU +++ b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000000/STRU @@ -15,11 +15,18 @@ Cartesian # Cartesian(Unit is LATTICE_CONSTANT) H 0.0 4 -5.097444375976 3.891293394194 3.462261233691 1 1 1 -3.796292512908 4.557084804487 4.168353214339 1 1 1 -5.223523410907 5.328269903334 4.206766613435 1 1 1 -5.007077103527 3.977914209143 5.081170168915 1 1 1 +5.113541511412 3.863321620159 3.422849404241 1 1 1 +3.744792402058 4.563437069250 4.165241539141 1 1 1 +5.246389147225 5.374789014111 4.205651315346 1 1 1 +5.018535899770 3.954367806503 5.125120082345 1 1 1 C 0.0 1 -4.779784174238 4.440311459394 4.230030312730 1 1 1 +4.780862617100 4.438958260529 4.229719202017 1 1 1 + +NUMERICAL_ORBITAL +H_gga_8au_60Ry_2s1p.orb +C_gga_8au_60Ry_2s2p1d.orb + +NUMERICAL_DESCRIPTOR +jle.orb diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/INPUT b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/INPUT index c3181c397..f38b2d7d0 100644 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/INPUT +++ b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/INPUT @@ -1,20 +1,17 @@ INPUT_PARAMETERS calculation md -atom_file STRU -kpoint_file KPT pseudo_dir ./ ntype 2 symmetry 1 ecutwfc 90 -npool 1 - mixing_type pulay mixing_beta 0.4 +basis_type lcao +md_nstep 3 +cal_stress 1 +deepks_model model.ptg -nstep 3 -force_thr_ev 0.02 -#move_method cg -out_stru 0 -stress 1 +md_tfirst 10 +md_tfreq 0.1 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/INPUT b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/INPUT deleted file mode 100644 index 63bd0ed40..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/INPUT +++ /dev/null @@ -1,263 +0,0 @@ -INPUT_PARAMETERS -#Parameters (1.General) -suffix ABACUS #the name of main output directory -latname test #the name of lattice name -atom_file STRU #the filename of file containing atom positions -kpoint_file KPT #the name of file containing k points -pseudo_dir .// #the directory containing pseudo files -orbital_dir #the directory containing orbital files -pseudo_type auto #the type pseudo files -pseudo_rcut 15 #cut-off radius for radial integration -renormwithmesh 0 #0: use our own mesh to do radial renormalization; 1: use mesh as in QE -lmaxmax 2 #maximum of l channels used -dft_functional none #exchange correlation functional -calculation md #test; scf; relax; nscf; ienvelope; istate; -ntype 2 #atom species number -nspin 1 #1: single spin; 2: up and down spin; 4: noncollinear spin -nbands 0 #number of bands -nbands_sto 0 #number of stochastic bands -nbands_istate 5 #number of bands around Fermi level for istate calulation -nche_sto 0 #number of orders for Chebyshev expansion in stochastic DFT -symmetry 0 #turn symmetry on or off -set_vel 0 #read velocity from STRU or not -symmetry_prec 1e-05 #accuracy for symmetry -nelec 0 #input number of electrons -tot_magnetization 0 #total magnetization of the system - -#Parameters (2.PW) -ecutwfc 90 ##energy cutoff for wave functions -diago_cg_maxiter 50 #max iteration number for cg -diago_cg_prec 1 #diago_cg_prec -ethr 0.01 #threshold for eigenvalues is cg electron iterations -dr2 1e-09 #charge density error -start_wfc atomic #start wave functions are from 'atomic' or 'file' -start_charge atomic #start charge is from 'atomic' or file -charge_extrap atomic #atomic; first-order; second-order; dm:coefficients of SIA -out_charge 0 #>0 output charge density for selected electron steps -out_potential 0 #output realspace potential -out_wf 0 #output wave functions -out_dos 0 #output energy and dos -out_band 0 #output energy and band structure -restart_save 0 #print to disk every step for restart -restart_load 0 #restart from disk -read_file_dir auto #directory of files for reading -nx 0 #number of points along x axis for FFT grid -ny 0 #number of points along y axis for FFT grid -nz 0 #number of points along z axis for FFT grid -cell_factor 1.2 #used in the construction of the pseudopotential tables - -#Parameters (3.Relaxation) -ks_solver cg #cg; dav; lapack; genelpa; hpseps; scalapack_gvx -niter 40 ##number of electron iterations -force_set 0 #output the force_set or not -nstep 3 #number of ion iteration steps -out_stru 0 #output the structure files after each ion step -force_thr 0.00077787 #force threshold, unit: Ry/Bohr -force_thr_ev 0.02 #force threshold, unit: eV/Angstrom -force_thr_ev2 0 #force invalid threshold, unit: eV/Angstrom -cg_threshold 0.5 #threshold for switching from cg to bfgs, unit: eV/Angstrom -stress_thr 0.01 #stress threshold -press1 0 #target pressure, unit: KBar -press2 0 #target pressure, unit: KBar -press3 0 #target pressure, unit: KBar -bfgs_w1 0.01 #wolfe condition 1 for bfgs -bfgs_w2 0.5 #wolfe condition 2 for bfgs -trust_radius_max 0.8 #maximal trust radius, unit: Bohr -trust_radius_min 1e-05 #minimal trust radius, unit: Bohr -trust_radius_ini 0.5 #initial trust radius, unit: Bohr -stress 1 #calculate the stress or not -fixed_axes None #which axes are fixed -move_method cg #bfgs; sd; cg; cg_bfgs; -out_level m #ie(for electrons); i(for ions); -out_dm 0 #>0 output density matrix -out_descriptor 0 #>0 compute descriptor for deepks -lmax_descriptor 2 #>0 lmax used in descriptor for deepks - -#Parameters (4.LCAO) -basis_type pw #PW; LCAO in pw; LCAO -new_dm 1 #Type of density matrix; 0: old 1: new -search_radius -1 #input search radius (Bohr) -search_pbc 1 #input periodic boundary condition -lcao_ecut 0 #energy cutoff for LCAO -lcao_dk 0.01 #delta k for 1D integration in LCAO -lcao_dr 0.01 #delta r for 1D integration in LCAO -lcao_rmax 30 #max R for 1D two-center integration table -out_hs 0 #output H and S matrix -out_hs2 0 #output H(R) and S(R) matrix -out_r 0 #output r(R) matrix -out_lowf 0 #ouput LCAO wave functions -bx 1 #division of an element grid in FFT grid along x -by 1 #division of an element grid in FFT grid along y -bz 1 #division of an element grid in FFT grid along z - -#Parameters (5.Smearing) -smearing fixed #type of smearing: gauss; fd; fixed; mp; mp2; mv -sigma 0.01 #energy range for smearing - -#Parameters (6.Charge Mixing) -mixing_type pulay #plain; kerker; pulay; pulay-kerker; broyden -mixing_beta 0.4 #mixing parameter: 0 means no new charge -mixing_ndim 8 #mixing dimension in pulay -mixing_gg0 0 #mixing parameter in kerker - -#Parameters (7.DOS) -dos_emin_ev -15 #minimal range for dos -dos_emax_ev 15 #maximal range for dos -dos_edelta_ev 0.01 #delta energy for dos -dos_scale 0.01 #scale dos range by -dos_sigma 0.07 #gauss b coefficeinet(default=0.07) - -#Parameters (8.Technique) -gamma_only 0 #gamma only, only used in LCAO basis -diago_proc 8 #number of proc used to diago -npool 1 #number of pools for k points, pw only -mem_saver 0 #memory saver for many k points used -printe 100 #print band energy for selectively ionic steps - -#Parameters (9.SIAO) -selinv_npole 40 #number of selected poles -selinv_temp 2000 #temperature for Fermi-Dirac distribution -selinv_gap 0 #supposed gap in the calculation -selinv_deltae 2 #expected energy range -selinv_mu -1 #chosen mu as Fermi energy -selinv_threshold 0.001 #threshold for calculated electron number -selinv_niter 50 #max number of steps to update mu - -#Parameters (10.Molecular dynamics) -md_mdtype 1 #choose ensemble -md_potential FP #choose potential -md_dt 1 #time step -mnhc 4 #number of Nose-Hoover chains -md_qmass 1 #mass of thermostat -md_tfirst 0 #temperature first -md_tlast 0 #temperature last -md_dumpmdfred 1 #The period to dump MD information for monitoring and restarting MD -md_mdoutpath mdoutput #output path of md -md_rstmd 0 #whether restart -md_fixtemperature 1 #period to change temperature -md_ediff 0.0001 #parameter for constraining total energy change -md_ediffg 0.001 #parameter for constraining max force change -NVT_tau 0 #parameter for adjust effect of thermostat -NVT_control 1 #choose which thermostat used in NVT ensemble -rcut_lj 8.5 #cutoff radius of LJ potential -epsilon_lj 0.01032 #the value of epsilon for LJ potential -sigma_lj 3.405 #the value of sigma for LJ potential - -#Parameters (11.Efield) -efield 0 #add electric field -edir 1 #add electric field -emaxpos 0.5 #maximal position of efield [0,1) -eopreg 0.1 #where sawlike potential decrease -eamp 0.001 #amplitute of the efield, unit is a.u. -eamp_v 0.05144 #amplitute of the efield, unit is V/A - -#Parameters (12.Test) -out_alllog 0 #output information for each processor, when parallel -nurse 0 #for coders -colour 0 #for coders, make their live colourful -t_in_h 1 #calculate the kinetic energy or not -vl_in_h 1 #calculate the local potential or not -vnl_in_h 1 #calculate the nonlocal potential or not -vh_in_h 1 #calculate the hartree potential or not -vxc_in_h 1 #calculate the xc potential or not -vion_in_h 1 #calculate the local ionic potential or not -test_force 0 #test the force -test_stress 0 #test the force - -#Parameters (13.Other Methods) -mlwf_flag 0 #turn MLWF on or off -opt_epsilon2 0 #calculate the dielectic function -opt_nbands 0 #number of bands for optical calculation - -#Parameters (14.VdW Correction) -vdw_method none #the method of calculating vdw (none ; d2 ; d3_0 ; d3_bj -vdw_s6 default #scale parameter of d2/d3_0/d3_bj -vdw_s8 default #scale parameter of d3_0/d3_bj -vdw_a1 default #damping parameter of d3_0/d3_bj -vdw_a2 default #damping parameter of d3_bj -vdw_d 20 #damping parameter of d2 -vdw_abc 0 #third-order term? -vdw_C6_file default #filename of C6 -vdw_C6_unit Jnm6/mol #unit of C6, Jnm6/mol or eVA6 -vdw_R0_file default #filename of R0 -vdw_R0_unit A #unit of R0, A or Bohr -vdw_model radius #expression model of periodic structure, radius or period -vdw_radius default #radius cutoff for periodic structure -vdw_radius_unit Bohr #unit of radius cutoff for periodic structure -vdw_cn_thr 40 #radius cutoff for cn -vdw_cn_thr_unit Bohr #unit of cn_thr, Bohr or Angstrom -vdw_period 3 3 3 #periods of periodic structure - -#Parameters (15.spectrum) -spectral_type None #the type of the calculated spectrum -spectral_method 0 #0: tddft(linear response) -kernel_type rpa #the kernel type: rpa, tdlda ... -eels_method 0 #0: hilbert_transform method; 1: standard method -absorption_method 0 #0: vasp's method 1: pwscf's method -system bulk #the calculate system -eta 0.05 #eta(Ry) -domega 0.01 #domega(Ry) -nomega 300 #nomega -ecut_chi 1 #the dimension of chi matrix -q_start 0.1 0.1 0.1 #the position of the first q point in direct coordinate -q_direction 1 0 0 #the q direction -nq 1 #the total number of qpoints for calculation -out_epsilon 1 #output epsilon or not -out_chi 0 #output chi or not -out_chi0 0 #output chi0 or not -fermi_level 0 #the change of the fermi_level(Ry) -coulomb_cutoff 0 # turn on the coulomb_cutoff or not -kmesh_interpolation 0 #calculting -qcar 0 0 0 #(unit: 2PI/lat0) -ocp 0 #change occupation or not -ocp_set none #set occupation -lcao_box 10 10 10 #the scale for searching the existence of the overlap - mulliken 0 # mulliken charge or not -intrasmear 0 #Eta -shift 0 #shift -metalcalc 0 #metal or not -eps_degauss 0.01 #degauss in calculating epsilon0 -noncolin 0 #using non-collinear-spin -lspinorb 0 #consider the spin-orbit interaction - -#Parameters (17.exx) -exx_hybrid_type no #no, hf, pbe0, hse or opt_orb -exx_hybrid_alpha 0.25 # -exx_hse_omega 0.11 # -exx_separate_loop 1 #0 or 1 -exx_hybrid_step 100 # -exx_lambda 0.3 # -exx_pca_threshold 0 # -exx_c_threshold 0 # -exx_v_threshold 0 # -exx_dm_threshold 0 # -exx_schwarz_threshold0 # -exx_cauchy_threshold0 # -exx_ccp_threshold 1e-08 # -exx_ccp_rmesh_times 10 # -exx_distribute_type htime #htime or kmeans1 or kmeans2 -exx_opt_orb_lmax 0 # -exx_opt_orb_ecut 0 # -exx_opt_orb_tolerence0 # - -#Parameters (17.tddft) -tddft 0 #calculate tddft or not -td_dr2 1e-09 #threshold for electronic iteration of tddft -td_dt 0.02 #time of ion step -td_force_dt 0.02 #time of force change -td_val_elec_01 1 #td_val_elec_01 -td_val_elec_02 1 #td_val_elec_02 -td_val_elec_03 1 #td_val_elec_03 -td_vext 0 #add extern potential or not -td_vext_dire 1 #extern potential direction -td_timescale 0.5 #extern potential td_timescale -td_vexttype 1 #extern potential type -td_vextout 0 #output extern potential or not -td_dipoleout 0 #output dipole or not - -#Parameters (18.berry_wannier) -berry_phase 0 #calculate berry phase or not -gdir 3 #calculate the polarization in the direction of the lattice std::vector -towannier90 0 #use wannier90 code interface or not -nnkpfile seedname.nnkp #the wannier90 code nnkp file name -wannier_spin up #calculate spin in wannier90 code interface diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/MD_dump b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/MD_dump new file mode 100644 index 000000000..69ea8143c --- /dev/null +++ b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/MD_dump @@ -0,0 +1,72 @@ +MDSTEP: 0 +LATTICE_CONSTANT: 1.889726125458 +LATTICE_VECTORS + 9.679120503366 0.000000000000 0.000000000000 + 0.064831950309 9.384493544041 0.000000000000 + 0.210894191441 -0.031988736496 9.460865078677 +VIRIAL (KBAR) + 5.640169039135 0.118557619965 0.100345423315 + 0.118557619965 5.482515827407 -0.147097161241 + 0.100345423315 -0.147097161241 5.095791410360 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 H 5.113130840122 3.868695648576 3.415487569497 0.600673184035 -1.059740442673 -1.418495993188 + 1 H 3.744651237763 4.563580660532 4.164111061024 -2.191135947068 0.245188540314 -0.119090216567 + 2 H 5.240406959488 5.372954887162 4.205693454922 0.970609293432 1.961304510034 -0.029986389419 + 3 H 5.018637879218 3.954691355167 5.129125905570 0.469126098480 -0.976170970669 1.745238499110 + 4 C 4.777789211889 4.437703391265 4.232924722816 0.150727371121 -0.170581637006 -0.177665899936 + + +MDSTEP: 1 +LATTICE_CONSTANT: 1.889726125458 +LATTICE_VECTORS + 9.679120503366 0.000000000000 0.000000000000 + 0.064831950309 9.384493544041 0.000000000000 + 0.210894191441 -0.031988736496 9.460865078677 +VIRIAL (KBAR) + 4.678551039909 0.065179656533 0.157649293879 + 0.065179656533 4.238967373425 -0.212375925046 + 0.157649293879 -0.212375925046 4.076335855843 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 H 5.119291530616 3.862413938554 3.408309247541 0.442095295825 -0.801587535162 -1.052519150428 + 1 H 3.737114387708 4.567707590805 4.158438789249 -1.844676097365 0.181666395548 -0.085358985581 + 2 H 5.244273865813 5.384140784850 4.201093321848 0.750707433879 1.480714365731 0.000930221355 + 3 H 5.021865320527 3.949477758617 5.135847806351 0.371343245256 -0.790918808758 1.452768625603 + 4 C 4.777309284031 4.437382986473 4.233825193810 0.280530122406 -0.069874417359 -0.315820710948 + + +MDSTEP: 2 +LATTICE_CONSTANT: 1.889726125458 +LATTICE_VECTORS + 9.679120503366 0.000000000000 0.000000000000 + 0.064831950309 9.384493544041 0.000000000000 + 0.210894191441 -0.031988736496 9.460865078677 +VIRIAL (KBAR) + 2.122225562381 0.032179859022 0.116764119158 + 0.032179859022 1.657347414425 -0.126403059763 + 0.116764119158 -0.126403059763 1.723459869010 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 H 5.129194979428 3.849057221794 3.391777932413 0.148698675982 -0.317989928108 -0.370018432200 + 1 H 3.712887215270 4.573278250279 4.152308702254 -0.854502702867 0.041198009333 -0.002061590459 + 2 H 5.254885802976 5.408420513347 4.196773592900 0.299717378039 0.540324762250 0.049085353741 + 3 H 5.028351577920 3.937225158159 5.155667664729 0.139991173922 -0.338641889018 0.665750409303 + 4 C 4.777076422524 4.437027033157 4.234426239844 0.266095474923 0.075109045543 -0.342755740386 + + +MDSTEP: 3 +LATTICE_CONSTANT: 1.889726125458 +LATTICE_VECTORS + 9.679120503366 0.000000000000 0.000000000000 + 0.064831950309 9.384493544041 0.000000000000 + 0.210894191441 -0.031988736496 9.460865078677 +VIRIAL (KBAR) + -0.221393607103 0.045650693865 0.032718214304 + 0.045650693865 -0.552324429324 0.014848809564 + 0.032718214304 0.014848809564 -0.370470671582 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 H 5.137770370778 3.836513194293 3.376448676476 -0.089449994948 0.074427957375 0.180006734252 + 1 H 3.687820381885 4.577748257190 4.147750331999 0.033387754857 -0.079840940835 0.073540843258 + 2 H 5.265244249465 5.430908724294 4.193982471445 -0.066296870019 -0.214350389585 0.086916875019 + 3 H 5.034322953422 3.925327003983 5.175896961997 -0.062788628675 0.059757319489 -0.037683225140 + 4 C 4.777089987303 4.436815862094 4.234631822357 0.185147738786 0.160006053556 -0.302781227389 + + diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/STRU_MD b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/STRU_MD deleted file mode 100644 index 10302ea51..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/STRU_MD +++ /dev/null @@ -1,27 +0,0 @@ -ATOMIC_SPECIES -H 1.008 H_ONCV_PBE-1.0.upf -C 12.01 C_ONCV_PBE-1.0.upf - -LATTICE_CONSTANT -1.88972612546 - -LATTICE_VECTORS -9.70691437102 0 0 #latvec1 --0.281382603073 9.68406871255 0 #latvec2 -0.158246266482 -0.163817668352 9.58297385826 #latvec3 - -ATOMIC_POSITIONS -Direct - -H #label -0 #magnetism -4 #number of atoms -0.535461381214 0.40022105074 0.350517908729 1 1 1 0 0 0 -0.384059480088 0.479432956913 0.433779873798 1 1 1 0 0 0 -0.553450272577 0.569838705306 0.439037455701 1 1 1 0 0 0 -0.521761060531 0.414199303256 0.541959017837 1 1 1 0 0 0 - -C #label -0 #magnetism -1 #number of atoms -0.498801629025 0.465841043252 0.44124373684 1 1 1 0 0 0 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/STRU_READIN_ADJUST.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/STRU_READIN_ADJUST.cif deleted file mode 100644 index 233b8c367..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/STRU_READIN_ADJUST.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.70691 -_cell_length_b 9.68815 -_cell_length_c 9.58568 -_cell_angle_alpha 91.0063 -_cell_angle_beta 89.0541 -_cell_angle_gamma 91.6643 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.53097 0.408053 0.361246 -H 0.398147 0.47768 0.434684 -H 0.54717 0.557856 0.43944 -H 0.51918 0.420134 0.530801 -C 0.498731 0.465842 0.441171 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_1.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_1.cif deleted file mode 100644 index 5a5b6ed05..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_1.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.70691 -_cell_length_b 9.68815 -_cell_length_c 9.58568 -_cell_angle_alpha 91.0063 -_cell_angle_beta 89.0541 -_cell_angle_gamma 91.6643 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.531666 0.406832 0.359568 -H 0.395926 0.477951 0.434543 -H 0.548145 0.559719 0.439384 -H 0.519578 0.419226 0.532529 -C 0.498744 0.465842 0.441183 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_2.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_2.cif deleted file mode 100644 index 898144995..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_2.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.70691 -_cell_length_b 9.68815 -_cell_length_c 9.58568 -_cell_angle_alpha 91.0063 -_cell_angle_beta 89.0541 -_cell_angle_gamma 91.6643 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.533403 0.403793 0.355398 -H 0.390433 0.478629 0.434192 -H 0.550578 0.564369 0.439236 -H 0.520575 0.416939 0.536854 -C 0.498773 0.465841 0.441212 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_3.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_3.cif deleted file mode 100644 index a10888c1f..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/md_pos_3.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.70691 -_cell_length_b 9.68815 -_cell_length_c 9.58568 -_cell_angle_alpha 91.0063 -_cell_angle_beta 89.0541 -_cell_angle_gamma 91.6643 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.535461 0.400221 0.350518 -H 0.384059 0.479433 0.43378 -H 0.55345 0.569839 0.439037 -H 0.521761 0.414199 0.541959 -C 0.498802 0.465841 0.441244 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/running_md.log b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/running_md.log index e60ae9ad2..48b0535ae 100644 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/running_md.log +++ b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/OUT.ABACUS/running_md.log @@ -6,8 +6,8 @@ Website: http://abacus.ustc.edu.cn/ Version: Parallel, in development - Processor Number is 8 - Start Time is Fri Nov 12 18:16:22 2021 + Processor Number is 4 + Start Time is Sun Apr 17 15:11:14 2022 ------------------------------------------------------------------------------------ @@ -18,7 +18,7 @@ orbital_dir = pseudo_type = auto DRANK = 1 - DSIZE = 8 + DSIZE = 4 DCOLOR = 1 GRANK = 1 GSIZE = 1 @@ -52,9 +52,8 @@ READING ATOM TYPE 1 atom label = H - L=0, number of zeta = 1 + L=0, number of zeta = 2 L=1, number of zeta = 1 - L=2, number of zeta = 1 number of atom for this type = 4 start magnetization = FALSE start magnetization = FALSE @@ -63,8 +62,8 @@ READING ATOM TYPE 2 atom label = C - L=0, number of zeta = 1 - L=1, number of zeta = 1 + L=0, number of zeta = 2 + L=1, number of zeta = 2 L=2, number of zeta = 1 number of atom for this type = 1 start magnetization = FALSE @@ -73,24 +72,28 @@ CARTESIAN COORDINATES ( UNIT = 1.88973 Bohr ). atom x y z mag vx vy vz - tauc_H1 5.09642839721 3.89243558658 3.46181024571 0 0 0 0 - tauc_H2 3.79915812176 4.55467455263 4.16556354192 0 0 0 0 - tauc_H3 5.22389947082 5.33033053366 4.21113724544 0 0 0 0 - tauc_H4 5.00541687456 3.98165554454 5.08665008197 0 0 0 0 - tauc_C1 4.77987185192 4.43897624107 4.22772783445 0 0 0 0 + tauc_H1 5.11313084012 3.86869564858 3.4154875695 0 0 0 0 + tauc_H2 3.74465123776 4.56358066053 4.16411106102 0 0 0 0 + tauc_H3 5.24040695949 5.37295488716 4.20569345492 0 0 0 0 + tauc_H4 5.01863787922 3.95469135517 5.12912590557 0 0 0 0 + tauc_C1 4.77778921189 4.43770339127 4.23292472282 0 0 0 0 + + READING ORBITAL FILE NAMES FOR LCAO + orbital file: H_gga_8au_60Ry_2s1p.orb + orbital file: C_gga_8au_60Ry_2s2p1d.orb - Volume (Bohr^3) = 6079.05350607 - Volume (A^3) = 900.821712756 + Volume (Bohr^3) = 5799.28146373 + Volume (A^3) = 859.363822953 Lattice vectors: (Cartesian coordinate: in unit of a_0) - +9.70691437102 +0 +0 - -0.281382603073 +9.68406871255 +0 - +0.158246266482 -0.163817668352 +9.58297385826 + +9.67912050337 +0 +0 + +0.0648319503089 +9.38449354404 +0 + +0.210894191441 -0.0319887364963 +9.46086507868 Reciprocal vectors: (Cartesian coordinate: in unit of 2 pi/a_0) - +0.103019349072 +0.00299335470133 -0.00165001629058 - -0 +0.10326238172 +0.0017652351819 - +0 -0 +0.104351740367 + +0.10331517204 -0.000713743801774 -0.0023054341492 + -0 +0.106558760503 +0.000360292645836 + +0 -0 +0.105698579536 @@ -117,10 +120,7 @@ Read in pseudopotential file is H_ONCV_PBE-1.0.upf pseudopotential type = NC - functional Ex = PBE - functional Ec = - functional GCEx = - functional GCEc = + exchange-correlation functional = PBE nonlocal core correction = 0 valence electrons = 1 lmax = 0 @@ -132,10 +132,7 @@ Read in pseudopotential file is C_ONCV_PBE-1.0.upf pseudopotential type = NC - functional Ex = PBE - functional Ec = - functional GCEx = - functional GCEc = + exchange-correlation functional = PBE nonlocal core correction = 0 valence electrons = 4 lmax = 1 @@ -146,7 +143,7 @@ L of projector = 1 L of projector = 1 initial pseudo atomic orbital number = 0 - NLOCAL = 45 + NLOCAL = 33 SETUP THE ELECTRONS NUMBER electron number of element H = 1 @@ -154,8 +151,10 @@ electron number of element C = 4 total electron number of element C = 4 occupied bands = 4 + NLOCAL = 33 NBANDS = 14 - DONE : SETUP UNITCELL Time : 0.070024178247 (SEC) + NBANDS = 14 + DONE : SETUP UNITCELL Time : 0.0380957610905 (SEC) @@ -190,7 +189,7 @@ KPOINTS DIRECT_X DIRECT_Y DIRECT_Z WEIGHT 1 0 0 0 2 - DONE : INIT K-POINTS Time : 0.0716588154319 (SEC) + DONE : INIT K-POINTS Time : 0.0397647852078 (SEC) @@ -213,167 +212,159 @@ SETUP THE PLANE WAVE BASIS energy cutoff for wavefunc (unit:Ry) = 90 - [fft grid for wave functions] = 120, 120, 120 - [fft grid for charge/potential] = 120, 120, 120 - [fft grid division] = 1, 1, 1 - [big fft grid for charge/potential] = 120, 120, 120 - nbxx = 216000 - nrxx = 216000 + [fft grid for wave functions] = 120, 108, 120 + [fft grid for charge/potential] = 120, 108, 120 + [fft grid division] = 2, 2, 2 + [big fft grid for charge/potential] = 60, 54, 60 + nbxx = 48600 + nrxx = 388800 SETUP PLANE WAVES FOR CHARGE/POTENTIAL - number of plane waves = 701419 - number of sticks = 9633 + number of plane waves = 668909 + number of sticks = 9299 SETUP PLANE WAVES FOR WAVE FUNCTIONS - number of plane waves = 87687 - number of sticks = 2409 + number of plane waves = 83591 + number of sticks = 2323 PARALLEL PW FOR CHARGE/POTENTIAL PROC COLUMNS(POT) PW - 1 1204 87678 - 2 1204 87678 - 3 1205 87677 - 4 1204 87678 - 5 1204 87677 - 6 1204 87677 - 7 1204 87677 - 8 1204 87677 + 1 2325 167228 + 2 2324 167226 + 3 2325 167228 + 4 2325 167227 --------------- sum ------------------- - 8 9633 701419 + 4 9299 668909 PARALLEL PW FOR WAVE FUNCTIONS PROC COLUMNS(W) PW - 1 300 10959 - 2 301 10962 - 3 303 10960 - 4 302 10960 - 5 303 10961 - 6 300 10961 - 7 301 10964 - 8 299 10960 + 1 585 20895 + 2 580 20900 + 3 576 20894 + 4 582 20902 --------------- sum ------------------- - 8 2409 87687 + 4 2323 83591 SETUP COORDINATES OF PLANE WAVES - number of total plane waves = 701419 + number of total plane waves = 668909 SETUP COORDINATES OF PLANE WAVES - number of |g| = 84378 - max |g| = 32.563923009 - min |g| = 0 - DONE : INIT PLANEWAVE Time : 0.350538940344 (SEC) + number of |g| = 159414 + max |g| = 32.5640532433 + min |g| = 0.0106798492305 + DONE : INIT PLANEWAVE Time : 0.489081679843 (SEC) - npwx = 10959 + DONE : INIT CHARGE Time : 0.770516367629 (SEC) - SETUP NONLOCAL PSEUDOPOTENTIALS IN PLANE WAVE BASIS - H non-local projectors: - projector 1 L=0 - projector 2 L=0 - C non-local projectors: - projector 1 L=0 - projector 2 L=0 - projector 3 L=1 - projector 4 L=1 - TOTAL NUMBER OF NONLOCAL PROJECTORS = 16 - DONE : LOCAL POTENTIAL Time : 4.32109053986 (SEC) + DONE : INIT POTENTIAL Time : 0.77587737795 (SEC) - Init Non-Local PseudoPotential table : - Init Non-Local-Pseudopotential done. - DONE : NON-LOCAL POTENTIAL Time : 4.32724457909 (SEC) - start_pot = atomic - DONE : INIT POTENTIAL Time : 4.80582 (SEC) - Make real space PAO into reciprocal space. - max mesh points in Pseudopotential = 601 - dq(describe PAO in reciprocal space) = 0.01 - max q = 1143 + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + | | + | Setup numerical orbitals: | + | This part setup: numerical atomic orbitals, non-local projectors | + | and neutral potential (1D). The atomic orbitals information | + | including the radius, angular momentum and zeta number. | + | The neutral potential is the sum of local part of pseudopotential | + | and potential given by atomic charge, they will cancel out beyond | + | a certain radius cutoff, because the Z/r character. | + | | + <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - number of pseudo atomic orbitals for H is 0 - number of pseudo atomic orbitals for C is 0 - DONE : INIT BASIS Time : 5.09354 (SEC) - ...............Nose-Hoover Chain parameter initialization............... - Temperature = 0 - Temperature2 = 0 - NHC frequency = 0.00120944 - NHC chain = 4 - Qmass = 1822.89 - ............................................................... - PW ALGORITHM --------------- ION= 1 ELEC= 1-------------------------------- - K-point CG iter num Time(Sec) - 1 9.785714 1.390000 - Density error is 0.942995755677 + SETUP ONE DIMENSIONAL ORBITALS/POTENTIAL + delta k (1/Bohr) = 0.01 + delta r (Bohr) = 0.01 + dr_uniform (Bohr) = 0.001 + rmax (Bohr) = 30 + kmesh = 953 + ORBITAL L N nr dr RCUT CHECK_UNIT NEW_UNIT + 1 0 0 801 0.01 8 1 1 + 2 0 1 801 0.01 8 1 1 + 3 1 0 801 0.01 8 1 1 + ORBITAL L N nr dr RCUT CHECK_UNIT NEW_UNIT + 1 0 0 801 0.01 8 1 1 + 2 0 1 801 0.01 8 1 1 + 3 1 0 801 0.01 8 1 1 + 4 1 1 801 0.01 8 1 1 + 5 2 0 801 0.01 8 1 1 + SET NONLOCAL PSEUDOPOTENTIAL PROJECTORS + SET NONLOCAL PSEUDOPOTENTIAL PROJECTORS + max number of nonlocal projetors among all species is 4 - PW ALGORITHM --------------- ION= 1 ELEC= 2-------------------------------- - K-point CG iter num Time(Sec) - 1 2.285714 0.410000 + SETUP THE TWO-CENTER INTEGRATION TABLES - Density error is 0.099685883319 + SETUP THE DIVISION OF H/S MATRIX + divide the H&S matrix using 2D block algorithms. + nb2d = 1 + trace_loc_row dimension = 33 + trace_loc_col dimension = 33 + nloc = 289 + init_chg = atomic + nloc = 289 + searching radius is (Bohr)) = 18.89 + searching radius unit is (Bohr)) = 1.88973 - PW ALGORITHM --------------- ION= 1 ELEC= 3-------------------------------- - K-point CG iter num Time(Sec) - 1 4.142857 0.650000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 1 -------------------------------- - Density error is 0.029031982042 + Density error is 0.368881208486 - PW ALGORITHM --------------- ION= 1 ELEC= 4-------------------------------- - K-point CG iter num Time(Sec) - 1 4.285714 0.660000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 2 -------------------------------- - Density error is 0.216126036110 + Density error is 0.143521022261 - PW ALGORITHM --------------- ION= 1 ELEC= 5-------------------------------- - K-point CG iter num Time(Sec) - 1 3.357143 0.540000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 3 -------------------------------- - Density error is 0.000141170928 + Density error is 0.0734754129089 - PW ALGORITHM --------------- ION= 1 ELEC= 6-------------------------------- - K-point CG iter num Time(Sec) - 1 7.357143 1.070000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 4 -------------------------------- - Density error is 0.000036712166 + Density error is 0.00483041498782 - PW ALGORITHM --------------- ION= 1 ELEC= 7-------------------------------- - K-point CG iter num Time(Sec) - 1 3.928571 0.680000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 5 -------------------------------- - Density error is 0.000012403136 + Density error is 0.00173364587612 - PW ALGORITHM --------------- ION= 1 ELEC= 8-------------------------------- - K-point CG iter num Time(Sec) - 1 4.642857 0.780000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 6 -------------------------------- - Density error is 0.000000169540 + Density error is 0.000105338925335 - PW ALGORITHM --------------- ION= 1 ELEC= 9-------------------------------- - K-point CG iter num Time(Sec) - 1 6.785714 1.080000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 7 -------------------------------- - Density error is 0.000000193385 + Density error is 6.47868339214e-05 - PW ALGORITHM --------------- ION= 1 ELEC= 10-------------------------------- - K-point CG iter num Time(Sec) - 1 4.000000 0.630000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 8 -------------------------------- - Density error is 0.000000002471 + Density error is 1.29512900158e-05 - PW ALGORITHM --------------- ION= 1 ELEC= 11-------------------------------- - K-point CG iter num Time(Sec) - 1 9.000000 1.160000 + LCAO ALGORITHM ------------- MD = 1 ELEC = 9 -------------------------------- - Density error is 0.000000000287 + Density error is 2.29689343972e-06 - charge density convergence is achieved - final etot is -219.132652714524 eV + LCAO ALGORITHM ------------- MD = 1 ELEC = 10 -------------------------------- + + Density error is 2.5633279263e-07 + + LCAO ALGORITHM ------------- MD = 1 ELEC = 11 -------------------------------- + Density error is 1.43568218115e-08 + LCAO ALGORITHM ------------- MD = 1 ELEC = 12 -------------------------------- + + Density error is 1.35671237418e-09 + + LCAO ALGORITHM ------------- MD = 1 ELEC = 13 -------------------------------- + + Density error is 6.32645823916e-10 + + charge density convergence is achieved + final etot is -219.420217336 eV ><><><><><><><><><><><><><><><><><><><><><>< @@ -382,11 +373,11 @@ ><><><><><><><><><><><><><><><><><><><><><>< atom x y z - H1 +1.427623 -2.413519 -3.360832 - H2 -4.528626 +0.554349 -0.282580 - H3 +1.865702 +3.772834 -0.111599 - H4 +0.916683 -1.897685 +3.461780 - C1 +0.318617 -0.015979 +0.293231 + H1 +0.60067315 -1.0597404 -1.4184959 + H2 -2.1911358 +0.24518852 -0.11909021 + H3 +0.97060923 +1.9613044 -0.029986387 + H4 +0.46912607 -0.97617091 +1.7452384 + C1 +0.15072736 -0.17058163 -0.17766589 ><><><><><><><><><><><><><><><><><><><><><>< @@ -395,88 +386,75 @@ ><><><><><><><><><><><><><><><><><><><><><>< - +10.529622 -0.107421 -0.098680 - -0.107421 +9.970420 +0.216130 - -0.098680 +0.216130 +9.886865 + +5.640169 +0.118558 +0.100345 + +0.118558 +5.482516 -0.147097 + +0.100345 -0.147097 +5.095791 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 0 + ------------------------------------------- output Pressure for check! -Virtual Pressure is +20.257937 Kbar -Virial Term is +20.257937 Kbar -Kenetic Term is +0.000000 Kbar +Virtual Pressure is +5.412585 Kbar +Virial Term is +5.406159 Kbar +Kenetic Term is +0.006426 Kbar - -------------------------------------------------- - Molecular Dynamics (NVT) STEP 1 - -------------------------------------------------- --------------------------------------------------- - SUMMARY OF NVT CALCULATION - -------------------------------------------------- - NVT Conservation : -16.105947 (Rydberg) - NVT Temperature : +0.000000 (K) - NVT Kinetic energy : +0.000000 (Rydberg) - NVT Potential energy : -16.105947 (Rydberg) - maxForce : +0.007902 - maxStep : +0.041308 - MD_STEP SystemE Conserved DeltaE Temperature - +1 -8.052974 -8.052974 +0.000000 +171.583724 - PW ALGORITHM --------------- ION=+2 ELEC=+1 -------------------------------- - K-point CG iter num Time(Sec) - +1 +54.428571 +6.400000 + ><><><><><><><><><><><><><><><><><><><><><>< - Density error is +0.003416963341 + MD STRESS (KBAR) - PW ALGORITHM --------------- ION=+2 ELEC=+2 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.214286 +0.340000 + ><><><><><><><><><><><><><><><><><><><><><>< - Density error is +0.000062315805 + +5.644951 +0.119420 +0.096309 + +0.119420 +5.485335 -0.151898 + +0.096309 -0.151898 +5.107470 + nloc = +289 + searching radius is (Bohr)) = +18.890000 + searching radius unit is (Bohr)) = +1.889726 - PW ALGORITHM --------------- ION=+2 ELEC=+3 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.071429 +0.560000 + LCAO ALGORITHM ------------- MD = 2 ELEC = 1 -------------------------------- - Density error is +0.000015787808 + Density error is +0.010170039282 - PW ALGORITHM --------------- ION=+2 ELEC=+4 -------------------------------- - K-point CG iter num Time(Sec) - +1 +3.357143 +0.480000 + LCAO ALGORITHM ------------- MD = 2 ELEC = 2 -------------------------------- - Density error is +0.000001288949 + Density error is +0.002452018621 - PW ALGORITHM --------------- ION=+2 ELEC=+5 -------------------------------- - K-point CG iter num Time(Sec) - +1 +5.500000 +0.750000 + LCAO ALGORITHM ------------- MD = 2 ELEC = 3 -------------------------------- - Density error is +0.000000182921 + Density error is +0.001326077736 - PW ALGORITHM --------------- ION=+2 ELEC=+6 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.857143 +0.420000 + LCAO ALGORITHM ------------- MD = 2 ELEC = 4 -------------------------------- - Density error is +0.000000016603 + Density error is +0.000080877382 - PW ALGORITHM --------------- ION=+2 ELEC=+7 -------------------------------- - K-point CG iter num Time(Sec) - +1 +5.285714 +0.700000 + LCAO ALGORITHM ------------- MD = 2 ELEC = 5 -------------------------------- - Density error is +0.000000011064 + Density error is +0.000010764553 - PW ALGORITHM --------------- ION=+2 ELEC=+8 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.000000 +0.330000 + LCAO ALGORITHM ------------- MD = 2 ELEC = 6 -------------------------------- - Density error is +0.000000004133 + Density error is +0.000001312821 - PW ALGORITHM --------------- ION=+2 ELEC=+9 -------------------------------- - K-point CG iter num Time(Sec) - +1 +3.214286 +0.470000 + LCAO ALGORITHM ------------- MD = 2 ELEC = 7 -------------------------------- - Density error is +0.000000000094 + Density error is +0.000000439436 - charge density convergence is achieved - final etot is -219.442104652403 eV + LCAO ALGORITHM ------------- MD = 2 ELEC = 8 -------------------------------- + + Density error is +0.000000075403 + + LCAO ALGORITHM ------------- MD = 2 ELEC = 9 -------------------------------- + Density error is +0.000000005627 + LCAO ALGORITHM ------------- MD = 2 ELEC = 10 -------------------------------- + + Density error is +0.000000000349 + + charge density convergence is achieved + final etot is -219.493805558154 eV ><><><><><><><><><><><><><><><><><><><><><>< @@ -484,12 +462,12 @@ Kenetic Term is +0.000000 Kbar ><><><><><><><><><><><><><><><><><><><><><>< - atom x y z - H1 +1.068960 -1.799542 -2.503128 - H2 -3.353024 +0.414117 -0.209592 - H3 +1.397261 +2.832427 -0.092488 - H4 +0.691597 -1.440532 +2.608917 - C1 +0.195206 -0.006470 +0.196291 + atom x y z + H1 +0.44209527 -0.80158748 -1.05251908 + H2 -1.84467598 +0.18166638 -0.08535898 + H3 +0.75070739 +1.48071427 +0.00093022 + H4 +0.37134322 -0.79091876 +1.45276853 + C1 +0.28053010 -0.06987441 -0.31582069 ><><><><><><><><><><><><><><><><><><><><><>< @@ -498,94 +476,165 @@ Kenetic Term is +0.000000 Kbar ><><><><><><><><><><><><><><><><><><><><><>< - +7.986919 -0.080516 -0.073538 - -0.080516 +7.635404 +0.126752 - -0.073538 +0.126752 +7.556286 + +4.678551 +0.065180 +0.157649 + +0.065180 +4.238967 -0.212376 + +0.157649 -0.212376 +4.076336 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 1 + ------------------------------------------- output Pressure for check! -Virtual Pressure is +15.557594 Kbar -Virial Term is +15.452406 Kbar -Kenetic Term is +0.105188 Kbar +Virtual Pressure is +4.417092 Kbar +Virial Term is +4.331285 Kbar +Kenetic Term is +0.085807 Kbar + + + ><><><><><><><><><><><><><><><><><><><><><>< + + MD STRESS (KBAR) + + ><><><><><><><><><><><><><><><><><><><><><>< - -------------------------------------------------- - Molecular Dynamics (NVT) STEP 2 - -------------------------------------------------- --------------------------------------------------- - SUMMARY OF NVT CALCULATION - -------------------------------------------------- - NVT Conservation : -16.108768 (Rydberg) - NVT Temperature : +524.091079 (K) - NVT Kinetic energy : +0.019916 (Rydberg) - NVT Potential energy : -16.128691 (Rydberg) - maxForce : +0.004333 - maxStep : +0.101848 - MD_STEP SystemE Conserved DeltaE Temperature - +2 -8.064346 -8.054384 +0.000000 +1059.261288 + +4.757573 +0.051454 +0.163158 + +0.051454 +4.341588 -0.234466 + +0.163158 -0.234466 +4.152114 + nloc = +289 + searching radius is (Bohr)) = +18.890000 + searching radius unit is (Bohr)) = +1.889726 - PW ALGORITHM --------------- ION=+3 ELEC=+1 -------------------------------- - K-point CG iter num Time(Sec) - +1 +56.071429 +6.530000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 1 -------------------------------- - Density error is +0.019256453110 + Density error is +0.024396996904 - PW ALGORITHM --------------- ION=+3 ELEC=+2 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.214286 +0.340000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 2 -------------------------------- - Density error is +0.000283272912 + Density error is +0.005495181923 - PW ALGORITHM --------------- ION=+3 ELEC=+3 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.214286 +0.570000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 3 -------------------------------- - Density error is +0.000097131520 + Density error is +0.003065556726 - PW ALGORITHM --------------- ION=+3 ELEC=+4 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.714286 +0.400000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 4 -------------------------------- - Density error is +0.000008019387 + Density error is +0.000166491682 - PW ALGORITHM --------------- ION=+3 ELEC=+5 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.642857 +0.630000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 5 -------------------------------- - Density error is +0.000001180377 + Density error is +0.000014950420 - PW ALGORITHM --------------- ION=+3 ELEC=+6 -------------------------------- - K-point CG iter num Time(Sec) - +1 +3.571429 +0.500000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 6 -------------------------------- - Density error is +0.000000049998 + Density error is +0.000003046118 - PW ALGORITHM --------------- ION=+3 ELEC=+7 -------------------------------- - K-point CG iter num Time(Sec) - +1 +5.500000 +0.740000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 7 -------------------------------- - Density error is +0.000000005236 + Density error is +0.000001175800 - PW ALGORITHM --------------- ION=+3 ELEC=+8 -------------------------------- - K-point CG iter num Time(Sec) - +1 +5.285714 +0.690000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 8 -------------------------------- - Density error is +0.000000019403 + Density error is +0.000000197098 - PW ALGORITHM --------------- ION=+3 ELEC=+9 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.571429 +0.390000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 9 -------------------------------- - Density error is +0.000000001790 + Density error is +0.000000007018 - PW ALGORITHM --------------- ION=+3 ELEC=+10 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.000000 +0.550000 + LCAO ALGORITHM ------------- MD = 3 ELEC = 10 -------------------------------- - Density error is +0.000000000200 + Density error is +0.000000000786 charge density convergence is achieved - final etot is -219.862372141037 eV + final etot is -219.607783910283 eV + + ><><><><><><><><><><><><><><><><><><><><><>< + + TOTAL-FORCE (eV/Angstrom) + + ><><><><><><><><><><><><><><><><><><><><><>< + + atom x y z + H1 +0.14869867 -0.31798991 -0.37001841 + H2 -0.85450265 +0.04119801 -0.00206159 + H3 +0.29971736 +0.54032473 +0.04908535 + H4 +0.13999116 -0.33864187 +0.66575037 + C1 +0.26609546 +0.07510904 -0.34275572 + + + ><><><><><><><><><><><><><><><><><><><><><>< + TOTAL-STRESS (KBAR) + + ><><><><><><><><><><><><><><><><><><><><><>< + + +2.122226 +0.032180 +0.116764 + +0.032180 +1.657347 -0.126403 + +0.116764 -0.126403 +1.723460 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 2 + ------------------------------------------- + +output Pressure for check! +Virtual Pressure is +2.005975 Kbar +Virial Term is +1.834344 Kbar +Kenetic Term is +0.171631 Kbar + + + ><><><><><><><><><><><><><><><><><><><><><>< + + MD STRESS (KBAR) + + ><><><><><><><><><><><><><><><><><><><><><>< + + +2.300863 +0.016677 +0.131929 + +0.016677 +1.845488 -0.157565 + +0.131929 -0.157565 +1.871574 + nloc = +289 + searching radius is (Bohr)) = +18.890000 + searching radius unit is (Bohr)) = +1.889726 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 1 -------------------------------- + + Density error is +0.022903825034 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 2 -------------------------------- + + Density error is +0.005231736899 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 3 -------------------------------- + + Density error is +0.002975059067 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 4 -------------------------------- + + Density error is +0.000173879669 + LCAO ALGORITHM ------------- MD = 4 ELEC = 5 -------------------------------- + + Density error is +0.000015476188 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 6 -------------------------------- + + Density error is +0.000002587975 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 7 -------------------------------- + + Density error is +0.000000853005 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 8 -------------------------------- + + Density error is +0.000000222683 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 9 -------------------------------- + + Density error is +0.000000006438 + + LCAO ALGORITHM ------------- MD = 4 ELEC = 10 -------------------------------- + + Density error is +0.000000000469 + + charge density convergence is achieved + final etot is -219.633022026645 eV ><><><><><><><><><><><><><><><><><><><><><>< @@ -593,12 +642,12 @@ Kenetic Term is +0.105188 Kbar ><><><><><><><><><><><><><><><><><><><><><>< - atom x y z - H1 +0.332157 -0.540133 -0.744680 - H2 -0.978294 +0.129701 -0.061949 - H3 +0.426044 +0.880050 -0.050137 - H4 +0.219024 -0.477786 +0.818662 - C1 +0.001069 +0.008168 +0.038104 + atom x y z + H1 -0.08944999 +0.07442795 +0.18000672 + H2 +0.03338775 -0.07984094 +0.07354084 + H3 -0.06629687 -0.21435038 +0.08691687 + H4 -0.06278862 +0.05975732 -0.03768322 + C1 +0.18514773 +0.16000604 -0.30278121 ><><><><><><><><><><><><><><><><><><><><><>< @@ -607,33 +656,33 @@ Kenetic Term is +0.105188 Kbar ><><><><><><><><><><><><><><><><><><><><><>< - +2.479531 -0.031426 -0.026005 - -0.031426 +2.489387 -0.034015 - -0.026005 -0.034015 +2.420180 + -0.221394 +0.045651 +0.032718 + +0.045651 -0.552324 +0.014849 + +0.032718 +0.014849 -0.370471 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 3 + ------------------------------------------- output Pressure for check! -Virtual Pressure is +5.575435 Kbar -Virial Term is +4.926065 Kbar -Kenetic Term is +0.649370 Kbar - - -------------------------------------------------- - Molecular Dynamics (NVT) STEP 3 - -------------------------------------------------- --------------------------------------------------- - SUMMARY OF NVT CALCULATION - -------------------------------------------------- - NVT Conservation : -16.111265 (Rydberg) - NVT Temperature : +1261.973956 (K) - NVT Kinetic energy : +0.047957 (Rydberg) - NVT Potential energy : -16.159581 (Rydberg) - maxForce : +0.000370 - maxStep : +0.117517 - MD_STEP SystemE Conserved DeltaE Temperature - +3 -8.079790 -8.055632 +0.000000 +1447.243804 +Virtual Pressure is -0.295464 Kbar +Virial Term is -0.381396 Kbar +Kenetic Term is +0.085933 Kbar + + + ><><><><><><><><><><><><><><><><><><><><><>< + + MD STRESS (KBAR) + + ><><><><><><><><><><><><><><><><><><><><><>< + + -0.125999 +0.039645 +0.041658 + +0.039645 -0.463775 +0.000327 + +0.041658 +0.000327 -0.296617 -------------------------------------------- - !FINAL_ETOT_IS -219.8623721410366443 eV + !FINAL_ETOT_IS -219.6330220266447668 eV -------------------------------------------- @@ -642,60 +691,91 @@ Kenetic Term is +0.649370 Kbar |CLASS_NAME---------|NAME---------------|TIME(Sec)-----|CALLS----|AVG------|PER%------- - total +75.201 15 +5.01 +100.00 % - Run_pw plane_wave_line +75.18 1 +75.18 +99.97 % - PW_Basis gen_pw +0.28 1 +0.28 +0.37 % - Run_MD_PW md_cells_pw +74.83 1 +74.83 +99.51 % - ppcell_vl init_vloc +3.95 1 +3.95 +5.25 % - Potential init_pot +0.79 4 +0.20 +1.05 % - FFT FFT3D +28.10 8433 +0.00 +37.37 % - Charge atomic_rho +2.57 7 +0.37 +3.42 % - Potential v_of_rho +3.44 34 +0.10 +4.57 % - H_XC_pw v_xc +3.23 37 +0.09 +4.29 % - H_Hartree_pw v_hartree +0.42 34 +0.01 +0.56 % - wavefunc wfcinit +1.09 4 +0.27 +1.45 % - pp_cell_vnl getvnl +0.15 40 +0.00 +0.20 % - Hamilt_PW diagH_subspace +3.43 34 +0.10 +4.56 % - Hamilt_PW h_psi +29.25 3312 +0.01 +38.89 % - Hamilt_PW vloc +26.78 3312 +0.01 +35.61 % - Hamilt_PW vnl +2.38 3312 +0.00 +3.16 % - Hamilt_PW add_nonlocal_pp +1.01 3312 +0.00 +1.34 % - Run_MD_PW md_ions_pw +70.11 1 +70.11 +93.22 % - Electrons self_consistent +60.10 3 +20.03 +79.92 % - Electrons c_bands +31.03 30 +1.03 +41.27 % - Hamilt diagH_pw +30.90 30 +1.03 +41.09 % - Diago_CG diag +27.87 32 +0.87 +37.06 % - Charge sum_band +2.85 30 +0.10 +3.79 % - Charge rho_mpi +1.04 30 +0.03 +1.39 % - Charge mix_rho +0.97 30 +0.03 +1.29 % - Forces cal_force_nl +0.24 3 +0.08 +0.32 % - Stress_PW cal_stress +3.15 3 +1.05 +4.19 % - Stress_Func stress_ew +22.56 2 +11.28 +29.99 % - Force_Func stress_ew +22.55 2 +11.28 +29.99 % - Stress_Func stress_gga +0.13 3 +0.04 +0.17 % - Stress_Func stress_loc +1.37 3 +0.46 +1.82 % - Stress_Func stres_nl +1.54 3 +0.51 +2.05 % + total +62.27030 11 +5.66 +100.00% + Run_lcao lcao_line +62.25252 1 +62.25 +99.97% + PW_Basis gen_pw +0.44186 1 +0.44 +0.71% + PW_complement setup_GVectors +0.13954 10 +0.01 +0.22% + mymath heapsort +0.11428 10 +0.01 +0.18% + PW_Basis setup_struc_factor +0.31476 4 +0.08 +0.51% + ORB_control read_orb_first +0.19407 1 +0.19 +0.31% + LCAO_Orbitals Read_Orbitals +0.19355 1 +0.19 +0.31% + NOrbital_Lm extra_uniform +0.11935 8 +0.01 +0.19% + ORB_control set_orb_tables +1.84065 1 +1.84 +2.96% + ORB_gen_tables gen_tables +1.84031 1 +1.84 +2.96% + ORB_table_phi init_Table +1.13995 1 +1.14 +1.83% + ORB_table_phi cal_ST_Phi12_R +1.04009 126 +0.01 +1.67% + ORB_table_beta init_Table_Beta +0.36249 1 +0.36 +0.58% + ORB_table_beta VNL_PhiBeta_R +0.33539 56 +0.01 +0.54% + ppcell_vl init_vloc +1.44213 1 +1.44 +2.32% + Potential init_pot +2.41092 8 +0.30 +3.87% + Potential set_local_pot +0.12279 8 +0.02 +0.20% + FFT FFT3D +7.96165 742 +0.01 +12.79% + Charge atomic_rho +3.71033 7 +0.53 +5.96% + Potential v_of_rho +10.44195 51 +0.20 +16.77% + XC_Functional v_xc +9.57496 55 +0.17 +15.38% + H_Hartree_pw v_hartree +1.48001 51 +0.03 +2.38% + Run_MD_LCAO opt_ions +57.14849 1 +57.15 +91.77% + NVT_NHC setup +15.41147 1 +15.41 +24.75% + MD_func force_stress +30.72345 2 +15.36 +49.34% + LOOP_elec solve_elec_stru +34.17038 4 +8.54 +54.87% + LOOP_elec set_matrix_grid +0.25548 4 +0.06 +0.41% + Grid_Technique init +0.25436 4 +0.06 +0.41% + Grid_BigCellgrid_expansion_index +0.16191 8 +0.02 +0.26% + LOOP_elec solver +33.91180 4 +8.48 +54.46% + ELEC_scf scf +33.91178 4 +8.48 +54.46% + ELEC_cbands_k cal_bands +12.25275 43 +0.28 +19.68% + Gint_k vlocal +5.51832 43 +0.13 +8.86% + Efficience each_k +6.68896 43 +0.16 +10.74% + Efficience H_k +6.63026 43 +0.15 +10.65% + LCAO_Hamilt calculate_Hk +6.63019 43 +0.15 +10.65% + Gint_k folding_vl_k +6.62916 43 +0.15 +10.65% + Gint_k Distri +6.62844 43 +0.15 +10.64% + Local_Orbital_Cha sum_bands +10.17155 43 +0.24 +16.33% + Gint_k cal_rho_k +4.81788 43 +0.11 +7.74% + Charge mix_rho +2.39378 43 +0.06 +3.84% + Force_Stress_LCAO getForceStress +19.05964 4 +4.76 +30.61% + Forces cal_force_loc +0.15309 4 +0.04 +0.25% + Stress_Func stress_loc +3.00556 4 +0.75 +4.83% + Stress_Func stress_har +0.13717 4 +0.03 +0.22% + Stress_Func stress_gga +0.37225 4 +0.09 +0.60% + Force_LCAO_k ftable_k +7.61660 4 +1.90 +12.23% + Force_LCAO_k cal_fvl_dphi_k +7.59900 4 +1.90 +12.20% + Gint_k svl_k_RealSpace +6.71052 4 +1.68 +10.78% + Gint_k evaluate_vl_force +0.84339 119664 +0.00 +1.35% + Gint_k evaluate_vl_stress +1.55075 119664 +0.00 +2.49% + Gint_k folding_force +3.87680 4 +0.97 +6.23% + MD_func md_force_stress +27.70880 2 +13.85 +44.50% ---------------------------------------------------------------------------------------- CLASS_NAME---------|NAME---------------|MEMORY(MB)-------- - +71.1170 - Charge_Pulay Rrho +13.1836 - Charge_Pulay dRrho +11.5356 - Charge_Pulay drho +11.5356 - Use_FFT porter +3.2959 - PW_Basis struc_fac +2.6757 - wavefunc evc +2.3411 - Charge rho +1.6479 - Charge rho_save +1.6479 - Charge rho_core +1.6479 - Potential vltot +1.6479 - Potential vr +1.6479 - Potential vr_eff +1.6479 - Potential vr_eff1 +1.6479 - Potential vnew +1.6479 - Charge_Pulay rho_save2 +1.6479 + +1147.8317 + ORB_table_phi Jl(x) +131.0928 + Charge_Pulay Rrho +23.7305 + Charge_Pulay dRrho +20.7642 + Charge_Pulay drho +20.7642 + Use_FFT porter +5.9326 + Grid_Meshcell index2normal +5.2972 + Grid_Meshcell index2ucell +5.2972 + PW_Basis struc_fac +5.1034 + ORB_table_phi Table_SR&TR +3.6736 + Charge rho +2.9663 + Charge rho_save +2.9663 + Charge rho_core +2.9663 + Potential vltot +2.9663 + Potential vr +2.9663 + Potential vr_eff +2.9663 + Potential vr_eff1 +2.9663 + Potential vnew +2.9663 + Charge_Pulay rho_save2 +2.9663 + init_meshball meshball_pos +1.9470 + Charge rhog +1.2758 + Charge rhog_save +1.2758 + Charge kin_r +1.2758 + Charge kin_r_save +1.2758 + Charge rhog_core +1.2758 + ORB_table_beta Table_NR +1.1560 ---------------------------------------------------------- - Start Time : Fri Nov 12 18:16:22 2021 - Finish Time : Fri Nov 12 18:17:37 2021 - Total Time : 0 h 1 mins 15 secs + Start Time : Sun Apr 17 15:11:14 2022 + Finish Time : Sun Apr 17 15:12:16 2022 + Total Time : 0 h 1 mins 2 secs diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/STRU b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/STRU index 07964f6fe..06d2a8533 100644 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/STRU +++ b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000001/STRU @@ -6,20 +6,27 @@ LATTICE_CONSTANT 1.8897261254578281 LATTICE_VECTORS -9.706914371019787 0.0 0.0 --0.2813826030727322 9.684068712553056 0.0 -0.1582462664821918 -0.16381766835153533 9.582973858264781 +9.37644206717057 0.0 0.0 +-0.014813577222070317 9.326697659660574 0.0 +-0.1523571207181622 -0.1557268613107592 9.522274826700935 ATOMIC_POSITIONS Cartesian # Cartesian(Unit is LATTICE_CONSTANT) H 0.0 4 -5.096428397218 3.892435586573 3.461810245711 1 1 1 -3.799158121761 4.554674552629 4.165563541923 1 1 1 -5.223899470809 5.330330533668 4.211137245440 1 1 1 -5.005416874557 3.981655544542 5.086650081968 1 1 1 +5.112066187378 3.862243345891 3.417909125283 1 1 1 +3.744498473484 4.562973797398 4.166757218402 1 1 1 +5.245366521375 5.379019566172 4.209449753704 1 1 1 +5.018512728297 3.953726845718 5.124105837070 1 1 1 C 0.0 1 -4.779871851926 4.438976241080 4.227727834445 1 1 1 +4.782575995526 4.437421837856 4.229112966039 1 1 1 + +NUMERICAL_ORBITAL +H_gga_8au_60Ry_2s1p.orb +C_gga_8au_60Ry_2s2p1d.orb + +NUMERICAL_DESCRIPTOR +jle.orb diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/INPUT b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/INPUT deleted file mode 100644 index c3181c397..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/INPUT +++ /dev/null @@ -1,20 +0,0 @@ -INPUT_PARAMETERS - -calculation md -atom_file STRU -kpoint_file KPT -pseudo_dir ./ -ntype 2 -symmetry 1 -ecutwfc 90 - -npool 1 - -mixing_type pulay -mixing_beta 0.4 - -nstep 3 -force_thr_ev 0.02 -#move_method cg -out_stru 0 -stress 1 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/INPUT b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/INPUT deleted file mode 100644 index 63bd0ed40..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/INPUT +++ /dev/null @@ -1,263 +0,0 @@ -INPUT_PARAMETERS -#Parameters (1.General) -suffix ABACUS #the name of main output directory -latname test #the name of lattice name -atom_file STRU #the filename of file containing atom positions -kpoint_file KPT #the name of file containing k points -pseudo_dir .// #the directory containing pseudo files -orbital_dir #the directory containing orbital files -pseudo_type auto #the type pseudo files -pseudo_rcut 15 #cut-off radius for radial integration -renormwithmesh 0 #0: use our own mesh to do radial renormalization; 1: use mesh as in QE -lmaxmax 2 #maximum of l channels used -dft_functional none #exchange correlation functional -calculation md #test; scf; relax; nscf; ienvelope; istate; -ntype 2 #atom species number -nspin 1 #1: single spin; 2: up and down spin; 4: noncollinear spin -nbands 0 #number of bands -nbands_sto 0 #number of stochastic bands -nbands_istate 5 #number of bands around Fermi level for istate calulation -nche_sto 0 #number of orders for Chebyshev expansion in stochastic DFT -symmetry 0 #turn symmetry on or off -set_vel 0 #read velocity from STRU or not -symmetry_prec 1e-05 #accuracy for symmetry -nelec 0 #input number of electrons -tot_magnetization 0 #total magnetization of the system - -#Parameters (2.PW) -ecutwfc 90 ##energy cutoff for wave functions -diago_cg_maxiter 50 #max iteration number for cg -diago_cg_prec 1 #diago_cg_prec -ethr 0.01 #threshold for eigenvalues is cg electron iterations -dr2 1e-09 #charge density error -start_wfc atomic #start wave functions are from 'atomic' or 'file' -start_charge atomic #start charge is from 'atomic' or file -charge_extrap atomic #atomic; first-order; second-order; dm:coefficients of SIA -out_charge 0 #>0 output charge density for selected electron steps -out_potential 0 #output realspace potential -out_wf 0 #output wave functions -out_dos 0 #output energy and dos -out_band 0 #output energy and band structure -restart_save 0 #print to disk every step for restart -restart_load 0 #restart from disk -read_file_dir auto #directory of files for reading -nx 0 #number of points along x axis for FFT grid -ny 0 #number of points along y axis for FFT grid -nz 0 #number of points along z axis for FFT grid -cell_factor 1.2 #used in the construction of the pseudopotential tables - -#Parameters (3.Relaxation) -ks_solver cg #cg; dav; lapack; genelpa; hpseps; scalapack_gvx -niter 40 ##number of electron iterations -force_set 0 #output the force_set or not -nstep 3 #number of ion iteration steps -out_stru 0 #output the structure files after each ion step -force_thr 0.00077787 #force threshold, unit: Ry/Bohr -force_thr_ev 0.02 #force threshold, unit: eV/Angstrom -force_thr_ev2 0 #force invalid threshold, unit: eV/Angstrom -cg_threshold 0.5 #threshold for switching from cg to bfgs, unit: eV/Angstrom -stress_thr 0.01 #stress threshold -press1 0 #target pressure, unit: KBar -press2 0 #target pressure, unit: KBar -press3 0 #target pressure, unit: KBar -bfgs_w1 0.01 #wolfe condition 1 for bfgs -bfgs_w2 0.5 #wolfe condition 2 for bfgs -trust_radius_max 0.8 #maximal trust radius, unit: Bohr -trust_radius_min 1e-05 #minimal trust radius, unit: Bohr -trust_radius_ini 0.5 #initial trust radius, unit: Bohr -stress 1 #calculate the stress or not -fixed_axes None #which axes are fixed -move_method cg #bfgs; sd; cg; cg_bfgs; -out_level m #ie(for electrons); i(for ions); -out_dm 0 #>0 output density matrix -out_descriptor 0 #>0 compute descriptor for deepks -lmax_descriptor 2 #>0 lmax used in descriptor for deepks - -#Parameters (4.LCAO) -basis_type pw #PW; LCAO in pw; LCAO -new_dm 1 #Type of density matrix; 0: old 1: new -search_radius -1 #input search radius (Bohr) -search_pbc 1 #input periodic boundary condition -lcao_ecut 0 #energy cutoff for LCAO -lcao_dk 0.01 #delta k for 1D integration in LCAO -lcao_dr 0.01 #delta r for 1D integration in LCAO -lcao_rmax 30 #max R for 1D two-center integration table -out_hs 0 #output H and S matrix -out_hs2 0 #output H(R) and S(R) matrix -out_r 0 #output r(R) matrix -out_lowf 0 #ouput LCAO wave functions -bx 1 #division of an element grid in FFT grid along x -by 1 #division of an element grid in FFT grid along y -bz 1 #division of an element grid in FFT grid along z - -#Parameters (5.Smearing) -smearing fixed #type of smearing: gauss; fd; fixed; mp; mp2; mv -sigma 0.01 #energy range for smearing - -#Parameters (6.Charge Mixing) -mixing_type pulay #plain; kerker; pulay; pulay-kerker; broyden -mixing_beta 0.4 #mixing parameter: 0 means no new charge -mixing_ndim 8 #mixing dimension in pulay -mixing_gg0 0 #mixing parameter in kerker - -#Parameters (7.DOS) -dos_emin_ev -15 #minimal range for dos -dos_emax_ev 15 #maximal range for dos -dos_edelta_ev 0.01 #delta energy for dos -dos_scale 0.01 #scale dos range by -dos_sigma 0.07 #gauss b coefficeinet(default=0.07) - -#Parameters (8.Technique) -gamma_only 0 #gamma only, only used in LCAO basis -diago_proc 8 #number of proc used to diago -npool 1 #number of pools for k points, pw only -mem_saver 0 #memory saver for many k points used -printe 100 #print band energy for selectively ionic steps - -#Parameters (9.SIAO) -selinv_npole 40 #number of selected poles -selinv_temp 2000 #temperature for Fermi-Dirac distribution -selinv_gap 0 #supposed gap in the calculation -selinv_deltae 2 #expected energy range -selinv_mu -1 #chosen mu as Fermi energy -selinv_threshold 0.001 #threshold for calculated electron number -selinv_niter 50 #max number of steps to update mu - -#Parameters (10.Molecular dynamics) -md_mdtype 1 #choose ensemble -md_potential FP #choose potential -md_dt 1 #time step -mnhc 4 #number of Nose-Hoover chains -md_qmass 1 #mass of thermostat -md_tfirst 0 #temperature first -md_tlast 0 #temperature last -md_dumpmdfred 1 #The period to dump MD information for monitoring and restarting MD -md_mdoutpath mdoutput #output path of md -md_rstmd 0 #whether restart -md_fixtemperature 1 #period to change temperature -md_ediff 0.0001 #parameter for constraining total energy change -md_ediffg 0.001 #parameter for constraining max force change -NVT_tau 0 #parameter for adjust effect of thermostat -NVT_control 1 #choose which thermostat used in NVT ensemble -rcut_lj 8.5 #cutoff radius of LJ potential -epsilon_lj 0.01032 #the value of epsilon for LJ potential -sigma_lj 3.405 #the value of sigma for LJ potential - -#Parameters (11.Efield) -efield 0 #add electric field -edir 1 #add electric field -emaxpos 0.5 #maximal position of efield [0,1) -eopreg 0.1 #where sawlike potential decrease -eamp 0.001 #amplitute of the efield, unit is a.u. -eamp_v 0.05144 #amplitute of the efield, unit is V/A - -#Parameters (12.Test) -out_alllog 0 #output information for each processor, when parallel -nurse 0 #for coders -colour 0 #for coders, make their live colourful -t_in_h 1 #calculate the kinetic energy or not -vl_in_h 1 #calculate the local potential or not -vnl_in_h 1 #calculate the nonlocal potential or not -vh_in_h 1 #calculate the hartree potential or not -vxc_in_h 1 #calculate the xc potential or not -vion_in_h 1 #calculate the local ionic potential or not -test_force 0 #test the force -test_stress 0 #test the force - -#Parameters (13.Other Methods) -mlwf_flag 0 #turn MLWF on or off -opt_epsilon2 0 #calculate the dielectic function -opt_nbands 0 #number of bands for optical calculation - -#Parameters (14.VdW Correction) -vdw_method none #the method of calculating vdw (none ; d2 ; d3_0 ; d3_bj -vdw_s6 default #scale parameter of d2/d3_0/d3_bj -vdw_s8 default #scale parameter of d3_0/d3_bj -vdw_a1 default #damping parameter of d3_0/d3_bj -vdw_a2 default #damping parameter of d3_bj -vdw_d 20 #damping parameter of d2 -vdw_abc 0 #third-order term? -vdw_C6_file default #filename of C6 -vdw_C6_unit Jnm6/mol #unit of C6, Jnm6/mol or eVA6 -vdw_R0_file default #filename of R0 -vdw_R0_unit A #unit of R0, A or Bohr -vdw_model radius #expression model of periodic structure, radius or period -vdw_radius default #radius cutoff for periodic structure -vdw_radius_unit Bohr #unit of radius cutoff for periodic structure -vdw_cn_thr 40 #radius cutoff for cn -vdw_cn_thr_unit Bohr #unit of cn_thr, Bohr or Angstrom -vdw_period 3 3 3 #periods of periodic structure - -#Parameters (15.spectrum) -spectral_type None #the type of the calculated spectrum -spectral_method 0 #0: tddft(linear response) -kernel_type rpa #the kernel type: rpa, tdlda ... -eels_method 0 #0: hilbert_transform method; 1: standard method -absorption_method 0 #0: vasp's method 1: pwscf's method -system bulk #the calculate system -eta 0.05 #eta(Ry) -domega 0.01 #domega(Ry) -nomega 300 #nomega -ecut_chi 1 #the dimension of chi matrix -q_start 0.1 0.1 0.1 #the position of the first q point in direct coordinate -q_direction 1 0 0 #the q direction -nq 1 #the total number of qpoints for calculation -out_epsilon 1 #output epsilon or not -out_chi 0 #output chi or not -out_chi0 0 #output chi0 or not -fermi_level 0 #the change of the fermi_level(Ry) -coulomb_cutoff 0 # turn on the coulomb_cutoff or not -kmesh_interpolation 0 #calculting -qcar 0 0 0 #(unit: 2PI/lat0) -ocp 0 #change occupation or not -ocp_set none #set occupation -lcao_box 10 10 10 #the scale for searching the existence of the overlap - mulliken 0 # mulliken charge or not -intrasmear 0 #Eta -shift 0 #shift -metalcalc 0 #metal or not -eps_degauss 0.01 #degauss in calculating epsilon0 -noncolin 0 #using non-collinear-spin -lspinorb 0 #consider the spin-orbit interaction - -#Parameters (17.exx) -exx_hybrid_type no #no, hf, pbe0, hse or opt_orb -exx_hybrid_alpha 0.25 # -exx_hse_omega 0.11 # -exx_separate_loop 1 #0 or 1 -exx_hybrid_step 100 # -exx_lambda 0.3 # -exx_pca_threshold 0 # -exx_c_threshold 0 # -exx_v_threshold 0 # -exx_dm_threshold 0 # -exx_schwarz_threshold0 # -exx_cauchy_threshold0 # -exx_ccp_threshold 1e-08 # -exx_ccp_rmesh_times 10 # -exx_distribute_type htime #htime or kmeans1 or kmeans2 -exx_opt_orb_lmax 0 # -exx_opt_orb_ecut 0 # -exx_opt_orb_tolerence0 # - -#Parameters (17.tddft) -tddft 0 #calculate tddft or not -td_dr2 1e-09 #threshold for electronic iteration of tddft -td_dt 0.02 #time of ion step -td_force_dt 0.02 #time of force change -td_val_elec_01 1 #td_val_elec_01 -td_val_elec_02 1 #td_val_elec_02 -td_val_elec_03 1 #td_val_elec_03 -td_vext 0 #add extern potential or not -td_vext_dire 1 #extern potential direction -td_timescale 0.5 #extern potential td_timescale -td_vexttype 1 #extern potential type -td_vextout 0 #output extern potential or not -td_dipoleout 0 #output dipole or not - -#Parameters (18.berry_wannier) -berry_phase 0 #calculate berry phase or not -gdir 3 #calculate the polarization in the direction of the lattice std::vector -towannier90 0 #use wannier90 code interface or not -nnkpfile seedname.nnkp #the wannier90 code nnkp file name -wannier_spin up #calculate spin in wannier90 code interface diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/STRU_MD b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/STRU_MD deleted file mode 100644 index f42357382..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/STRU_MD +++ /dev/null @@ -1,27 +0,0 @@ -ATOMIC_SPECIES -H 1.008 H_ONCV_PBE-1.0.upf -C 12.01 C_ONCV_PBE-1.0.upf - -LATTICE_CONSTANT -1.88972612546 - -LATTICE_VECTORS -9.27069258481 0 0 #latvec1 -0.0128238456952 9.56209520274 0 #latvec2 -0.169560774735 -0.0300305282636 9.58609795568 #latvec3 - -ATOMIC_POSITIONS -Direct - -H #label -0 #magnetism -4 #number of atoms -0.547461705223 0.400166750312 0.349585199322 1 1 1 0 0 0 -0.387154932277 0.478943964961 0.433851040704 1 1 1 0 0 0 -0.560703231408 0.571623190735 0.438580636423 1 1 1 0 0 0 -0.532932139137 0.411873023092 0.541312594704 1 1 1 0 0 0 - -C #label -0 #magnetism -1 #number of atoms -0.507726212428 0.465642779417 0.440714011322 1 1 1 0 0 0 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/STRU_READIN_ADJUST.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/STRU_READIN_ADJUST.cif deleted file mode 100644 index 6d8352991..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/STRU_READIN_ADJUST.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.27069 -_cell_length_b 9.5621 -_cell_length_c 9.58764 -_cell_angle_alpha 90.1781 -_cell_angle_beta 88.9867 -_cell_angle_gamma 89.9232 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.542192 0.408202 0.360768 -H 0.401673 0.477208 0.434698 -H 0.554241 0.559124 0.439031 -H 0.529933 0.417895 0.530426 -C 0.507735 0.465662 0.44058 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_1.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_1.cif deleted file mode 100644 index bd632634b..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_1.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.27069 -_cell_length_b 9.5621 -_cell_length_c 9.58764 -_cell_angle_alpha 90.1781 -_cell_angle_beta 88.9867 -_cell_angle_gamma 89.9232 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.543005 0.406936 0.359006 -H 0.399395 0.477474 0.434569 -H 0.555241 0.561082 0.43897 -H 0.530384 0.416975 0.532107 -C 0.507737 0.465659 0.440603 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_2.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_2.cif deleted file mode 100644 index 724fd225e..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_2.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.27069 -_cell_length_b 9.5621 -_cell_length_c 9.58764 -_cell_angle_alpha 90.1781 -_cell_angle_beta 88.9867 -_cell_angle_gamma 89.9232 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.545037 0.403807 0.354649 -H 0.393743 0.47814 0.434243 -H 0.55774 0.565945 0.438806 -H 0.53153 0.414656 0.536324 -C 0.507736 0.465651 0.440656 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_3.cif b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_3.cif deleted file mode 100644 index 659d52e66..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/md_pos_3.cif +++ /dev/null @@ -1,24 +0,0 @@ -data_test - -_audit_creation_method generated by ABACUS - -_cell_length_a 9.27069 -_cell_length_b 9.5621 -_cell_length_c 9.58764 -_cell_angle_alpha 90.1781 -_cell_angle_beta 88.9867 -_cell_angle_gamma 89.9232 - -_symmetry_space_group_name_H-M -_symmetry_Int_Tables_number - -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -H 0.547462 0.400167 0.349585 -H 0.387155 0.478944 0.433851 -H 0.560703 0.571623 0.438581 -H 0.532932 0.411873 0.541313 -C 0.507726 0.465643 0.440714 diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/running_md.log b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/running_md.log deleted file mode 100644 index 2a1ad64a8..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/OUT.ABACUS/running_md.log +++ /dev/null @@ -1,701 +0,0 @@ - - WELCOME TO ABACUS - - 'Atomic-orbital Based Ab-initio Computation at UStc' - - Website: http://abacus.ustc.edu.cn/ - - Version: Parallel, in development - Processor Number is 8 - Start Time is Fri Nov 12 18:17:38 2021 - - ------------------------------------------------------------------------------------ - - READING GENERAL INFORMATION - global_out_dir = OUT.ABACUS/ - global_in_card = INPUT - pseudo_dir = - orbital_dir = - pseudo_type = auto - DRANK = 1 - DSIZE = 8 - DCOLOR = 1 - GRANK = 1 - GSIZE = 1 - - - - - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - | | - | Reading atom information in unitcell: | - | From the input file and the structure file we know the number of | - | different elments in this unitcell, then we list the detail | - | information for each element, especially the zeta and polar atomic | - | orbital number for each element. The total atom number is counted. | - | We calculate the nearest atom distance for each atom and show the | - | Cartesian and Direct coordinates for each atom. We list the file | - | address for atomic orbitals. The volume and the lattice vectors | - | in real and reciprocal space is also shown. | - | | - <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - - - - READING UNITCELL INFORMATION - ntype = 2 - atom label for species 1 = H - atom label for species 2 = C - lattice constant (Bohr) = 1.88973 - lattice constant (Angstrom) = 1 - - READING ATOM TYPE 1 - atom label = H - L=0, number of zeta = 1 - L=1, number of zeta = 1 - L=2, number of zeta = 1 - number of atom for this type = 4 - start magnetization = FALSE - start magnetization = FALSE - start magnetization = FALSE - start magnetization = FALSE - - READING ATOM TYPE 2 - atom label = C - L=0, number of zeta = 1 - L=1, number of zeta = 1 - L=2, number of zeta = 1 - number of atom for this type = 1 - start magnetization = FALSE - - TOTAL ATOM NUMBER = 5 - - CARTESIAN COORDINATES ( UNIT = 1.88973 Bohr ). - atom x y z mag vx vy vz - tauc_H1 5.09290605164 3.89242871555 3.45835777937 0 0 0 0 - tauc_H2 3.80361094208 4.55005711875 4.16705754763 0 0 0 0 - tauc_H3 5.21981288147 5.33321039636 4.20859510266 0 0 0 0 - tauc_H4 5.00814830724 3.9800234484 5.08471194545 0 0 0 0 - tauc_C1 4.78773457902 4.43947390549 4.22344175994 0 0 0 0 - - - Volume (Bohr^3) = 5734.60762332 - Volume (A^3) = 849.780160031 - - Lattice vectors: (Cartesian coordinate: in unit of a_0) - +9.27069258481 +0 +0 - +0.0128238456952 +9.56209520274 +0 - +0.169560774735 -0.0300305282636 +9.58609795568 - Reciprocal vectors: (Cartesian coordinate: in unit of 2 pi/a_0) - +0.107866806158 -0.000144661525376 -0.001908422339 - -0 +0.104579590435 +0.000327618219725 - +0 +0 +0.104317732264 - - - - - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - | | - | Reading pseudopotentials files: | - | The pseudopotential file is in UPF format. The 'NC' indicates that | - | the type of pseudopotential is 'norm conserving'. Functional of | - | exchange and correlation is decided by 4 given parameters in UPF | - | file. We also read in the 'core correction' if there exists. | - | Also we can read the valence electrons number and the maximal | - | angular momentum used in this pseudopotential. We also read in the | - | trail wave function, trail atomic density and local-pseudopotential| - | on logrithmic grid. The non-local pseudopotential projector is also| - | read in if there is any. | - | | - <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - - - - PAO radial cut off (Bohr) = 15 - - Read in pseudopotential file is H_ONCV_PBE-1.0.upf - pseudopotential type = NC - functional Ex = PBE - functional Ec = - functional GCEx = - functional GCEc = - nonlocal core correction = 0 - valence electrons = 1 - lmax = 0 - number of zeta = 0 - number of projectors = 2 - L of projector = 0 - L of projector = 0 - PAO radial cut off (Bohr) = 15 - - Read in pseudopotential file is C_ONCV_PBE-1.0.upf - pseudopotential type = NC - functional Ex = PBE - functional Ec = - functional GCEx = - functional GCEc = - nonlocal core correction = 0 - valence electrons = 4 - lmax = 1 - number of zeta = 0 - number of projectors = 4 - L of projector = 0 - L of projector = 0 - L of projector = 1 - L of projector = 1 - initial pseudo atomic orbital number = 0 - NLOCAL = 45 - - SETUP THE ELECTRONS NUMBER - electron number of element H = 1 - total electron number of element H = 4 - electron number of element C = 4 - total electron number of element C = 4 - occupied bands = 4 - NBANDS = 14 - DONE : SETUP UNITCELL Time : 0.0822040801286 (SEC) - - - - - - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - | | - | Setup K-points | - | We setup the k-points according to input parameters. | - | The reduced k-points are set according to symmetry operations. | - | We treat the spin as another set of k-points. | - | | - <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - - - - - SETUP K-POINTS - nspin = 1 - Input type of k points = Monkhorst-Pack(Gamma) - nkstot = 1 - - KPOINTS DIRECT_X DIRECT_Y DIRECT_Z WEIGHT - 1 0 0 0 1 - - k-point number in this process = 1 - minimum distributed K point number = 1 - - KPOINTS CARTESIAN_X CARTESIAN_Y CARTESIAN_Z WEIGHT - 1 0 0 0 2 - - KPOINTS DIRECT_X DIRECT_Y DIRECT_Z WEIGHT - 1 0 0 0 2 - DONE : INIT K-POINTS Time : 0.0836835908704 (SEC) - - - - - - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - | | - | Setup plane waves: | - | Use the energy cutoff and the lattice vectors to generate the | - | dimensions of FFT grid. The number of FFT grid on each processor | - | is 'nrxx'. The number of plane wave basis in reciprocal space is | - | different for charege/potential and wave functions. We also set | - | the 'sticks' for the parallel of FFT. | - | | - <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - - - - - SETUP THE PLANE WAVE BASIS - energy cutoff for wavefunc (unit:Ry) = 90 - [fft grid for wave functions] = 108, 120, 120 - [fft grid for charge/potential] = 108, 120, 120 - [fft grid division] = 1, 1, 1 - [big fft grid for charge/potential] = 108, 120, 120 - nbxx = 194400 - nrxx = 194400 - - SETUP PLANE WAVES FOR CHARGE/POTENTIAL - number of plane waves = 661353 - number of sticks = 9057 - - SETUP PLANE WAVES FOR WAVE FUNCTIONS - number of plane waves = 82689 - number of sticks = 2267 - - PARALLEL PW FOR CHARGE/POTENTIAL - PROC COLUMNS(POT) PW - 1 1132 82670 - 2 1132 82669 - 3 1132 82669 - 4 1132 82669 - 5 1132 82669 - 6 1132 82669 - 7 1133 82669 - 8 1132 82669 - --------------- sum ------------------- - 8 9057 661353 - - PARALLEL PW FOR WAVE FUNCTIONS - PROC COLUMNS(W) PW - 1 284 10334 - 2 283 10336 - 3 283 10338 - 4 281 10335 - 5 285 10338 - 6 285 10336 - 7 282 10334 - 8 284 10338 - --------------- sum ------------------- - 8 2267 82689 - - SETUP COORDINATES OF PLANE WAVES - number of total plane waves = 661353 - - SETUP COORDINATES OF PLANE WAVES - number of |g| = 79694 - max |g| = 32.5641662388 - min |g| = 0 - DONE : INIT PLANEWAVE Time : 0.336783995619 (SEC) - - npwx = 10334 - - SETUP NONLOCAL PSEUDOPOTENTIALS IN PLANE WAVE BASIS - H non-local projectors: - projector 1 L=0 - projector 2 L=0 - C non-local projectors: - projector 1 L=0 - projector 2 L=0 - projector 3 L=1 - projector 4 L=1 - TOTAL NUMBER OF NONLOCAL PROJECTORS = 16 - DONE : LOCAL POTENTIAL Time : 4.04769805988 (SEC) - - - Init Non-Local PseudoPotential table : - Init Non-Local-Pseudopotential done. - DONE : NON-LOCAL POTENTIAL Time : 4.05365722452 (SEC) - - start_pot = atomic - DONE : INIT POTENTIAL Time : 4.48892 (SEC) - - - Make real space PAO into reciprocal space. - max mesh points in Pseudopotential = 601 - dq(describe PAO in reciprocal space) = 0.01 - max q = 1143 - - number of pseudo atomic orbitals for H is 0 - - number of pseudo atomic orbitals for C is 0 - DONE : INIT BASIS Time : 4.74304 (SEC) - - ...............Nose-Hoover Chain parameter initialization............... - Temperature = 0 - Temperature2 = 0 - NHC frequency = 0.00120944 - NHC chain = 4 - Qmass = 1822.89 - ............................................................... - - PW ALGORITHM --------------- ION= 1 ELEC= 1-------------------------------- - K-point CG iter num Time(Sec) - 1 10.000000 1.100000 - - Density error is 0.960510453558 - - PW ALGORITHM --------------- ION= 1 ELEC= 2-------------------------------- - K-point CG iter num Time(Sec) - 1 2.285714 0.310000 - - Density error is 0.098733734228 - - PW ALGORITHM --------------- ION= 1 ELEC= 3-------------------------------- - K-point CG iter num Time(Sec) - 1 4.071429 0.500000 - - Density error is 0.029156016548 - - PW ALGORITHM --------------- ION= 1 ELEC= 4-------------------------------- - K-point CG iter num Time(Sec) - 1 3.714286 0.450000 - - Density error is 0.157357850345 - - PW ALGORITHM --------------- ION= 1 ELEC= 5-------------------------------- - K-point CG iter num Time(Sec) - 1 3.142857 0.390000 - - Density error is 0.000022976111 - - PW ALGORITHM --------------- ION= 1 ELEC= 6-------------------------------- - K-point CG iter num Time(Sec) - 1 8.785714 0.970000 - - Density error is 0.000027903812 - - PW ALGORITHM --------------- ION= 1 ELEC= 7-------------------------------- - K-point CG iter num Time(Sec) - 1 4.357143 0.530000 - - Density error is 0.000007318066 - - PW ALGORITHM --------------- ION= 1 ELEC= 8-------------------------------- - K-point CG iter num Time(Sec) - 1 5.000000 0.590000 - - Density error is 0.000000148874 - - PW ALGORITHM --------------- ION= 1 ELEC= 9-------------------------------- - K-point CG iter num Time(Sec) - 1 6.428571 0.730000 - - Density error is 0.000000001372 - - PW ALGORITHM --------------- ION= 1 ELEC= 10-------------------------------- - K-point CG iter num Time(Sec) - 1 7.714286 0.860000 - - Density error is 0.000000001003 - - PW ALGORITHM --------------- ION= 1 ELEC= 11-------------------------------- - K-point CG iter num Time(Sec) - 1 7.785714 0.880000 - - Density error is 0.000000000059 - - charge density convergence is achieved - final etot is -219.118728218927 eV - - - - ><><><><><><><><><><><><><><><><><><><><><>< - - TOTAL-FORCE (eV/Angstrom) - - ><><><><><><><><><><><><><><><><><><><><><>< - - atom x y z - H1 +1.508322 -2.517782 -3.530747 - H2 -4.418462 +0.530736 -0.259007 - H3 +1.940423 +3.914120 -0.121649 - H4 +0.930235 -1.848593 +3.369226 - C1 +0.039482 -0.078480 +0.542177 - - - ><><><><><><><><><><><><><><><><><><><><><>< - - TOTAL-STRESS (KBAR) - - ><><><><><><><><><><><><><><><><><><><><><>< - - +11.019212 -0.012921 -0.249753 - -0.012921 +10.888803 +0.464085 - -0.249753 +0.464085 +10.579625 - -output Pressure for check! -Virtual Pressure is +21.658426 Kbar -Virial Term is +21.658426 Kbar -Kenetic Term is +0.000000 Kbar - - -------------------------------------------------- - Molecular Dynamics (NVT) STEP 1 - -------------------------------------------------- --------------------------------------------------- - SUMMARY OF NVT CALCULATION - -------------------------------------------------- - NVT Conservation : -16.104924 (Rydberg) - NVT Temperature : +0.000000 (K) - NVT Kinetic energy : +0.000000 (Rydberg) - NVT Potential energy : -16.104924 (Rydberg) - maxForce : +0.007972 - maxStep : +0.041509 - MD_STEP SystemE Conserved DeltaE Temperature - +1 -8.052462 -8.052462 +0.000000 +175.027577 - - PW ALGORITHM --------------- ION=+2 ELEC=+1 -------------------------------- - K-point CG iter num Time(Sec) - +1 +55.142857 +5.680000 - - Density error is +0.003488598323 - - PW ALGORITHM --------------- ION=+2 ELEC=+2 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.214286 +0.300000 - - Density error is +0.000064088512 - - PW ALGORITHM --------------- ION=+2 ELEC=+3 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.071429 +0.480000 - - Density error is +0.000016147980 - - PW ALGORITHM --------------- ION=+2 ELEC=+4 -------------------------------- - K-point CG iter num Time(Sec) - +1 +3.214286 +0.410000 - - Density error is +0.000001278683 - - PW ALGORITHM --------------- ION=+2 ELEC=+5 -------------------------------- - K-point CG iter num Time(Sec) - +1 +5.071429 +0.600000 - - Density error is +0.000000184850 - - PW ALGORITHM --------------- ION=+2 ELEC=+6 -------------------------------- - K-point CG iter num Time(Sec) - +1 +3.214286 +0.410000 - - Density error is +0.000000013531 - - PW ALGORITHM --------------- ION=+2 ELEC=+7 -------------------------------- - K-point CG iter num Time(Sec) - +1 +5.285714 +0.610000 - - Density error is +0.000000010165 - - PW ALGORITHM --------------- ION=+2 ELEC=+8 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.000000 +0.290000 - - Density error is +0.000000003623 - - PW ALGORITHM --------------- ION=+2 ELEC=+9 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.928571 +0.370000 - - Density error is +0.000000000004 - - charge density convergence is achieved - final etot is -219.434191715312 eV - - - - ><><><><><><><><><><><><><><><><><><><><><>< - - TOTAL-FORCE (eV/Angstrom) - - ><><><><><><><><><><><><><><><><><><><><><>< - - atom x y z - H1 +1.133157 -1.856662 -2.608308 - H2 -3.288841 +0.401876 -0.196306 - H3 +1.454909 +2.915560 -0.103398 - H4 +0.716634 -1.407419 +2.547272 - C1 -0.015860 -0.053356 +0.360740 - - - ><><><><><><><><><><><><><><><><><><><><><>< - - TOTAL-STRESS (KBAR) - - ><><><><><><><><><><><><><><><><><><><><><>< - - +8.401340 -0.025640 -0.170148 - -0.025640 +8.286073 +0.280673 - -0.170148 +0.280673 +8.068639 - -output Pressure for check! -Virtual Pressure is +16.617778 Kbar -Virial Term is +16.504034 Kbar -Kenetic Term is +0.113744 Kbar - - -------------------------------------------------- - Molecular Dynamics (NVT) STEP 2 - -------------------------------------------------- --------------------------------------------------- - SUMMARY OF NVT CALCULATION - -------------------------------------------------- - NVT Conservation : -16.107810 (Rydberg) - NVT Temperature : +533.989848 (K) - NVT Kinetic energy : +0.020293 (Rydberg) - NVT Potential energy : -16.128110 (Rydberg) - maxForce : +0.004362 - maxStep : +0.102614 - MD_STEP SystemE Conserved DeltaE Temperature - +2 -8.064055 -8.053905 +0.000000 +1078.821137 - - PW ALGORITHM --------------- ION=+3 ELEC=+1 -------------------------------- - K-point CG iter num Time(Sec) - +1 +53.785714 +5.530000 - - Density error is +0.019612648889 - - PW ALGORITHM --------------- ION=+3 ELEC=+2 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.214286 +0.300000 - - Density error is +0.000290072895 - - PW ALGORITHM --------------- ION=+3 ELEC=+3 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.142857 +0.490000 - - Density error is +0.000099169017 - - PW ALGORITHM --------------- ION=+3 ELEC=+4 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.714286 +0.350000 - - Density error is +0.000008092362 - - PW ALGORITHM --------------- ION=+3 ELEC=+5 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.428571 +0.530000 - - Density error is +0.000001211193 - - PW ALGORITHM --------------- ION=+3 ELEC=+6 -------------------------------- - K-point CG iter num Time(Sec) - +1 +3.357143 +0.420000 - - Density error is +0.000000051304 - - PW ALGORITHM --------------- ION=+3 ELEC=+7 -------------------------------- - K-point CG iter num Time(Sec) - +1 +5.500000 +0.630000 - - Density error is +0.000000007503 - - PW ALGORITHM --------------- ION=+3 ELEC=+8 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.857143 +0.580000 - - Density error is +0.000000014633 - - PW ALGORITHM --------------- ION=+3 ELEC=+9 -------------------------------- - K-point CG iter num Time(Sec) - +1 +2.214286 +0.300000 - - Density error is +0.000000002243 - - PW ALGORITHM --------------- ION=+3 ELEC=+10 -------------------------------- - K-point CG iter num Time(Sec) - +1 +4.142857 +0.500000 - - Density error is +0.000000000398 - - charge density convergence is achieved - final etot is -219.861273145100 eV - - - - ><><><><><><><><><><><><><><><><><><><><><>< - - TOTAL-FORCE (eV/Angstrom) - - ><><><><><><><><><><><><><><><><><><><><><>< - - atom x y z - H1 +0.370637 -0.522900 -0.745579 - H2 -0.985036 +0.136881 -0.067108 - H3 +0.457129 +0.867257 -0.061860 - H4 +0.261706 -0.471416 +0.808625 - C1 -0.104436 -0.009822 +0.065922 - - - ><><><><><><><><><><><><><><><><><><><><><>< - - TOTAL-STRESS (KBAR) - - ><><><><><><><><><><><><><><><><><><><><><>< - - +2.700073 -0.048954 -0.024676 - -0.048954 +2.601966 -0.047102 - -0.024676 -0.047102 +2.553528 - -output Pressure for check! -Virtual Pressure is +5.938130 Kbar -Virial Term is +5.237045 Kbar -Kenetic Term is +0.701085 Kbar - - -------------------------------------------------- - Molecular Dynamics (NVT) STEP 3 - -------------------------------------------------- --------------------------------------------------- - SUMMARY OF NVT CALCULATION - -------------------------------------------------- - NVT Conservation : -16.110343 (Rydberg) - NVT Temperature : +1283.993234 (K) - NVT Kinetic energy : +0.048794 (Rydberg) - NVT Potential energy : -16.159500 (Rydberg) - maxForce : +0.000376 - maxStep : +0.119327 - MD_STEP SystemE Conserved DeltaE Temperature - +3 -8.079750 -8.055171 +0.000000 +1471.487172 - - - -------------------------------------------- - !FINAL_ETOT_IS -219.8612731451002276 eV - -------------------------------------------- - - - - - - - |CLASS_NAME---------|NAME---------------|TIME(Sec)-----|CALLS----|AVG------|PER%------- - total +68.402 15 +4.56 +100.00 % - Run_pw plane_wave_line +68.38 1 +68.38 +99.97 % - PW_Basis gen_pw +0.25 1 +0.25 +0.37 % - Run_MD_PW md_cells_pw +68.05 1 +68.05 +99.48 % - ppcell_vl init_vloc +3.69 1 +3.69 +5.39 % - Potential init_pot +0.71 4 +0.18 +1.04 % - FFT FFT3D +23.26 8449 +0.00 +34.00 % - Charge atomic_rho +2.26 7 +0.32 +3.31 % - Potential v_of_rho +3.00 34 +0.09 +4.38 % - H_XC_pw v_xc +2.82 37 +0.08 +4.13 % - H_Hartree_pw v_hartree +0.36 34 +0.01 +0.53 % - wavefunc wfcinit +0.99 4 +0.25 +1.44 % - pp_cell_vnl getvnl +0.14 40 +0.00 +0.20 % - Hamilt_PW diagH_subspace +2.84 34 +0.08 +4.15 % - Hamilt_PW h_psi +24.69 3320 +0.01 +36.09 % - Hamilt_PW vloc +22.48 3320 +0.01 +32.86 % - Hamilt_PW vnl +2.12 3320 +0.00 +3.10 % - Hamilt_PW add_nonlocal_pp +0.94 3320 +0.00 +1.37 % - Run_MD_PW md_ions_pw +63.66 1 +63.66 +93.06 % - Electrons self_consistent +54.24 3 +18.08 +79.30 % - Electrons c_bands +26.27 30 +0.88 +38.41 % - Hamilt diagH_pw +26.15 30 +0.87 +38.23 % - Diago_CG diag +23.65 32 +0.74 +34.57 % - Charge sum_band +2.40 30 +0.08 +3.50 % - Charge rho_mpi +0.91 30 +0.03 +1.33 % - Charge mix_rho +0.81 30 +0.03 +1.18 % - Forces cal_force_nl +0.22 3 +0.07 +0.33 % - Stress_PW cal_stress +3.14 3 +1.05 +4.59 % - Stress_Func stress_ew +20.85 2 +10.42 +30.48 % - Force_Func stress_ew +20.85 2 +10.42 +30.48 % - Stress_Func stress_gga +0.12 3 +0.04 +0.17 % - Stress_Func stress_loc +1.30 3 +0.43 +1.91 % - Stress_Func stres_nl +1.62 3 +0.54 +2.36 % - ---------------------------------------------------------------------------------------- - - CLASS_NAME---------|NAME---------------|MEMORY(MB)-------- - +64.7285 - Charge_Pulay Rrho +11.8652 - Charge_Pulay dRrho +10.3821 - Charge_Pulay drho +10.3821 - Use_FFT porter +2.9663 - PW_Basis struc_fac +2.5229 - wavefunc evc +2.2076 - Charge rho +1.4832 - Charge rho_save +1.4832 - Charge rho_core +1.4832 - Potential vltot +1.4832 - Potential vr +1.4832 - Potential vr_eff +1.4832 - Potential vr_eff1 +1.4832 - Potential vnew +1.4832 - Charge_Pulay rho_save2 +1.4832 - ---------------------------------------------------------- - - Start Time : Fri Nov 12 18:17:38 2021 - Finish Time : Fri Nov 12 18:18:46 2021 - Total Time : 0 h 1 mins 8 secs diff --git a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/STRU b/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/STRU deleted file mode 100644 index 8bc79faf7..000000000 --- a/tests/data/out_data_02_md_abacus/02.md/sys-0004-0001/scale-0.950/000002/STRU +++ /dev/null @@ -1,25 +0,0 @@ -ATOMIC_SPECIES -H 1.008 H_ONCV_PBE-1.0.upf -C 12.010 C_ONCV_PBE-1.0.upf - -LATTICE_CONSTANT -1.8897261254578281 - -LATTICE_VECTORS -9.270692584805424 0.0 0.0 -0.01282384569524753 9.562095202737858 0.0 -0.16956077473517553 -0.030030528263640357 9.586097955682344 - -ATOMIC_POSITIONS -Cartesian # Cartesian(Unit is LATTICE_CONSTANT) -H -0.0 -4 -5.092906051636 3.892428715541 3.458357779363 1 1 1 -3.803610942086 4.550057118756 4.167057547630 1 1 1 -5.219812881472 5.333210396361 4.208595102670 1 1 1 -5.008148307232 3.980023448407 5.084711945455 1 1 1 -C -0.0 -1 -4.787734579020 4.439473905493 4.223441759937 1 1 1 diff --git a/tests/data/test_coll_abacus.py b/tests/data/test_coll_abacus.py index 6a73b7233..feabec88d 100644 --- a/tests/data/test_coll_abacus.py +++ b/tests/data/test_coll_abacus.py @@ -19,11 +19,11 @@ def setUp(self): if os.path.isdir(self.odir) : shutil.rmtree(self.odir) shutil.copytree('out_data_02_md_abacus', self.odir) - self.ref_coord = np.reshape(np.genfromtxt("abacus.out/coord.raw"), [9, 5, 3]) - self.ref_cell = np.reshape(np.genfromtxt("abacus.out/box.raw"), [9, 3, 3]) - self.ref_e = np.reshape(np.genfromtxt("abacus.out/energy.raw"), [9, ]) - self.ref_f = np.reshape(np.genfromtxt("abacus.out/force.raw"), [9, 5, 3]) - self.ref_v = np.reshape(np.genfromtxt("abacus.out/virial.raw"), [9, 3, 3]) + self.ref_coord = np.reshape(np.genfromtxt("abacus.out/coord.raw"), [8, 5, 3]) + self.ref_cell = np.reshape(np.genfromtxt("abacus.out/box.raw"), [8, 3, 3]) + self.ref_e = np.reshape(np.genfromtxt("abacus.out/energy.raw"), [8, ]) + self.ref_f = np.reshape(np.genfromtxt("abacus.out/force.raw"), [8, 5, 3]) + self.ref_v = np.reshape(np.genfromtxt("abacus.out/virial.raw"), [8, 3, 3]) def tearDown(self): #print("escape.") shutil.rmtree(self.odir) @@ -37,18 +37,18 @@ def test_coll(self): coll_abacus_md(jdata) sys = dpdata.LabeledSystem(self.odir + '/02.md/sys-0004-0001/deepmd//', fmt = 'deepmd/raw') - self.assertEqual(sys.get_nframes(), 9) + self.assertEqual(sys.get_nframes(), 8) - for ff in range(9) : + for ff in range(8) : self.assertAlmostEqual(self.ref_e[ff], sys.data['energies'][ff]) - for ff in range(9) : + for ff in range(8) : for ii in range(5) : for dd in range(3) : self.assertAlmostEqual(self.ref_coord[ff][ii][dd], sys.data['coords'][ff][ii][dd]) self.assertAlmostEqual(self.ref_f[ff][ii][dd], sys.data['forces'][ff][ii][dd]) - for ff in range(9): + for ff in range(8): for ii in range(3) : for jj in range(3) : self.assertAlmostEqual(self.ref_v[ff][ii][jj], diff --git a/tests/generator/param-methane-abacus.json b/tests/generator/param-methane-abacus.json index ab8c4d34e..e9fb42cff 100644 --- a/tests/generator/param-methane-abacus.json +++ b/tests/generator/param-methane-abacus.json @@ -133,7 +133,6 @@ "fp_pp_path": ".", "fp_pp_files": [ "./H_HSCV_PBE-1.0.UPF","./C_HSCV_PBE-1.0.UPF"], "user_fp_params":{ - "lattice_constant":1, "ntype": 2, "ecutwfc": 80, "dr2": 1e-7, diff --git a/tests/generator/test_make_fp.py b/tests/generator/test_make_fp.py index 8158888f8..f706d8ea4 100644 --- a/tests/generator/test_make_fp.py +++ b/tests/generator/test_make_fp.py @@ -156,8 +156,8 @@ dr2 1.000000e-07\n\ niter 50\n\ basis_type pw\n\ -dft_functional pbe\n\ gamma_only 1\n\ +dft_functional pbe\n\ mixing_type pulay\n\ mixing_beta 0.400000\n\ symmetry 1\n\ From 33baad00b8a47c56081c214e389dd2f9cd9fe2da Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sun, 24 Apr 2022 08:40:49 -0400 Subject: [PATCH 8/9] doc: dpgen run machine parameters (#710) * doc: dpgen run machine parameters * unpin sphinx Fix https://github.com/sphinx-doc/sphinx/issues/10291#issuecomment-1078101926 --- doc/conf.py | 8 ++++++++ doc/gen_arginfo.py | 5 +++++ doc/index.rst | 8 ++++++++ doc/requirements.txt | 11 ++++++----- doc/run-mdata.rst | 4 ++++ dpgen/dispatcher/Dispatcher.py | 23 ++++++++++++++++++++++- dpgen/generator/arginfo.py | 25 +++++++++++++++++++++++++ 7 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 doc/gen_arginfo.py create mode 100644 doc/run-mdata.rst create mode 100644 dpgen/generator/arginfo.py diff --git a/doc/conf.py b/doc/conf.py index f31e2b3eb..476146c6a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -11,6 +11,7 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # import os +import sys import subprocess # import sys import recommonmark @@ -79,3 +80,10 @@ autodoc_default_flags = ['members'] autosummary_generate = True master_doc = 'index' + + +def generate_arginfo(app): + subprocess.check_output((sys.executable, "gen_arginfo.py"), universal_newlines=True) + +def setup(app): + app.connect('builder-inited', generate_arginfo) diff --git a/doc/gen_arginfo.py b/doc/gen_arginfo.py new file mode 100644 index 000000000..e51d44dc8 --- /dev/null +++ b/doc/gen_arginfo.py @@ -0,0 +1,5 @@ +from dpgen.generator.arginfo import run_mdata_arginfo + +run_mdata_doc = run_mdata_arginfo().gen_doc() +with open('run-mdata-auto.rst', 'w') as f: + f.write(run_mdata_doc) diff --git a/doc/index.rst b/doc/index.rst index 0cf46839d..aaf253448 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -2,6 +2,14 @@ DPGEN's documentation ========================== +.. _parameters:: + +.. toctree:: + :maxdepth: 2 + :caption: Parameters + + run-mdata.rst + .. _tutorial: .. toctree:: diff --git a/doc/requirements.txt b/doc/requirements.txt index e1b2ed852..33ad28e39 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,6 +1,7 @@ -sphinx==3.2.1 -recommonmark==0.7.1 -sphinx_rtd_theme==0.5.2 -sphinx_markdown_tables==0.0.15 -myst-parser==0.13.7 +sphinx>=4.0.2 +recommonmark +sphinx_rtd_theme +sphinx_markdown_tables +myst-parser deepmodeling_sphinx +. diff --git a/doc/run-mdata.rst b/doc/run-mdata.rst new file mode 100644 index 000000000..a7b21c75c --- /dev/null +++ b/doc/run-mdata.rst @@ -0,0 +1,4 @@ +dpgen run machine parameters +============================ + +.. include:: run-mdata-auto.rst diff --git a/dpgen/dispatcher/Dispatcher.py b/dpgen/dispatcher/Dispatcher.py index 579a71cd3..29bea5669 100644 --- a/dpgen/dispatcher/Dispatcher.py +++ b/dpgen/dispatcher/Dispatcher.py @@ -1,5 +1,6 @@ from distutils.version import LooseVersion import os,sys,time,random,json,glob +from typing import List from dpdispatcher import Task, Submission, Resources, Machine from dpgen.dispatcher.LocalContext import LocalSession from dpgen.dispatcher.LocalContext import LocalContext @@ -383,5 +384,25 @@ def make_submission(mdata_machine, mdata_resources, commands, work_path, run_tas return submission +def mdata_arginfo() -> List[Argument]: + """This method generates arginfo for a single mdata. - + A submission requires the following keys: command, machine, + and resources. + + Returns + ------- + list[Argument] + arginfo + """ + doc_command = "Command of a program." + doc_mdata = "Machine and resources parameters" + command_arginfo = Argument("command", str, optional=False, doc=doc_command) + machine_arginfo = Machine.arginfo() + machine_arginfo.name = "machine" + resources_arginfo = Resources.arginfo() + resources_arginfo.name = "resources" + + return [ + command_arginfo, machine_arginfo, resources_arginfo, + ] diff --git a/dpgen/generator/arginfo.py b/dpgen/generator/arginfo.py new file mode 100644 index 000000000..f8815862d --- /dev/null +++ b/dpgen/generator/arginfo.py @@ -0,0 +1,25 @@ +from dargs import Argument + +from dpgen.dispatcher.Dispatcher import mdata_arginfo + +def run_mdata_arginfo() -> Argument: + """Generate arginfo for dpgen run mdata. + + Returns + ------- + Argument + arginfo + """ + + doc_api_version = "Please set to 1.0" + doc_run_mdata = "machine.json file" + arg_api_version = Argument("api_version", str, optional=False, doc=doc_api_version) + + sub_fields = [arg_api_version] + doc_mdata = "Parameters of command, machine, and resources for %s" + for task in ("train", "model_devi", "fp"): + sub_fields.append(Argument( + task, dict, optional=False, sub_fields=mdata_arginfo(), + doc=doc_mdata % task, + )) + return Argument("run_mdata", dict, sub_fields=sub_fields, doc=doc_run_mdata) From c921fbd9c990391b9ec53c2da537e4d3bf7629a6 Mon Sep 17 00:00:00 2001 From: Yuzhi Zhang <529133328@qq.com> Date: Tue, 26 Apr 2022 11:51:34 +0800 Subject: [PATCH 9/9] Delete information printed by `dpgen -h` to enable `pip install dpgen` (#718) * Change mv to cp when downloading softlinks. * Add explanations relevant to POTCAR's examples. * Fix CH4's vasp-md INCAR example. * Fix bug in make_submission of Auto-test * Add ase, custodian, GromacsWrapper in conda packages. * Fix bug of fp_task_min * Add gromacswrapper to conda recipe * Revert "Fix bug of fp_task_min" This reverts commit 8d7f8a77748a2d1509d91e184b9cbde1fe603807. * Add numkit recipe * Add `convert_mdata` definition to fix simplify bug. * Fix the usage of `pair_coeff` in `auto_test` * Delete printed information by `dpgen -h` in manual. * Revert "Add gromacswrapper to conda recipe" This reverts commit 3529e91d2255c20bd771c9ffde781cee8f2696dd. * Revert "Add numkit recipe" This reverts commit d19bd77448de1d278eb17cdf8d5331db016a1e76. --- README.md | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/README.md b/README.md index 30e9decc6..b59725ec9 100644 --- a/README.md +++ b/README.md @@ -92,50 +92,6 @@ To test if the installation is successful, you may execute ```bash dpgen -h ``` -and if everything works, it gives -``` -DeepModeling ------------- -Version: 0.9.2 -Date: Mar-25-2021 -Path: /root/yuzhi/dpgen-test/lib/python3.6/site-packages/dpgen - -Reference ------------- -Please cite: -Yuzhi Zhang, Haidi Wang, Weijie Chen, Jinzhe Zeng, Linfeng Zhang, Han Wang, and Weinan E, -DP-GEN: A concurrent learning platform for the generation of reliable deep learning -based potential energy models, Computer Physics Communications, 2020, 107206. ------------- - -Description ------------- -usage: dpgen [-h] - {init_surf,init_bulk,auto_gen_param,init_reaction,run,run/report,collect,simplify,autotest,db} - ... - -dpgen is a convenient script that uses DeepGenerator to prepare initial data, -drive DeepMDkit and analyze results. This script works based on several sub- -commands with their own options. To see the options for the sub-commands, type -"dpgen sub-command -h". - -positional arguments: - {init_surf,init_bulk,auto_gen_param,init_reaction,run,run/report,collect,simplify,autotest,db} - init_surf Generating initial data for surface systems. - init_bulk Generating initial data for bulk systems. - auto_gen_param auto gen param.json - init_reaction Generating initial data for reactive systems. - run Main process of Deep Potential Generator. - run/report Report the systems and the thermodynamic conditions of - the labeled frames. - collect Collect data. - simplify Simplify data. - autotest Auto-test for Deep Potential. - db Collecting data from DP-GEN. - -optional arguments: - -h, --help show this help message and exit -``` ## Init: Preparing Initial Data