From 750c8862c515b1427b9e488e4b9009933b4c6063 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 10 May 2022 01:14:40 -0400 Subject: [PATCH 01/18] add driver plugin system framework; migrate DP predict to DPDriver (#277) A system will be able to be labeled by other drivers after they are implemented. --- dpdata/driver.py | 80 +++++++++++++++++++++++++++++++ dpdata/plugins/deepmd.py | 80 +++++++++++++++++++++++++++++++ dpdata/system.py | 101 +++++++++++++++++---------------------- tests/test_predict.py | 34 +++++++++++++ 4 files changed, 237 insertions(+), 58 deletions(-) create mode 100644 dpdata/driver.py create mode 100644 tests/test_predict.py diff --git a/dpdata/driver.py b/dpdata/driver.py new file mode 100644 index 000000000..84419cfe6 --- /dev/null +++ b/dpdata/driver.py @@ -0,0 +1,80 @@ +"""Driver plugin system.""" +from typing import Callable +from .plugin import Plugin +from abc import ABC, abstractmethod + + +class Driver(ABC): + """The base class for a driver plugin. A driver can + label a pure System to generate the LabeledSystem. + + See Also + -------- + dpdata.plugins.deepmd.DPDriver : an example of Driver + """ + __DriverPlugin = Plugin() + + @staticmethod + def register(key: str) -> Callable: + """Register a driver plugin. Used as decorators. + + Parameter + --------- + key: str + key of the plugin. + + Returns + ------- + Callable + decorator of a class + + Examples + -------- + >>> @Driver.register("some_driver") + ... class SomeDriver(Driver): + ... pass + """ + return Driver.__DriverPlugin.register(key) + + @staticmethod + def get_driver(key: str) -> "Driver": + """Get a driver plugin. + + Parameter + --------- + key: str + key of the plugin. + + Returns + ------- + Driver + the specific driver class + + Raises + ------ + RuntimeError + if the requested driver is not implemented + """ + try: + return Driver.__DriverPlugin.plugins[key] + except KeyError as e: + raise RuntimeError('Unknown driver: ' + key) from e + + def __init__(self, *args, **kwargs) -> None: + """Setup the driver.""" + + @abstractmethod + def label(self, data: dict) -> dict: + """Label a system data. Returns new data with energy, forces, and virials. + + Parameters + ---------- + data : dict + data with coordinates and atom types + + Returns + ------- + dict + labeled data with energies and forces + """ + return NotImplemented diff --git a/dpdata/plugins/deepmd.py b/dpdata/plugins/deepmd.py index 9379e9ecd..2798d78ae 100644 --- a/dpdata/plugins/deepmd.py +++ b/dpdata/plugins/deepmd.py @@ -1,9 +1,11 @@ +import dpdata import dpdata.deepmd.raw import dpdata.deepmd.comp import dpdata.deepmd.hdf5 import numpy as np import h5py from dpdata.format import Format +from dpdata.driver import Driver @Format.register("deepmd") @@ -102,3 +104,81 @@ def to_multi_systems(self, directory, **kwargs): return ["%s#%s" % (directory, ff) for ff in formulas] + + +@Driver.register("dp") +@Driver.register("deepmd") +@Driver.register("deepmd-kit") +class DPDriver(Driver): + """DeePMD-kit driver. + + Parameters + ---------- + dp : deepmd.DeepPot or str + The deepmd-kit potential class or the filename of the model. + + Examples + -------- + >>> DPDriver("frozen_model.pb") + """ + def __init__(self, dp: str) -> None: + try: + # DP 1.x + import deepmd.DeepPot as DeepPot + except ModuleNotFoundError: + # DP 2.x + from deepmd.infer import DeepPot + if not isinstance(dp, DeepPot): + self.dp = DeepPot(dp) + else: + self.dp = dp + self.enable_auto_batch_size = 'auto_batch_size' in DeepPot.__init__.__code__.co_varnames + + def label(self, data: dict) -> dict: + """Label a system data by deepmd-kit. Returns new data with energy, forces, and virials. + + Parameters + ---------- + data : dict + data with coordinates and atom types + + Returns + ------- + dict + labeled data with energies and forces + """ + type_map = self.dp.get_type_map() + + ori_sys = dpdata.System.from_dict({'data': data}) + ori_sys.sort_atom_names(type_map=type_map) + atype = ori_sys['atom_types'] + + if not self.enable_auto_batch_size: + labeled_sys = dpdata.LabeledSystem() + for ss in ori_sys: + coord = ss['coords'].reshape((1, ss.get_natoms()*3)) + if not ss.nopbc: + cell = ss['cells'].reshape((1, 9)) + else: + cell = None + e, f, v = self.dp.eval(coord, cell, atype) + data = ss.data + data['energies'] = e.reshape((1, 1)) + data['forces'] = f.reshape((1, ss.get_natoms(), 3)) + data['virials'] = v.reshape((1, 3, 3)) + this_sys = dpdata.LabeledSystem.from_dict({'data': data}) + labeled_sys.append(this_sys) + data = labeled_sys.data + else: + # since v2.0.2, auto batch size is supported + coord = ori_sys.data['coords'].reshape((ori_sys.get_nframes(), ori_sys.get_natoms()*3)) + if not ori_sys.nopbc: + cell = ori_sys.data['cells'].reshape((ori_sys.get_nframes(), 9)) + else: + cell = None + e, f, v = self.dp.eval(coord, cell, atype) + data = ori_sys.data.copy() + data['energies'] = e.reshape((ori_sys.get_nframes(), 1)) + data['forces'] = f.reshape((ori_sys.get_nframes(), ori_sys.get_natoms(), 3)) + data['virials'] = v.reshape((ori_sys.get_nframes(), 3, 3)) + return data diff --git a/dpdata/system.py b/dpdata/system.py index b003461cd..df305a6e0 100644 --- a/dpdata/system.py +++ b/dpdata/system.py @@ -5,6 +5,7 @@ import numpy as np import dpdata.md.pbc from copy import deepcopy +from typing import Any from monty.json import MSONable from monty.serialization import loadfn,dumpfn from dpdata.periodic_table import Element @@ -15,6 +16,7 @@ import dpdata.plugins from dpdata.plugin import Plugin from dpdata.format import Format +from dpdata.driver import Driver from dpdata.utils import ( elements_index_map, @@ -207,6 +209,7 @@ def dump(self,filename,indent=4): def map_atom_types(self,type_map=None): """ Map the atom types of the system + Parameters ---------- type_map : @@ -640,63 +643,33 @@ def shuffle(self): self.data[ii] = self.data[ii][idx] return idx - def predict(self, dp): + def predict(self, *args: Any, driver: str="dp", **kwargs: Any) -> "LabeledSystem": """ - Predict energies and forces by deepmd-kit. + Predict energies and forces by a driver. Parameters ---------- - dp : deepmd.DeepPot or str - The deepmd-kit potential class or the filename of the model. + *args : iterable + Arguments passing to the driver + driver : str, default=dp + The assigned driver. For compatibility, default is dp + **kwargs : dict + Other arguments passing to the driver Returns ------- labeled_sys : LabeledSystem - The labeled system. + A new labeled system. + + Examples + -------- + The default driver is DP: + >>> labeled_sys = ori_sys.predict("frozen_model_compressed.pb") """ - try: - # DP 1.x - import deepmd.DeepPot as DeepPot - except ModuleNotFoundError: - # DP 2.x - from deepmd.infer import DeepPot - if not isinstance(dp, DeepPot): - dp = DeepPot(dp) - type_map = dp.get_type_map() - ori_sys = self.copy() - ori_sys.sort_atom_names(type_map=type_map) - atype = ori_sys['atom_types'] - - labeled_sys = LabeledSystem() - - if 'auto_batch_size' not in DeepPot.__init__.__code__.co_varnames: - for ss in self: - coord = ss['coords'].reshape((1, ss.get_natoms()*3)) - if not ss.nopbc: - cell = ss['cells'].reshape((1, 9)) - else: - cell = None - e, f, v = dp.eval(coord, cell, atype) - data = ss.data - data['energies'] = e.reshape((1, 1)) - data['forces'] = f.reshape((1, ss.get_natoms(), 3)) - data['virials'] = v.reshape((1, 3, 3)) - this_sys = LabeledSystem.from_dict({'data': data}) - labeled_sys.append(this_sys) - else: - # since v2.0.2, auto batch size is supported - coord = self.data['coords'].reshape((self.get_nframes(), self.get_natoms()*3)) - if not self.nopbc: - cell = self.data['cells'].reshape((self.get_nframes(), 9)) - else: - cell = None - e, f, v = dp.eval(coord, cell, atype) - data = self.data.copy() - data['energies'] = e.reshape((self.get_nframes(), 1)) - data['forces'] = f.reshape((self.get_nframes(), self.get_natoms(), 3)) - data['virials'] = v.reshape((self.get_nframes(), 3, 3)) - labeled_sys = LabeledSystem.from_dict({'data': data}) - return labeled_sys + if not isinstance(driver, Driver): + driver = Driver.get_driver(driver)(*args, **kwargs) + data = driver.label(self.data.copy()) + return LabeledSystem(data=data) def pick_atom_idx(self, idx, nopbc=None): """Pick atom index @@ -1026,6 +999,7 @@ def correction(self, hl_sys): ---------- hl_sys: LabeledSystem high-level LabeledSystem + Returns ---------- corrected_sys: LabeledSystem @@ -1208,18 +1182,29 @@ def check_atom_names(self, system): system.add_atom_names(new_in_self) system.sort_atom_names(type_map=self.atom_names) - def predict(self, dp): - try: - # DP 1.x - import deepmd.DeepPot as DeepPot - except ModuleNotFoundError: - # DP 2.x - from deepmd.infer import DeepPot - if not isinstance(dp, DeepPot): - dp = DeepPot(dp) + def predict(self, *args: Any, driver="dp", **kwargs: Any) -> "MultiSystems": + """ + Predict energies and forces by a driver. + + Parameters + ---------- + *args : iterable + Arguments passing to the driver + driver : str, default=dp + The assigned driver. For compatibility, default is dp + **kwargs : dict + Other arguments passing to the driver + + Returns + ------- + MultiSystems + A new labeled MultiSystems. + """ + if not isinstance(driver, Driver): + driver = Driver.get_driver(driver)(*args, **kwargs) new_multisystems = dpdata.MultiSystems() for ss in self: - new_multisystems.append(ss.predict(dp)) + new_multisystems.append(ss.predict(*args, driver=driver, **kwargs)) return new_multisystems def pick_atom_idx(self, idx, nopbc=None): diff --git a/tests/test_predict.py b/tests/test_predict.py new file mode 100644 index 000000000..1cb816cce --- /dev/null +++ b/tests/test_predict.py @@ -0,0 +1,34 @@ +import unittest +import numpy as np + +from comp_sys import CompLabeledSys +from context import dpdata + + +@dpdata.driver.Driver.register("zero") +class ZeroDriver(dpdata.driver.Driver): + def label(self, data): + nframes = data['coords'].shape[0] + natoms = data['coords'].shape[1] + data['energies'] = np.zeros((nframes,)) + data['forces'] = np.zeros((nframes, natoms, 3)) + data['virials'] = np.zeros((nframes, 3, 3)) + return data + + +class TestPredict(unittest.TestCase, CompLabeledSys): + def setUp (self) : + ori_sys = dpdata.LabeledSystem('poscars/deepmd.h2o.md', + fmt = 'deepmd/raw', + type_map = ['O', 'H']) + self.system_1 = ori_sys.predict(driver="zero") + self.system_2 = dpdata.LabeledSystem('poscars/deepmd.h2o.md', + fmt = 'deepmd/raw', + type_map = ['O', 'H']) + for pp in ('energies', 'forces', 'virials'): + self.system_2.data[pp][:] = 0. + + self.places = 6 + self.e_places = 6 + self.f_places = 6 + self.v_places = 6 From 7d72651e81ca3cb61d74e9fcab1cf2f39f14b66c Mon Sep 17 00:00:00 2001 From: Chenxing Luo Date: Thu, 12 May 2022 00:45:27 -0400 Subject: [PATCH 02/18] Fix DeprecationWarning in cp2k output parser (#280) ``` DeprecationWarning: Please use `R` from the `scipy.constants` namespace, the `scipy.constants.constants` namespace is deprecated. from scipy.constants.constants import R ``` Co-authored-by: Han Wang --- dpdata/cp2k/output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpdata/cp2k/output.py b/dpdata/cp2k/output.py index bc70efaf6..808387a3b 100644 --- a/dpdata/cp2k/output.py +++ b/dpdata/cp2k/output.py @@ -3,7 +3,7 @@ import re from collections import OrderedDict -from scipy.constants.constants import R +from scipy.constants import R from .cell import cell_to_low_triangle from ..unit import EnergyConversion, LengthConversion, ForceConversion, PressureConversion From 6a147eafa64fa4c915c0b18bae8c283f2ff3eeb8 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 12 May 2022 22:10:10 -0400 Subject: [PATCH 03/18] fix EnergyConversion example (#284) obvious there is a typo --- dpdata/unit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dpdata/unit.py b/dpdata/unit.py index 299ac2bbb..0c612256b 100644 --- a/dpdata/unit.py +++ b/dpdata/unit.py @@ -84,7 +84,7 @@ def __init__(self, unitA, unitB): Examples -------- - >>> conv = LengthConversion("eV", "kcal_mol") + >>> conv = EnergyConversion("eV", "kcal_mol") >>> conv.value() 23.06054783061903 """ @@ -166,4 +166,4 @@ def _convert_unit(self, unit): def _split_unit(self, unit): eunit = unit.split("/")[0] lunit = unit.split("/")[1][:-2] - return eunit, lunit \ No newline at end of file + return eunit, lunit From 506f168b69748c51739bab213f0ab33f21797e58 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 14 May 2022 03:25:50 -0400 Subject: [PATCH 04/18] fix sqm energy (#283) The code read the electronic energy instead of the total SCF energy. This commit fixes it. --- dpdata/amber/sqm.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dpdata/amber/sqm.py b/dpdata/amber/sqm.py index 86a84e1d9..62f7424e9 100644 --- a/dpdata/amber/sqm.py +++ b/dpdata/amber/sqm.py @@ -5,7 +5,6 @@ kcal2ev = EnergyConversion("kcal_mol", "eV").value() START = 0 -READ_ENERGY = 1 READ_CHARGE = 2 READ_COORDS_START = 3 READ_COORDS = 6 @@ -25,7 +24,8 @@ def parse_sqm_out(fname): flag = START for line in f: if line.startswith(" Total SCF energy"): - flag = READ_ENERGY + energy = float(line.strip().split()[-2]) + energies.append(energy) elif line.startswith(" Atom Element Mulliken Charge"): flag = READ_CHARGE elif line.startswith(" Total Mulliken Charge"): @@ -34,10 +34,6 @@ def parse_sqm_out(fname): flag = READ_COORDS_START elif line.startswith("QMMM: Forces on QM atoms"): flag = READ_FORCES - elif flag == READ_ENERGY: - energy = float(line.strip().split()[-2]) - energies.append(energy) - flag = START elif flag == READ_CHARGE: ls = line.strip().split() atom_symbols.append(ls[-2]) From 0a1c18b1c3e0fa82181aea1482aafa90a98f1918 Mon Sep 17 00:00:00 2001 From: PKUfjh <32134282+PKUfjh@users.noreply.github.com> Date: Sat, 14 May 2022 16:48:06 +0800 Subject: [PATCH 05/18] add ML labeling option for vasp ml-aimd OUTCAR (#282) * add ML labeling option for vasp ml-aimd OUTCAR * add test cases for ML labeling OUTCAR * Update vasp.py * Update vasp.py * Update outcar.py * merge functions of ML labeling and fp labeling * add and delete necessary comments * Update outcar.py --- dpdata/plugins/vasp.py | 4 +- dpdata/vasp/outcar.py | 56 +- tests/poscars/OUTCAR.ch4.ml | 3289 +++++++++++++++++++++++++++++++++++ tests/test_vasp_outcar.py | 12 + 4 files changed, 3334 insertions(+), 27 deletions(-) create mode 100644 tests/poscars/OUTCAR.ch4.ml diff --git a/dpdata/plugins/vasp.py b/dpdata/plugins/vasp.py index d3504447a..0e0475151 100644 --- a/dpdata/plugins/vasp.py +++ b/dpdata/plugins/vasp.py @@ -56,6 +56,7 @@ class VASPOutcarFormat(Format): @Format.post("rot_lower_triangular") def from_labeled_system(self, file_name, begin=0, step=1, **kwargs): data = {} + ml = kwargs.get("ml", False) data['atom_names'], \ data['atom_numbs'], \ data['atom_types'], \ @@ -64,7 +65,7 @@ def from_labeled_system(self, file_name, begin=0, step=1, **kwargs): data['energies'], \ data['forces'], \ tmp_virial, \ - = dpdata.vasp.outcar.get_frames(file_name, begin=begin, step=step) + = dpdata.vasp.outcar.get_frames(file_name, begin=begin, step=step, ml=ml) if tmp_virial is not None: data['virials'] = tmp_virial # scale virial to the unit of eV @@ -107,3 +108,4 @@ def from_labeled_system(self, file_name, begin=0, step=1, **kwargs): data['virials'][ii] *= v_pref * vol data = uniq_atom_names(data) return data + diff --git a/dpdata/vasp/outcar.py b/dpdata/vasp/outcar.py index 21256735e..1efdea2d8 100644 --- a/dpdata/vasp/outcar.py +++ b/dpdata/vasp/outcar.py @@ -1,7 +1,7 @@ import numpy as np import re -def system_info (lines, type_idx_zero = False) : +def system_info(lines, type_idx_zero = False): atom_names = [] atom_numbs = None nelm = None @@ -30,7 +30,7 @@ def system_info (lines, type_idx_zero = False) : assert(atom_numbs is not None), "cannot find ion type info in OUTCAR" atom_names = atom_names[:len(atom_numbs)] atom_types = [] - for idx,ii in enumerate(atom_numbs) : + for idx,ii in enumerate(atom_numbs): for jj in range(ii) : if type_idx_zero : atom_types.append(idx) @@ -39,18 +39,20 @@ def system_info (lines, type_idx_zero = False) : return atom_names, atom_numbs, np.array(atom_types, dtype = int), nelm -def get_outcar_block(fp) : +def get_outcar_block(fp, ml = False): blk = [] + energy_token = ['free energy TOTEN', 'free energy ML TOTEN'] + ml_index = int(ml) for ii in fp : if not ii : return blk blk.append(ii.rstrip('\n')) - if 'free energy TOTEN' in ii: + if energy_token[ml_index] in ii: return blk return blk # we assume that the force is printed ... -def get_frames (fname, begin = 0, step = 1) : +def get_frames(fname, begin = 0, step = 1, ml = False): fp = open(fname) blk = get_outcar_block(fp) @@ -66,7 +68,7 @@ def get_frames (fname, begin = 0, step = 1) : cc = 0 while len(blk) > 0 : if cc >= begin and (cc - begin) % step == 0 : - coord, cell, energy, force, virial, is_converge = analyze_block(blk, ntot, nelm) + coord, cell, energy, force, virial, is_converge = analyze_block(blk, ntot, nelm, ml) if is_converge : if len(coord) == 0: break @@ -76,9 +78,10 @@ def get_frames (fname, begin = 0, step = 1) : all_forces.append(force) if virial is not None : all_virials.append(virial) - blk = get_outcar_block(fp) + + blk = get_outcar_block(fp, ml) cc += 1 - + if len(all_virials) == 0 : all_virials = None else : @@ -87,7 +90,7 @@ def get_frames (fname, begin = 0, step = 1) : return atom_names, atom_numbs, atom_types, np.array(all_cells), np.array(all_coords), np.array(all_energies), np.array(all_forces), all_virials -def analyze_block(lines, ntot, nelm) : +def analyze_block(lines, ntot, nelm, ml = False): coord = [] cell = [] energy = None @@ -95,28 +98,31 @@ def analyze_block(lines, ntot, nelm) : virial = None is_converge = True sc_index = 0 - for idx,ii in enumerate(lines) : - if 'Iteration' in ii: + #select different searching tokens based on the ml label + energy_token = ['free energy TOTEN', 'free energy ML TOTEN'] + energy_index = [4, 5] + viral_token = ['FORCE on cell =-STRESS in cart. coord. units', 'ML FORCE'] + viral_index = [14, 4] + cell_token = ['VOLUME and BASIS', 'ML FORCE'] + cell_index = [5, 12] + ml_index = int(ml) + for idx,ii in enumerate(lines): + #if set ml == True, is_converged will always be True + if ('Iteration' in ii) and (not ml): sc_index = int(ii.split()[3][:-1]) if sc_index >= nelm: is_converge = False - elif 'free energy TOTEN' in ii: - energy = float(ii.split()[4]) + elif energy_token[ml_index] in ii: + energy = float(ii.split()[energy_index[ml_index]]) assert((force is not None) and len(coord) > 0 and len(cell) > 0) - # all_coords.append(coord) - # all_cells.append(cell) - # all_energies.append(energy) - # all_forces.append(force) - # if virial is not None : - # all_virials.append(virial) return coord, cell, energy, force, virial, is_converge - elif 'VOLUME and BASIS' in ii: + elif cell_token[ml_index] in ii: for dd in range(3) : - tmp_l = lines[idx+5+dd] + tmp_l = lines[idx+cell_index[ml_index]+dd] cell.append([float(ss) for ss in tmp_l.replace('-',' -').split()[0:3]]) - elif 'in kB' in ii: - tmp_v = [float(ss) for ss in ii.split()[2:8]] + elif viral_token[ml_index] in ii: + tmp_v = [float(ss) for ss in lines[idx+viral_index[ml_index]].split()[2:8]] virial = np.zeros([3,3]) virial[0][0] = tmp_v[0] virial[1][1] = tmp_v[1] @@ -127,9 +133,7 @@ def analyze_block(lines, ntot, nelm) : virial[2][1] = tmp_v[4] virial[0][2] = tmp_v[5] virial[2][0] = tmp_v[5] - elif 'TOTAL-FORCE' in ii and ("ML" not in ii): - # use the lines with " POSITION TOTAL-FORCE (eV/Angst)" - # exclude the lines with " POSITION TOTAL-FORCE (eV/Angst) (ML)" + elif 'TOTAL-FORCE' in ii and (("ML" in ii) == ml): for jj in range(idx+2, idx+2+ntot) : tmp_l = lines[jj] info = [float(ss) for ss in tmp_l.split()] diff --git a/tests/poscars/OUTCAR.ch4.ml b/tests/poscars/OUTCAR.ch4.ml new file mode 100644 index 000000000..475530bcf --- /dev/null +++ b/tests/poscars/OUTCAR.ch4.ml @@ -0,0 +1,3289 @@ + vasp.6.3.0 20Jan22 (build May 08 2022 00:08:36) gamma-only + + executed on LinuxIFC date 2022.05.12 14:11:53 + running 16 mpi-ranks, with 1 threads/rank + distrk: each k-point on 16 cores, 1 groups + distr: one band on NCORE= 4 cores, 4 groups + + +-------------------------------------------------------------------------------------------------------- + + + INCAR: + SYSTEM = CH4 + NCORE = 4 + KGAMMA = .TRUE. + KSPACING = 1.0 + ENCUT = 520.0 + PREC = Normal + ISTART = 0 + LWAVE = .FALSE. + LCHARG = .FALSE. + ISMEAR = 0 + SIGMA = 0.05 + EDIFF = 1e-5 + LREAL = .FALSE. + NELM = 200 + NELMIN = 4 + IBRION = 0 + MDALGO = 3 + ISIF = 3 + ALGO = Fast + ISYM = 0 + TEBEG = 10 + TEEND = 10 + NSW = 10 + POTIM = 1 + LANGEVIN_GAMMA = 1 1 + LANGEVIN_GAMMA_L = 1 + PMASS = 10 + PSTRESS = 1.0 + NWRITE = 2 + NBLOCK = 1 + ML_LMLFF = .TRUE. + ML_ISTART = 0 + ML_MB = 2000 + ML_WTOTEN = 10 + ML_WTIFOR = 10 + RANDOM_SEED = 283862281 0 0 + + POTCAR: PAW_GGA H 07Jul1998 + POTCAR: PAW_GGA C 05Jan2001 + POTCAR: PAW_GGA H 07Jul1998 + VRHFIN =H: ultrasoft test + LEXCH = 91 + EATOM = 12.5313 eV, .9210 Ry + + TITEL = PAW_GGA H 07Jul1998 + LULTRA = F use ultrasoft PP ? + IUNSCR = 0 unscreen: 0-lin 1-nonlin 2-no + RPACOR = .000 partial core radius + POMASS = 1.000; ZVAL = 1.000 mass and valenz + RCORE = 1.100 outmost cutoff radius + RWIGS = .700; RWIGS = .370 wigner-seitz radius (au A) + ENMAX = 250.000; ENMIN = 200.000 eV + RCLOC = .701 cutoff for local pot + LCOR = T correct aug charges + LPAW = T paw PP + EAUG = 400.000 + RMAX = 2.174 core radius for proj-oper + RAUG = 1.200 factor for augmentation sphere + RDEP = 1.112 core radius for depl-charge + QCUT = -5.749; QGAM = 11.498 optimization parameters + + Description + l E TYP RCUT TYP RCUT + 0 .000 23 1.100 + 0 .500 23 1.100 + 1 -.300 23 1.100 + local pseudopotential read in + atomic valenz-charges read in + non local Contribution for L= 0 read in + real space projection operators read in + non local Contribution for L= 0 read in + real space projection operators read in + non local Contribution for L= 1 read in + real space projection operators read in + PAW grid and wavefunctions read in + + number of l-projection operators is LMAX = 3 + number of lm-projection operators is LMMAX = 5 + + POTCAR: PAW_GGA C 05Jan2001 + VRHFIN =C: s2p2 + LEXCH = 91 + EATOM = 147.4688 eV, 10.8386 Ry + + TITEL = PAW_GGA C 05Jan2001 + LULTRA = F use ultrasoft PP ? + IUNSCR = 0 unscreen: 0-lin 1-nonlin 2-no + RPACOR = .000 partial core radius + POMASS = 12.011; ZVAL = 4.000 mass and valenz + RCORE = 1.500 outmost cutoff radius + RWIGS = 1.630; RWIGS = .863 wigner-seitz radius (au A) + ENMAX = 400.000; ENMIN = 300.000 eV + ICORE = 2 local potential + LCOR = T correct aug charges + LPAW = T paw PP + EAUG = 644.873 + DEXC = .000 + RMAX = 2.266 core radius for proj-oper + RAUG = 1.300 factor for augmentation sphere + RDEP = 1.501 radius for radial grids + RDEPT = 1.300 core radius for aug-charge + QCUT = -5.516; QGAM = 11.033 optimization parameters + + Description + l E TYP RCUT TYP RCUT + 0 .000 23 1.200 + 0 .000 23 1.200 + 1 .000 23 1.500 + 1 2.500 23 1.500 + 2 .000 7 1.500 + local pseudopotential read in + atomic valenz-charges read in + non local Contribution for L= 0 read in + real space projection operators read in + non local Contribution for L= 0 read in + real space projection operators read in + non local Contribution for L= 1 read in + real space projection operators read in + non local Contribution for L= 1 read in + real space projection operators read in + PAW grid and wavefunctions read in + + number of l-projection operators is LMAX = 4 + number of lm-projection operators is LMMAX = 8 + + PAW_GGA H 07Jul1998 : + energy of atom 1 EATOM= -12.5313 + kinetic energy error for atom= 0.0014 (will be added to EATOM!!) + PAW_GGA C 05Jan2001 : + energy of atom 2 EATOM= -147.4688 + kinetic energy error for atom= 0.0071 (will be added to EATOM!!) + + + POSCAR: POSCAR file written by OVITO + positions in direct lattice + velocities in cartesian coordinates + + MD-specific parameters + MDALGO = 3 + LANGEVIN_GAMMA = 1.000 1.000 + LANGEVIN_GAMMA_L = 1.000 + CNEXP = 9.000 14.000 + exchange correlation table for LEXCH = 7 + RHO(1)= 0.500 N(1) = 2000 + RHO(2)= 100.500 N(2) = 4000 + + + +-------------------------------------------------------------------------------------------------------- + + + ion position nearest neighbor table + 1 0.538 0.407 0.361- 5 1.10 + 2 0.395 0.480 0.438- 5 1.10 + 3 0.552 0.565 0.443- 5 1.10 + 4 0.528 0.416 0.539- 5 1.10 + 5 0.503 0.467 0.445- 1 1.10 4 1.10 3 1.10 2 1.10 + + +IMPORTANT INFORMATION: All symmetrisations will be switched off! +NOSYMM: (Re-)initialisation of all symmetry stuff for point group C_1. + + +---------------------------------------------------------------------------------------- + + Primitive cell + + volume of cell : 1000.0000 + + direct lattice vectors reciprocal lattice vectors + 10.000000000 0.000000000 0.000000000 0.100000000 0.000000000 0.000000000 + 0.000000000 10.000000000 0.000000000 0.000000000 0.100000000 0.000000000 + 0.000000000 0.000000000 10.000000000 0.000000000 0.000000000 0.100000000 + + length of vectors + 10.000000000 10.000000000 10.000000000 0.100000000 0.100000000 0.100000000 + + position of ions in fractional coordinates (direct lattice) + 0.538154339 0.406860801 0.360573014 + 0.394539656 0.480320569 0.438468840 + 0.552092428 0.565450285 0.442708738 + 0.528185305 0.416414755 0.539182657 + 0.503250593 0.467255160 0.445232341 + + ion indices of the primitive-cell ions + primitive index ion index + 1 1 + 2 2 + 3 3 + 4 4 + 5 5 + +---------------------------------------------------------------------------------------- + + + ----------------------------------------------------------------------------- +| | +| W W AA RRRRR N N II N N GGGG !!! | +| W W A A R R NN N II NN N G G !!! | +| W W A A R R N N N II N N N G !!! | +| W WW W AAAAAA RRRRR N N N II N N N G GGG ! | +| WW WW A A R R N NN II N NN G G | +| W W A A R R N N II N N GGGG !!! | +| | +| The requested file could not be found or opened for reading | +| k-point information. Automatic k-point generation is used as a | +| fallback, which may lead to unwanted results. | +| | + ----------------------------------------------------------------------------- + + + +Automatic generation of k-mesh. + Grid dimensions derived from KSPACING: + generate k-points for: 1 1 1 + + Generating k-lattice: + + Cartesian coordinates Fractional coordinates (reciprocal lattice) + 0.100000000 0.000000000 0.000000000 1.000000000 0.000000000 0.000000000 + 0.000000000 0.100000000 0.000000000 0.000000000 1.000000000 0.000000000 + 0.000000000 0.000000000 0.100000000 0.000000000 0.000000000 1.000000000 + + Length of vectors + 0.100000000 0.100000000 0.100000000 + + Shift w.r.t. Gamma in fractional coordinates (k-lattice) + 0.000000000 0.000000000 0.000000000 + + + Subroutine IBZKPT returns following result: + =========================================== + + Found 1 irreducible k-points: + + Following reciprocal coordinates: + Coordinates Weight + 0.000000 0.000000 0.000000 1.000000 + + Following cartesian coordinates: + Coordinates Weight + 0.000000 0.000000 0.000000 1.000000 + + + +-------------------------------------------------------------------------------------------------------- + + + + + Dimension of arrays: + k-points NKPTS = 1 k-points in BZ NKDIM = 1 number of bands NBANDS= 8 + number of dos NEDOS = 301 number of ions NIONS = 5 + non local maximal LDIM = 4 non local SUM 2l+1 LMDIM = 8 + total plane-waves NPLWV = 175616 + max r-space proj IRMAX = 1 max aug-charges IRDMAX= 2272 + dimension x,y,z NGX = 56 NGY = 56 NGZ = 56 + dimension x,y,z NGXF= 112 NGYF= 112 NGZF= 112 + support grid NGXF= 112 NGYF= 112 NGZF= 112 + ions per type = 4 1 + NGX,Y,Z is equivalent to a cutoff of 9.31, 9.31, 9.31 a.u. + NGXF,Y,Z is equivalent to a cutoff of 18.62, 18.62, 18.62 a.u. + + SYSTEM = CH4 + POSCAR = POSCAR file written by OVITO + + Startparameter for this run: + NWRITE = 2 write-flag & timer + PREC = normal normal or accurate (medium, high low for compatibility) + ISTART = 0 job : 0-new 1-cont 2-samecut + ICHARG = 2 charge: 1-file 2-atom 10-const + ISPIN = 1 spin polarized calculation? + LNONCOLLINEAR = F non collinear calculations + LSORBIT = F spin-orbit coupling + INIWAV = 1 electr: 0-lowe 1-rand 2-diag + LASPH = F aspherical Exc in radial PAW + Electronic Relaxation 1 + ENCUT = 520.0 eV 38.22 Ry 6.18 a.u. 18.59 18.59 18.59*2*pi/ulx,y,z + ENINI = 520.0 initial cutoff + ENAUG = 644.9 eV augmentation charge cutoff + NELM = 200; NELMIN= 4; NELMDL= -5 # of ELM steps + EDIFF = 0.1E-04 stopping-criterion for ELM + LREAL = F real-space projection + NLSPLINE = F spline interpolate recip. space projectors + LCOMPAT= F compatible to vasp.4.4 + GGA_COMPAT = T GGA compatible to vasp.4.4-vasp.4.6 + LMAXPAW = -100 max onsite density + LMAXMIX = 2 max onsite mixed and CHGCAR + VOSKOWN= 0 Vosko Wilk Nusair interpolation + ROPT = 0.00000 0.00000 + Ionic relaxation + EDIFFG = 0.1E-03 stopping-criterion for IOM + NSW = 10 number of steps for IOM + NBLOCK = 1; KBLOCK = 10 inner block; outer block + IBRION = 0 ionic relax: 0-MD 1-quasi-New 2-CG + NFREE = 0 steps in history (QN), initial steepest desc. (CG) + ISIF = 3 stress and relaxation + IWAVPR = 11 prediction: 0-non 1-charg 2-wave 3-comb + ISYM = 0 0-nonsym 1-usesym 2-fastsym + LCORR = T Harris-Foulkes like correction to forces + + POTIM = 1.0000 time-step for ionic-motion + TEIN = 0.0 initial temperature + TEBEG = 10.0; TEEND = 10.0 temperature during run + SMASS = -3.00 Nose mass-parameter (am) + estimated Nose-frequenzy (Omega) = 0.10E-29 period in steps = 0.63E+46 mass= -0.229E-26a.u. + SCALEE = 1.0000 scale energy and forces + NPACO = 256; APACO = 10.0 distance and # of slots for P.C. + PSTRESS= 1.0 pullay stress + + Mass of Ions in am + POMASS = 1.00 12.01 + Ionic Valenz + ZVAL = 1.00 4.00 + Atomic Wigner-Seitz radii + RWIGS = -1.00 -1.00 + virtual crystal weights + VCA = 1.00 1.00 + NELECT = 8.0000 total number of electrons + NUPDOWN= -1.0000 fix difference up-down + + DOS related values: + EMIN = 10.00; EMAX =-10.00 energy-range for DOS + EFERMI = 0.00 + ISMEAR = 0; SIGMA = 0.05 broadening in eV -4-tet -1-fermi 0-gaus + + Electronic relaxation 2 (details) + IALGO = 68 algorithm + LDIAG = T sub-space diagonalisation (order eigenvalues) + LSUBROT= F optimize rotation matrix (better conditioning) + TURBO = 0 0=normal 1=particle mesh + IRESTART = 0 0=no restart 2=restart with 2 vectors + NREBOOT = 0 no. of reboots + NMIN = 0 reboot dimension + EREF = 0.00 reference energy to select bands + IMIX = 4 mixing-type and parameters + AMIX = 0.40; BMIX = 1.00 + AMIX_MAG = 1.60; BMIX_MAG = 1.00 + AMIN = 0.10 + WC = 100.; INIMIX= 1; MIXPRE= 1; MAXMIX= -45 + + Intra band minimization: + WEIMIN = 0.0010 energy-eigenvalue tresh-hold + EBREAK = 0.31E-06 absolut break condition + DEPER = 0.30 relativ break condition + + TIME = 0.40 timestep for ELM + + volume/ion in A,a.u. = 200.00 1349.67 + Fermi-wavevector in a.u.,A,eV,Ry = 0.327420 0.618734 1.458594 0.107204 + Thomas-Fermi vector in A = 1.220131 + + Write flags + LWAVE = F write WAVECAR + LDOWNSAMPLE = F k-point downsampling of WAVECAR + LCHARG = F write CHGCAR + LVTOT = F write LOCPOT, total local potential + LVHAR = F write LOCPOT, Hartree potential only + LELF = F write electronic localiz. function (ELF) + LORBIT = 0 0 simple, 1 ext, 2 COOP (PROOUT), +10 PAW based schemes + + + Dipole corrections + LMONO = F monopole corrections only (constant potential shift) + LDIPOL = F correct potential (dipole corrections) + IDIPOL = 0 1-x, 2-y, 3-z, 4-all directions + EPSILON= 1.0000000 bulk dielectric constant + + Exchange correlation treatment: + GGA = -- GGA type + LEXCH = 7 internal setting for exchange type + LIBXC = F Libxc + VOSKOWN = 0 Vosko Wilk Nusair interpolation + LHFCALC = F Hartree Fock is set to + LHFONE = F Hartree Fock one center treatment + AEXX = 0.0000 exact exchange contribution + + Linear response parameters + LEPSILON= F determine dielectric tensor + LRPA = F only Hartree local field effects (RPA) + LNABLA = F use nabla operator in PAW spheres + LVEL = F velocity operator in full k-point grid + CSHIFT =0.1000 complex shift for real part using Kramers Kronig + OMEGAMAX= -1.0 maximum frequency + DEG_THRESHOLD= 0.2000000E-02 threshold for treating states as degnerate + RTIME = -0.100 relaxation time in fs + (WPLASMAI= 0.000 imaginary part of plasma frequency in eV, 0.658/RTIME) + DFIELD = 0.0000000 0.0000000 0.0000000 field for delta impulse in time + + Optional k-point grid parameters + LKPOINTS_OPT = F use optional k-point grid + KPOINTS_OPT_MODE= 1 mode for optional k-point grid + + Orbital magnetization related: + ORBITALMAG= F switch on orbital magnetization + LCHIMAG = F perturbation theory with respect to B field + DQ = 0.001000 dq finite difference perturbation B field + LLRAUG = F two centre corrections for induced B field + + + +-------------------------------------------------------------------------------------------------------- + + + molecular dynamics for ions + using a microcanonical ensemble + charge density and potential will be updated during run + non-spin polarized calculation + RMM-DIIS sequential band-by-band and + variant of blocked Davidson during initial phase + perform sub-space diagonalisation + before iterative eigenvector-optimisation + modified Broyden-mixing scheme, WC = 100.0 + initial mixing is a Kerker type mixing with AMIX = 0.4000 and BMIX = 1.0000 + Hartree-type preconditioning will be used + using additional bands 4 + reciprocal scheme for non local part + calculate Harris-corrections to forces + (improved forces if not selfconsistent) + use gradient corrections + use of overlap-Matrix (Vanderbilt PP) + Gauss-broadening in eV SIGMA = 0.05 + + +-------------------------------------------------------------------------------------------------------- + + + energy-cutoff : 520.00 + volume of cell : 1000.00 + direct lattice vectors reciprocal lattice vectors + 10.000000000 0.000000000 0.000000000 0.100000000 0.000000000 0.000000000 + 0.000000000 10.000000000 0.000000000 0.000000000 0.100000000 0.000000000 + 0.000000000 0.000000000 10.000000000 0.000000000 0.000000000 0.100000000 + + length of vectors + 10.000000000 10.000000000 10.000000000 0.100000000 0.100000000 0.100000000 + + + + k-points in units of 2pi/SCALE and weight: read from INCAR + 0.00000000 0.00000000 0.00000000 1.000 + + k-points in reciprocal lattice and weights: read from INCAR + 0.00000000 0.00000000 0.00000000 1.000 + + position of ions in fractional coordinates (direct lattice) + 0.53815434 0.40686080 0.36057301 + 0.39453966 0.48032057 0.43846884 + 0.55209243 0.56545029 0.44270874 + 0.52818530 0.41641476 0.53918266 + 0.50325059 0.46725516 0.44523234 + + position of ions in cartesian coordinates (Angst): + 5.38154339 4.06860801 3.60573014 + 3.94539656 4.80320569 4.38468840 + 5.52092428 5.65450285 4.42708738 + 5.28185305 4.16414755 5.39182657 + 5.03250593 4.67255160 4.45232341 + + + +-------------------------------------------------------------------------------------------------------- + + + use parallel FFT for orbitals z direction half grid + k-point 1 : 0.0000 0.0000 0.0000 plane waves: 13481 + + maximum and minimum number of plane-waves per node : 3374 3363 + + maximum number of plane-waves: 13481 + maximum index in each direction: + IXMAX= 18 IYMAX= 18 IZMAX= 18 + IXMIN= -18 IYMIN= -18 IZMIN= 0 + + + parallel 3D FFT for wavefunctions: + minimum data exchange during FFTs selected (reduces bandwidth) + parallel 3D FFT for charge: + minimum data exchange during FFTs selected (reduces bandwidth) + + + total amount of memory used by VASP MPI-rank0 41513. kBytes +======================================================================= + + base : 30000. kBytes + nonl-proj : 699. kBytes + fftplans : 3956. kBytes + grid : 6748. kBytes + one-center: 3. kBytes + wavefun : 107. kBytes + + INWAV: cpu time 0.0000: real time 0.0001 + Broyden mixing: mesh for mixing (old mesh) + NGX = 37 NGY = 37 NGZ = 37 + (NGX =112 NGY =112 NGZ =112) + gives a total of 50653 points + + initial charge density was supplied: + charge density of overlapping atoms calculated + number of electron 8.0000000 magnetization + keeping initial charge density in first step + + +-------------------------------------------------------------------------------------------------------- + + + Maximum index for augmentation-charges 90 (set IRDMAX) + + +-------------------------------------------------------------------------------------------------------- + + + First call to EWALD: gamma= 0.177 + Maximum number of real-space cells 3x 3x 3 + Maximum number of reciprocal cells 3x 3x 3 + + FEWALD: cpu time 0.0013: real time 0.0015 + OFIELD: cpu time 0.0000: real time 0.0000 + + ML FORCE on cell =-STRESS in cart. coord. units (eV/cell) + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Total: 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 + in kB 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 + external pressure = -1.00 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = 0.00 kB + Total+kin. 0.000 0.000 0.000 0.000 0.000 0.000 + volume of cell : 1000.00 + direct lattice vectors reciprocal lattice vectors + 10.000000000 0.000000000 0.000000000 0.100000000 0.000000000 0.000000000 + 0.000000000 10.000000000 0.000000000 0.000000000 0.100000000 0.000000000 + 0.000000000 0.000000000 10.000000000 0.000000000 0.000000000 0.100000000 + + length of vectors + 10.000000000 10.000000000 10.000000000 0.100000000 0.100000000 0.100000000 + + + POSITION TOTAL-FORCE (eV/Angst) (ML) + ----------------------------------------------------------------------------------- + 5.38154 4.06861 3.60573 0.000000 0.000000 0.000000 + 3.94540 4.80321 4.38469 0.000000 0.000000 0.000000 + 5.52092 5.65450 4.42709 0.000000 0.000000 0.000000 + 5.28185 4.16415 5.39183 0.000000 0.000000 0.000000 + 5.03251 4.67255 4.45232 0.000000 0.000000 0.000000 + ----------------------------------------------------------------------------------- + total drift: 0.000000 0.000000 0.000000 + + +-------------------------------------------------------------------------------------------------------- + + + + ML FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy ML TOTEN = 0.00000000 eV + + ML energy without entropy= 0.00000000 ML energy(sigma->0) = 0.00000000 + + enthalpy is ML TOTEN = 0.62415064 eV P V= 0.62415064 + + + +--------------------------------------- Iteration 1( 1) --------------------------------------- + + + POTLOK: cpu time 0.0594: real time 0.0680 + SETDIJ: cpu time 0.0020: real time 0.0044 + EDDAV: cpu time 0.0231: real time 0.0316 + DOS: cpu time 0.0009: real time 0.0027 + -------------------------------------------- + LOOP: cpu time 0.0854: real time 0.1066 + + eigenvalue-minimisations : 16 + total energy-change (2. order) : 0.6999765E+02 (-0.1857416E+03) + number of electron 8.0000000 magnetization + augmentation part 8.0000000 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -244.12240337 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 22.64847752 + PAW double counting = 41.11719426 -42.35612335 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -33.79259455 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = 69.99764688 eV + + energy without entropy = 69.99764688 energy(sigma->0) = 69.99764688 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 2) --------------------------------------- + + + EDDAV: cpu time 0.0261: real time 0.0261 + DOS: cpu time 0.0001: real time 0.0001 + -------------------------------------------- + LOOP: cpu time 0.0262: real time 0.0262 + + eigenvalue-minimisations : 32 + total energy-change (2. order) :-0.6232328E+02 (-0.6232328E+02) + number of electron 8.0000000 magnetization + augmentation part 8.0000000 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -244.12240337 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 22.64847752 + PAW double counting = 41.11719426 -42.35612335 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -96.11587390 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = 7.67436753 eV + + energy without entropy = 7.67436753 energy(sigma->0) = 7.67436753 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 3) --------------------------------------- + + + EDDAV: cpu time 0.0146: real time 0.0148 + DOS: cpu time 0.0001: real time 0.0001 + -------------------------------------------- + LOOP: cpu time 0.0147: real time 0.0149 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.3181075E+02 (-0.3181075E+02) + number of electron 8.0000000 magnetization + augmentation part 8.0000000 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -244.12240337 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 22.64847752 + PAW double counting = 41.11719426 -42.35612335 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -127.92662209 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.13638066 eV + + energy without entropy = -24.13638066 energy(sigma->0) = -24.13638066 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 4) --------------------------------------- + + + EDDAV: cpu time 0.0145: real time 0.0147 + DOS: cpu time 0.0001: real time 0.0001 + -------------------------------------------- + LOOP: cpu time 0.0146: real time 0.0148 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.3413468E+01 (-0.3413468E+01) + number of electron 8.0000000 magnetization + augmentation part 8.0000000 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -244.12240337 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 22.64847752 + PAW double counting = 41.11719426 -42.35612335 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -131.34009031 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -27.54984888 eV + + energy without entropy = -27.54984888 energy(sigma->0) = -27.54984888 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 5) --------------------------------------- + + + EDDAV: cpu time 0.0247: real time 0.0248 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0064: real time 0.0081 + MIXING: cpu time 0.0041: real time 0.0059 + -------------------------------------------- + LOOP: cpu time 0.0354: real time 0.0389 + + eigenvalue-minimisations : 32 + total energy-change (2. order) :-0.1233522E+00 (-0.1233522E+00) + number of electron 8.0000007 magnetization + augmentation part 0.2323676 magnetization + + Broyden mixing: + rms(total) = 0.84942E+00 rms(broyden)= 0.84931E+00 + rms(prec ) = 0.12300E+01 + weight for this iteration 100.00 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -244.12240337 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 22.64847752 + PAW double counting = 41.11719426 -42.35612335 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -131.46344255 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -27.67320112 eV + + energy without entropy = -27.67320112 energy(sigma->0) = -27.67320112 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 6) --------------------------------------- + + + POTLOK: cpu time 0.0581: real time 0.0582 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0124: real time 0.0219 + RMM-DIIS: cpu time 0.0139: real time 0.0147 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0053: real time 0.0053 + MIXING: cpu time 0.0027: real time 0.0035 + -------------------------------------------- + LOOP: cpu time 0.0936: real time 0.1048 + + eigenvalue-minimisations : 16 + total energy-change (2. order) : 0.2944242E+01 (-0.4748563E+00) + number of electron 8.0000007 magnetization + augmentation part 0.2052833 magnetization + + Broyden mixing: + rms(total) = 0.37023E+00 rms(broyden)= 0.37021E+00 + rms(prec ) = 0.51924E+00 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 1.3828 + 1.3828 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -263.92806877 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 23.86234804 + PAW double counting = 69.00369650 -70.45380803 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -109.71622293 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.72895883 eV + + energy without entropy = -24.72895883 energy(sigma->0) = -24.72895883 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 7) --------------------------------------- + + + POTLOK: cpu time 0.0593: real time 0.0595 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0034: real time 0.0034 + RMM-DIIS: cpu time 0.0132: real time 0.0132 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0050: real time 0.0050 + MIXING: cpu time 0.0018: real time 0.0018 + -------------------------------------------- + LOOP: cpu time 0.0839: real time 0.0841 + + eigenvalue-minimisations : 16 + total energy-change (2. order) : 0.4217318E+00 (-0.1875670E+00) + number of electron 8.0000007 magnetization + augmentation part 0.1908460 magnetization + + Broyden mixing: + rms(total) = 0.20477E+00 rms(broyden)= 0.20472E+00 + rms(prec ) = 0.25962E+00 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 2.0981 + 1.7106 2.4856 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -276.64447254 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 24.76761791 + PAW double counting = 86.49593432 -88.01099629 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -97.41840673 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.30722698 eV + + energy without entropy = -24.30722698 energy(sigma->0) = -24.30722698 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 8) --------------------------------------- + + + POTLOK: cpu time 0.0556: real time 0.0557 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0131: real time 0.0131 + ORTHCH: cpu time 0.0003: real time 0.0003 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0049: real time 0.0049 + MIXING: cpu time 0.0021: real time 0.0021 + -------------------------------------------- + LOOP: cpu time 0.0801: real time 0.0803 + + eigenvalue-minimisations : 16 + total energy-change (2. order) : 0.1493866E+00 (-0.4073743E-01) + number of electron 8.0000007 magnetization + augmentation part 0.1942004 magnetization + + Broyden mixing: + rms(total) = 0.80159E-01 rms(broyden)= 0.80158E-01 + rms(prec ) = 0.11958E+00 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 1.5868 + 2.4490 0.8688 1.4426 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -279.85430287 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.22242630 + PAW double counting = 86.90836895 -88.31856446 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -94.61886465 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.15784036 eV + + energy without entropy = -24.15784036 energy(sigma->0) = -24.15784036 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 9) --------------------------------------- + + + POTLOK: cpu time 0.0559: real time 0.0560 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0129: real time 0.0130 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0049: real time 0.0049 + MIXING: cpu time 0.0020: real time 0.0020 + -------------------------------------------- + LOOP: cpu time 0.0803: real time 0.0804 + + eigenvalue-minimisations : 16 + total energy-change (2. order) : 0.2753904E-01 (-0.3356277E-02) + number of electron 8.0000007 magnetization + augmentation part 0.1933423 magnetization + + Broyden mixing: + rms(total) = 0.49990E-01 rms(broyden)= 0.49990E-01 + rms(prec ) = 0.76800E-01 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 1.5906 + 1.8279 1.8279 1.3533 1.3533 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -281.34977031 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.29664039 + PAW double counting = 88.88104200 -90.31680163 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -93.14450813 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.13030132 eV + + energy without entropy = -24.13030132 energy(sigma->0) = -24.13030132 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 10) --------------------------------------- + + + POTLOK: cpu time 0.0556: real time 0.0560 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0130: real time 0.0130 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0049: real time 0.0049 + MIXING: cpu time 0.0023: real time 0.0023 + -------------------------------------------- + LOOP: cpu time 0.0802: real time 0.0806 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.5752872E-02 (-0.2159009E-01) + number of electron 8.0000007 magnetization + augmentation part 0.1896610 magnetization + + Broyden mixing: + rms(total) = 0.64119E-01 rms(broyden)= 0.64115E-01 + rms(prec ) = 0.85062E-01 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 1.7914 + 2.9369 2.4806 0.9636 1.2878 1.2878 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -283.96361568 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.35709251 + PAW double counting = 90.61238336 -92.09095073 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.55406001 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.13605419 eV + + energy without entropy = -24.13605419 energy(sigma->0) = -24.13605419 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 11) --------------------------------------- + + + POTLOK: cpu time 0.0529: real time 0.0531 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0132: real time 0.0132 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0049: real time 0.0049 + MIXING: cpu time 0.0023: real time 0.0023 + -------------------------------------------- + LOOP: cpu time 0.0778: real time 0.0779 + + eigenvalue-minimisations : 16 + total energy-change (2. order) : 0.2374416E-01 (-0.2168259E-02) + number of electron 8.0000007 magnetization + augmentation part 0.1904599 magnetization + + Broyden mixing: + rms(total) = 0.13585E-01 rms(broyden)= 0.13585E-01 + rms(prec ) = 0.19949E-01 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 1.8785 + 3.9503 2.1794 1.6771 0.9410 1.2617 1.2617 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -284.36569701 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.40602284 + PAW double counting = 89.08931980 -90.54081604 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.20423597 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.11231002 eV + + energy without entropy = -24.11231002 energy(sigma->0) = -24.11231002 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 12) --------------------------------------- + + + POTLOK: cpu time 0.0505: real time 0.0506 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0129: real time 0.0129 + ORTHCH: cpu time 0.0003: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0049: real time 0.0049 + MIXING: cpu time 0.0023: real time 0.0023 + -------------------------------------------- + LOOP: cpu time 0.0752: real time 0.0753 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.5616810E-02 (-0.3038805E-03) + number of electron 8.0000007 magnetization + augmentation part 0.1903692 magnetization + + Broyden mixing: + rms(total) = 0.91223E-02 rms(broyden)= 0.91222E-02 + rms(prec ) = 0.15608E-01 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 2.1046 + 5.0953 2.8604 2.1934 1.3197 1.3197 0.9717 0.9717 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -285.08904445 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.44199507 + PAW double counting = 89.62931534 -91.08054492 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -89.52274424 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.11792683 eV + + energy without entropy = -24.11792683 energy(sigma->0) = -24.11792683 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 13) --------------------------------------- + + + POTLOK: cpu time 0.0492: real time 0.0494 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0128: real time 0.0128 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0050: real time 0.0050 + MIXING: cpu time 0.0024: real time 0.0024 + -------------------------------------------- + LOOP: cpu time 0.0740: real time 0.0742 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.6372986E-02 (-0.9410624E-03) + number of electron 8.0000007 magnetization + augmentation part 0.1907689 magnetization + + Broyden mixing: + rms(total) = 0.43509E-02 rms(broyden)= 0.43500E-02 + rms(prec ) = 0.60487E-02 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 2.1515 + 4.9398 3.4568 2.1253 2.1253 1.3091 1.3091 0.9935 0.9531 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -284.52848187 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.39819219 + PAW double counting = 89.09346772 -90.53922434 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.05134988 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12429982 eV + + energy without entropy = -24.12429982 energy(sigma->0) = -24.12429982 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 14) --------------------------------------- + + + POTLOK: cpu time 0.0493: real time 0.0494 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0034: real time 0.0034 + RMM-DIIS: cpu time 0.0129: real time 0.0129 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0050: real time 0.0050 + MIXING: cpu time 0.0026: real time 0.0026 + -------------------------------------------- + LOOP: cpu time 0.0743: real time 0.0744 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.3192683E-02 (-0.7624847E-03) + number of electron 8.0000007 magnetization + augmentation part 0.1912804 magnetization + + Broyden mixing: + rms(total) = 0.13606E-01 rms(broyden)= 0.13605E-01 + rms(prec ) = 0.19348E-01 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 2.3626 + 6.5374 4.3140 2.5610 2.1865 1.3075 1.3075 1.1135 1.0034 0.9324 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -284.15389486 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.37442709 + PAW double counting = 88.56511515 -90.00909297 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.40714328 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12749250 eV + + energy without entropy = -24.12749250 energy(sigma->0) = -24.12749250 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 15) --------------------------------------- + + + POTLOK: cpu time 0.0483: real time 0.0484 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0128: real time 0.0128 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0049: real time 0.0049 + MIXING: cpu time 0.0028: real time 0.0028 + -------------------------------------------- + LOOP: cpu time 0.0734: real time 0.0734 + + eigenvalue-minimisations : 16 + total energy-change (2. order) : 0.7275167E-03 (-0.3948155E-03) + number of electron 8.0000007 magnetization + augmentation part 0.1908414 magnetization + + Broyden mixing: + rms(total) = 0.17697E-02 rms(broyden)= 0.17695E-02 + rms(prec ) = 0.24022E-02 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 2.3085 + 6.9182 4.1461 2.5704 1.9486 1.9486 1.3118 1.3118 0.9419 0.9419 1.0452 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -284.68181353 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.39948386 + PAW double counting = 89.28729910 -90.73777251 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -89.89705826 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12676499 eV + + energy without entropy = -24.12676499 energy(sigma->0) = -24.12676499 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 16) --------------------------------------- + + + POTLOK: cpu time 0.0480: real time 0.0492 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0130: real time 0.0130 + ORTHCH: cpu time 0.0003: real time 0.0003 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0048: real time 0.0048 + MIXING: cpu time 0.0031: real time 0.0031 + -------------------------------------------- + LOOP: cpu time 0.0735: real time 0.0747 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.1791412E-03 (-0.2065426E-04) + number of electron 8.0000007 magnetization + augmentation part 0.1908472 magnetization + + Broyden mixing: + rms(total) = 0.23969E-03 rms(broyden)= 0.23940E-03 + rms(prec ) = 0.53105E-03 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 2.4806 + 7.7572 5.1870 2.8325 2.8325 2.0944 1.3182 1.3182 1.0757 0.9696 0.9507 + 0.9507 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -284.64325100 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.39810953 + PAW double counting = 89.20067227 -90.65026209 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -89.93530920 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12694413 eV + + energy without entropy = -24.12694413 energy(sigma->0) = -24.12694413 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 17) --------------------------------------- + + + POTLOK: cpu time 0.0496: real time 0.0498 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0129: real time 0.0129 + ORTHCH: cpu time 0.0003: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0050: real time 0.0050 + MIXING: cpu time 0.0030: real time 0.0030 + -------------------------------------------- + LOOP: cpu time 0.0750: real time 0.0752 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.1247330E-03 (-0.5936357E-05) + number of electron 8.0000007 magnetization + augmentation part 0.1908195 magnetization + + Broyden mixing: + rms(total) = 0.81358E-03 rms(broyden)= 0.81346E-03 + rms(prec ) = 0.10332E-02 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 2.4194 + 8.0154 5.1811 3.4343 2.5600 2.0070 1.3182 1.3182 1.3149 1.0597 0.9315 + 0.9461 0.9461 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -284.63349018 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.39651980 + PAW double counting = 89.19533399 -90.64480882 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -89.94372002 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12706886 eV + + energy without entropy = -24.12706886 energy(sigma->0) = -24.12706886 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 18) --------------------------------------- + + + POTLOK: cpu time 0.0508: real time 0.0510 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0104: real time 0.0104 + ORTHCH: cpu time 0.0003: real time 0.0003 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0050: real time 0.0050 + MIXING: cpu time 0.0032: real time 0.0032 + -------------------------------------------- + LOOP: cpu time 0.0739: real time 0.0740 + + eigenvalue-minimisations : 12 + total energy-change (2. order) :-0.2014560E-04 (-0.7436772E-06) + number of electron 8.0000007 magnetization + augmentation part 0.1908158 magnetization + + Broyden mixing: + rms(total) = 0.51177E-03 rms(broyden)= 0.51174E-03 + rms(prec ) = 0.66915E-03 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 2.5131 + 8.3362 5.3697 3.7299 2.8780 2.5903 2.0916 1.3143 1.3143 1.1182 1.0752 + 0.9535 0.9494 0.9494 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -284.63831349 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.39701494 + PAW double counting = 89.19004721 -90.63941212 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -89.93952191 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12708901 eV + + energy without entropy = -24.12708901 energy(sigma->0) = -24.12708901 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 1( 19) --------------------------------------- + + + POTLOK: cpu time 0.0532: real time 0.0533 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0104: real time 0.0104 + ORTHCH: cpu time 0.0003: real time 0.0003 + DOS: cpu time 0.0001: real time 0.0001 + -------------------------------------------- + LOOP: cpu time 0.0681: real time 0.0682 + + eigenvalue-minimisations : 12 + total energy-change (2. order) :-0.9011489E-05 (-0.5561172E-06) + number of electron 8.0000007 magnetization + augmentation part 0.1908158 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23919328 + Ewald energy TEWEN = 128.68270354 + -Hartree energ DENC = -284.62523194 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.39657989 + PAW double counting = 89.17924264 -90.62885322 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -89.95193175 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12709802 eV + + energy without entropy = -24.12709802 energy(sigma->0) = -24.12709802 + + +-------------------------------------------------------------------------------------------------------- + + + + + average (electrostatic) potential at core + the test charge radii are 0.5201 0.6991 + (the norm of the test charge is 1.0000) + 1 -41.5589 2 -41.5565 3 -41.5570 4 -41.5581 5 -59.0029 + + + + E-fermi : -9.1045 XC(G=0): -0.6163 alpha+bet : -0.2111 + + Fermi energy: -9.1044786619 + + k-point 1 : 0.0000 0.0000 0.0000 + band No. band energies occupation + 1 -16.9228 2.00000 + 2 -9.3517 2.00000 + 3 -9.3512 2.00000 + 4 -9.3503 2.00000 + 5 -0.5421 0.00000 + 6 1.0562 0.00000 + 7 1.0670 0.00000 + 8 1.0822 0.00000 + + +-------------------------------------------------------------------------------------------------------- + + + soft charge-density along one line, spin component 1 + 0 1 2 3 4 5 6 7 8 9 + total charge-density along one line + + pseudopotential strength for first ion, spin component: 1 + -2.357 -0.011 -0.001 -0.002 0.001 + -0.011 0.050 -0.001 -0.002 0.001 + -0.001 -0.001 -0.339 0.002 -0.001 + -0.002 -0.002 0.002 -0.338 -0.001 + 0.001 0.001 -0.001 -0.001 -0.340 + total augmentation occupancy for first ion, spin component: 1 + 1.738 -0.485 0.166 0.233 -0.096 + -0.485 0.185 -0.053 -0.074 0.030 + 0.166 -0.053 0.023 0.020 -0.008 + 0.233 -0.074 0.020 0.036 -0.011 + -0.096 0.030 -0.008 -0.011 0.014 + + +------------------------ aborting loop because EDIFF is reached ---------------------------------------- + + + CHARGE: cpu time 0.0049: real time 0.0049 + FORLOC: cpu time 0.0037: real time 0.0037 + FORNL : cpu time 0.0019: real time 0.0033 + STRESS: cpu time 0.0221: real time 0.0231 + FORHAR: cpu time 0.0134: real time 0.0141 + MIXING: cpu time 0.0037: real time 0.0037 + OFIELD: cpu time 0.0001: real time 0.0001 + + FORCE on cell =-STRESS in cart. coord. units (eV): + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Alpha Z 0.23919 0.23919 0.23919 + Ewald 42.88200 42.89495 42.90570 -0.00850 0.00232 -0.00338 + Hartree 94.87523 94.87841 94.88063 -0.00495 0.00061 -0.00128 + E(xc) -27.05613 -27.05607 -27.05607 -0.00000 0.00001 -0.00004 + Local -196.91996 -196.93284 -196.94306 0.01270 -0.00232 0.00407 + n-local -15.55573 -15.55569 -15.55571 0.00001 -0.00001 -0.00006 + augment 0.19051 0.19083 0.19060 0.00003 -0.00006 -0.00005 + Kinetic 101.17913 101.17641 101.17459 0.00035 -0.00054 0.00055 + Fock 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 + ------------------------------------------------------------------------------------- + Total -0.16576 -0.16480 -0.16412 -0.00035 0.00000 -0.00019 + in kB -0.26557 -0.26404 -0.26295 -0.00057 0.00000 -0.00031 + external pressure = -1.26 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = -0.26 kB + Total+kin. -0.266 -0.264 -0.263 -0.001 0.000 -0.000 + + VOLUME and BASIS-vectors are now : + ----------------------------------------------------------------------------- + energy-cutoff : 520.00 + volume of cell : 1000.00 + direct lattice vectors reciprocal lattice vectors + 10.000000000 0.000000000 0.000000000 0.100000000 0.000000000 0.000000000 + 0.000000000 10.000000000 0.000000000 0.000000000 0.100000000 0.000000000 + 0.000000000 0.000000000 10.000000000 0.000000000 0.000000000 0.100000000 + + length of vectors + 10.000000000 10.000000000 10.000000000 0.100000000 0.100000000 0.100000000 + + + FORCES acting on ions + electron-ion (+dipol) ewald-force non-local-force convergence-correction + ----------------------------------------------------------------------------------------------- + -.168E+02 0.291E+02 0.408E+02 0.186E+02 -.321E+02 -.450E+02 -.177E+01 0.306E+01 0.429E+01 0.352E-03 -.646E-03 -.928E-03 + 0.524E+02 -.630E+01 0.326E+01 -.578E+02 0.695E+01 -.360E+01 0.551E+01 -.662E+00 0.342E+00 -.114E-02 0.154E-03 -.739E-04 + -.235E+02 -.473E+02 0.122E+01 0.260E+02 0.522E+02 -.134E+01 -.247E+01 -.497E+01 0.128E+00 0.486E-03 0.106E-02 -.290E-04 + -.120E+02 0.245E+02 -.453E+02 0.133E+02 -.270E+02 0.500E+02 -.126E+01 0.257E+01 -.476E+01 0.245E-03 -.539E-03 0.102E-02 + 0.102E-01 -.566E-02 -.177E-02 -.123E-01 0.661E-02 0.255E-02 0.201E-03 0.179E-02 -.108E-02 -.218E-03 0.131E-03 -.388E-04 + ----------------------------------------------------------------------------------------------- + -.115E-02 -.108E-02 0.806E-03 -.356E-14 0.712E-14 -.711E-14 0.279E-02 0.586E-03 -.711E-03 -.271E-03 0.156E-03 -.481E-04 + + + POSITION TOTAL-FORCE (eV/Angst) + ----------------------------------------------------------------------------------- + 5.38154 4.06861 3.60573 -0.020999 0.037724 0.054091 + 3.94540 4.80321 4.38469 0.071295 -0.008772 0.003936 + 5.52092 5.65450 4.42709 -0.032029 -0.063643 0.001782 + 5.28185 4.16415 5.39183 -0.014802 0.031482 -0.059424 + 5.03251 4.67255 4.45232 -0.002097 0.002870 -0.000339 + ----------------------------------------------------------------------------------- + total drift: 0.001368 -0.000338 0.000047 + + +-------------------------------------------------------------------------------------------------------- + + + + FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy TOTEN = -24.12709802 eV + + energy without entropy= -24.12709802 energy(sigma->0) = -24.12709802 + enthalpy is TOTEN = -23.50294738 eV P V= 0.62415064 + + + +-------------------------------------------------------------------------------------------------------- + + + POTLOK: cpu time 0.0551: real time 0.0561 + + +-------------------------------------------------------------------------------------------------------- + + + OFIELD: cpu time 0.0000: real time 0.0000 + RANDOM_SEED = 283862281 0 0 + RANDOM_SEED = 283862281 66 0 + IONSTEP: cpu time 0.0451: real time 0.0604 + + ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV) + --------------------------------------------------- +% ion-electron TOTEN = -24.127098 see above + kinetic energy EKIN = 0.000027 + kin. lattice EKIN_LAT= 0.003516 (temperature 3.43 K) + nose potential ES = 0.000000 + nose kinetic EPS = 0.000000 + --------------------------------------------------- + total energy ETOTAL = -24.123556 eV + + maximum distance moved by ions : 0.78E-04 + + OFIELD: cpu time 0.0000: real time 0.0000 + + ML FORCE on cell =-STRESS in cart. coord. units (eV/cell) + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Total: 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 + in kB 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 + external pressure = -1.00 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = 0.00 kB + Total+kin. 0.000 0.000 0.000 0.000 0.000 -0.000 + volume of cell : 1000.12 + direct lattice vectors reciprocal lattice vectors + 10.001524767 -0.002342671 0.000853163 0.099984755 0.000000000 0.000000000 + 0.000000000 9.999300091 0.000429911 0.000023425 0.100007000 0.000000000 + 0.000000000 0.000000000 10.000423975 -0.000008531 -0.000004299 0.099995760 + + length of vectors + 10.001525078 9.999300101 10.000423975 0.099984755 0.100007002 0.099995761 + + + POSITION TOTAL-FORCE (eV/Angst) (ML) + ----------------------------------------------------------------------------------- + 5.38218 4.06754 3.60708 0.000000 0.000000 0.000000 + 3.94666 4.80192 4.38551 0.000000 0.000000 0.000000 + 5.52131 5.65218 4.42807 0.000000 0.000000 0.000000 + 5.28249 4.16291 5.39221 0.000000 0.000000 0.000000 + 5.03327 4.67105 4.45322 0.000000 0.000000 0.000000 + ----------------------------------------------------------------------------------- + total drift: 0.000000 0.000000 0.000000 + + +-------------------------------------------------------------------------------------------------------- + + + + ML FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy ML TOTEN = 0.00000000 eV + + ML energy without entropy= 0.00000000 ML energy(sigma->0) = 0.00000000 + + enthalpy is ML TOTEN = 0.62422858 eV P V= 0.62422858 + + WAVPRE: cpu time 0.0086: real time 0.0088 + FEWALD: cpu time 0.0007: real time 0.0007 + GENKIN: cpu time 0.0005: real time 0.0006 + ORTHCH: cpu time 0.0010: real time 0.0010 + LOOP+: cpu time 1.4332: real time 1.5063 + + +--------------------------------------- Iteration 2( 1) --------------------------------------- + + + POTLOK: cpu time 0.0526: real time 0.0531 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDAV: cpu time 0.0266: real time 0.0266 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0049: real time 0.0049 + MIXING: cpu time 0.0023: real time 0.0022 + -------------------------------------------- + LOOP: cpu time 0.0875: real time 0.0879 + + eigenvalue-minimisations : 32 + total energy-change (2. order) :-0.1706435E-03 (-0.1165652E-03) + number of electron 8.0000007 magnetization + augmentation part 0.1911029 magnetization + + Broyden mixing: + rms(total) = 0.23045E-02 rms(broyden)= 0.23039E-02 + rms(prec ) = 0.31603E-02 + weight for this iteration 100.00 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23916342 + Ewald energy TEWEN = 128.83911758 + -Hartree energ DENC = -284.70882986 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.40030945 + PAW double counting = 89.17992019 -90.62940751 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.02873246 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12725965 eV + + energy without entropy = -24.12725965 energy(sigma->0) = -24.12725965 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 2( 2) --------------------------------------- + + + POTLOK: cpu time 0.0545: real time 0.0546 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0123: real time 0.0123 + ORTHCH: cpu time 0.0003: real time 0.0003 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0051: real time 0.0051 + MIXING: cpu time 0.0017: real time 0.0017 + -------------------------------------------- + LOOP: cpu time 0.0781: real time 0.0782 + + eigenvalue-minimisations : 16 + total energy-change (2. order) : 0.1740768E-04 (-0.4814525E-05) + number of electron 8.0000007 magnetization + augmentation part 0.1910459 magnetization + + Broyden mixing: + rms(total) = 0.83309E-03 rms(broyden)= 0.83304E-03 + rms(prec ) = 0.10968E-02 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 1.5109 + 1.5109 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23916342 + Ewald energy TEWEN = 128.83911758 + -Hartree energ DENC = -284.75195558 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.40263145 + PAW double counting = 89.26612019 -90.71674417 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -89.98677466 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12724224 eV + + energy without entropy = -24.12724224 energy(sigma->0) = -24.12724224 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 2( 3) --------------------------------------- + + + POTLOK: cpu time 0.0549: real time 0.0551 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0034: real time 0.0034 + RMM-DIIS: cpu time 0.0121: real time 0.0121 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0049: real time 0.0049 + MIXING: cpu time 0.0019: real time 0.0019 + -------------------------------------------- + LOOP: cpu time 0.0784: real time 0.0785 + + eigenvalue-minimisations : 15 + total energy-change (2. order) :-0.6968962E-06 (-0.3198050E-05) + number of electron 8.0000007 magnetization + augmentation part 0.1910017 magnetization + + Broyden mixing: + rms(total) = 0.36355E-03 rms(broyden)= 0.36333E-03 + rms(prec ) = 0.47551E-03 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 1.2250 + 1.2250 1.2250 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23916342 + Ewald energy TEWEN = 128.83911758 + -Hartree energ DENC = -284.77226636 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.40378940 + PAW double counting = 89.31370581 -90.76512092 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -89.96683140 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12724294 eV + + energy without entropy = -24.12724294 energy(sigma->0) = -24.12724294 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 2( 4) --------------------------------------- + + + POTLOK: cpu time 0.0553: real time 0.0554 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0034 + RMM-DIIS: cpu time 0.0104: real time 0.0104 + ORTHCH: cpu time 0.0003: real time 0.0003 + DOS: cpu time 0.0001: real time 0.0001 + -------------------------------------------- + LOOP: cpu time 0.0702: real time 0.0704 + + eigenvalue-minimisations : 12 + total energy-change (2. order) : 0.1863032E-06 (-0.1750405E-06) + number of electron 8.0000007 magnetization + augmentation part 0.1910017 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23916342 + Ewald energy TEWEN = 128.83911758 + -Hartree energ DENC = -284.76495037 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.40346872 + PAW double counting = 89.30544624 -90.75683607 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -89.97385181 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12724275 eV + + energy without entropy = -24.12724275 energy(sigma->0) = -24.12724275 + + +-------------------------------------------------------------------------------------------------------- + + + + + average (electrostatic) potential at core + the test charge radii are 0.5201 0.6991 + (the norm of the test charge is 1.0000) + 1 -41.5622 2 -41.5589 3 -41.5625 4 -41.5612 5 -58.9962 + + + + E-fermi : -9.1113 XC(G=0): -0.6146 alpha+bet : -0.2111 + + Fermi energy: -9.1113244552 + + k-point 1 : 0.0000 0.0000 0.0000 + band No. band energies occupation + 1 -16.9271 2.00000 + 2 -9.3541 2.00000 + 3 -9.3537 2.00000 + 4 -9.3520 2.00000 + 5 -0.5426 0.00000 + 6 1.0435 0.00000 + 7 1.0580 0.00000 + 8 1.0626 0.00000 + + +-------------------------------------------------------------------------------------------------------- + + + soft charge-density along one line, spin component 1 + 0 1 2 3 4 5 6 7 8 9 + total charge-density along one line + + pseudopotential strength for first ion, spin component: 1 + -2.357 -0.011 -0.001 -0.002 0.001 + -0.011 0.050 -0.001 -0.002 0.001 + -0.001 -0.001 -0.339 0.002 -0.001 + -0.002 -0.002 0.002 -0.338 -0.001 + 0.001 0.001 -0.001 -0.001 -0.340 + total augmentation occupancy for first ion, spin component: 1 + 1.739 -0.486 0.166 0.233 -0.096 + -0.486 0.185 -0.053 -0.074 0.030 + 0.166 -0.053 0.023 0.020 -0.008 + 0.233 -0.074 0.020 0.037 -0.011 + -0.096 0.030 -0.008 -0.011 0.014 + + +------------------------ aborting loop because EDIFF is reached ---------------------------------------- + + + CHARGE: cpu time 0.0051: real time 0.0051 + FORLOC: cpu time 0.0037: real time 0.0037 + FORNL : cpu time 0.0013: real time 0.0013 + STRESS: cpu time 0.0214: real time 0.0214 + FORHAR: cpu time 0.0130: real time 0.0130 + MIXING: cpu time 0.0021: real time 0.0021 + OFIELD: cpu time 0.0000: real time 0.0000 + + FORCE on cell =-STRESS in cart. coord. units (eV): + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Alpha Z 0.23916 0.23916 0.23916 + Ewald 42.91451 42.96761 42.95695 -0.01990 0.00257 0.00040 + Hartree 94.90593 94.93242 94.92459 -0.01349 0.00076 0.00110 + E(xc) -27.06317 -27.06326 -27.06315 -0.00016 0.00001 0.00000 + Local -196.97779 -197.04696 -197.03093 0.03332 -0.00258 -0.00190 + n-local -15.56929 -15.57035 -15.56939 -0.00050 -0.00010 0.00002 + augment 0.19029 0.19050 0.19035 0.00001 -0.00006 -0.00004 + Kinetic 101.21889 101.22059 101.21464 0.00583 0.00000 -0.00069 + Fock 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 + ------------------------------------------------------------------------------------- + Total -0.14146 -0.13029 -0.13777 0.00511 0.00061 -0.00111 + in kB -0.22662 -0.20872 -0.22071 0.00818 0.00097 -0.00178 + external pressure = -1.22 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = -0.22 kB + Total+kin. -0.227 -0.209 -0.221 0.008 0.001 -0.002 + + VOLUME and BASIS-vectors are now : + ----------------------------------------------------------------------------- + energy-cutoff : 520.00 + volume of cell : 1000.12 + direct lattice vectors reciprocal lattice vectors + 10.001524767 -0.002342671 0.000853163 0.099984755 0.000000000 0.000000000 + 0.000000000 9.999300091 0.000429911 0.000023425 0.100007000 0.000000000 + 0.000000000 0.000000000 10.000423975 -0.000008531 -0.000004299 0.099995760 + + length of vectors + 10.001525078 9.999300101 10.000423975 0.099984755 0.100007002 0.099995761 + + + FORCES acting on ions + electron-ion (+dipol) ewald-force non-local-force convergence-correction + ----------------------------------------------------------------------------------------------- + -.168E+02 0.291E+02 0.408E+02 0.186E+02 -.322E+02 -.451E+02 -.177E+01 0.306E+01 0.429E+01 0.319E-05 0.284E-03 0.313E-03 + 0.524E+02 -.631E+01 0.327E+01 -.578E+02 0.697E+01 -.361E+01 0.551E+01 -.664E+00 0.343E+00 0.458E-03 0.131E-03 -.780E-04 + -.236E+02 -.473E+02 0.121E+01 0.260E+02 0.523E+02 -.134E+01 -.248E+01 -.498E+01 0.128E+00 -.894E-04 -.361E-03 0.260E-04 + -.120E+02 0.245E+02 -.453E+02 0.133E+02 -.271E+02 0.500E+02 -.126E+01 0.258E+01 -.476E+01 0.162E-03 0.316E-03 -.402E-03 + 0.352E-01 0.260E-01 -.662E-02 -.424E-01 -.295E-01 0.829E-02 -.203E-02 0.794E-03 -.103E-02 -.175E-03 -.233E-03 -.163E-03 + ----------------------------------------------------------------------------------------------- + 0.530E-02 0.576E-02 0.233E-03 -.178E-14 0.354E-14 -.709E-14 -.456E-02 -.637E-02 0.235E-03 0.358E-03 0.137E-03 -.304E-03 + + + POSITION TOTAL-FORCE (eV/Angst) + ----------------------------------------------------------------------------------- + 5.38218 4.06754 3.60708 -0.014768 0.025269 0.037224 + 3.94666 4.80192 4.38551 0.054453 -0.008200 0.003241 + 5.52131 5.65218 4.42807 -0.018044 -0.036240 0.001120 + 5.28249 4.16291 5.39221 -0.011155 0.021607 -0.041895 + 5.03327 4.67105 4.45322 -0.009395 -0.002909 0.000474 + ----------------------------------------------------------------------------------- + total drift: 0.001091 -0.000473 0.000164 + + +-------------------------------------------------------------------------------------------------------- + + + + FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy TOTEN = -24.12724275 eV + + energy without entropy= -24.12724275 energy(sigma->0) = -24.12724275 + enthalpy is TOTEN = -23.50301418 eV P V= 0.62422858 + + d Force = 0.1633910E-03[ 0.132E-03, 0.195E-03] d Energy = 0.6679337E-04 0.966E-04 + d Force =-0.1617756E+00[-0.162E+00,-0.162E+00] d Ewald =-0.1564140E+00-0.536E-02 + + +-------------------------------------------------------------------------------------------------------- + + + POTLOK: cpu time 0.0588: real time 0.0588 + + +-------------------------------------------------------------------------------------------------------- + + + OFIELD: cpu time 0.0000: real time 0.0000 + RANDOM_SEED = 283862281 114 0 + IONSTEP: cpu time 0.1698: real time 0.1843 + + ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV) + --------------------------------------------------- +% ion-electron TOTEN = -24.127243 see above + kinetic energy EKIN = 0.000200 + kin. lattice EKIN_LAT= 0.003501 (temperature 3.58 K) + nose potential ES = 0.000000 + nose kinetic EPS = 0.000000 + --------------------------------------------------- + total energy ETOTAL = -24.123542 eV + + maximum distance moved by ions : 0.14E-03 + + OFIELD: cpu time 0.0000: real time 0.0000 + + ML FORCE on cell =-STRESS in cart. coord. units (eV/cell) + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Total: -0.02269 -0.00091 -0.02248 0.01050 0.00429 -0.00320 + in kB -0.03635 -0.00145 -0.03601 0.01682 0.00687 -0.00513 + external pressure = -1.02 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = -0.02 kB + Total+kin. -0.036 -0.001 -0.036 0.017 0.007 -0.005 + volume of cell : 1000.23 + direct lattice vectors reciprocal lattice vectors + 10.003006767 -0.004715163 0.001714120 0.099969941 -0.000000000 -0.000000000 + 0.000000000 9.998558676 0.000846627 0.000047144 0.100014415 0.000000000 + 0.000000000 -0.000000000 10.000757138 -0.000017139 -0.000008467 0.099992429 + + length of vectors + 10.003008025 9.998558712 10.000757138 0.099969941 0.100014426 0.099992431 + + + POSITION TOTAL-FORCE (eV/Angst) (ML) + ----------------------------------------------------------------------------------- + 5.38273 4.06687 3.60888 -0.005703 0.001764 0.008718 + 3.94848 4.80068 4.38628 0.017890 -0.005978 0.002622 + 5.52145 5.64931 4.42908 0.001066 0.003984 0.001151 + 5.28312 4.16171 5.39214 -0.007233 0.005835 -0.015892 + 5.03397 4.66952 4.45406 -0.006021 -0.005604 0.003401 + ----------------------------------------------------------------------------------- + total drift: 0.000000 0.000000 -0.000000 + + +-------------------------------------------------------------------------------------------------------- + + + + ML FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy ML TOTEN = -24.12738815 eV + + ML energy without entropy= -24.12738815 ML energy(sigma->0) = -24.12738815 + + enthalpy is ML TOTEN = -23.50309257 eV P V= 0.62429558 + + WAVPRE: cpu time 0.0096: real time 0.0098 + FEWALD: cpu time 0.0002: real time 0.0002 + GENKIN: cpu time 0.0005: real time 0.0005 + ORTHCH: cpu time 0.0010: real time 0.0010 + LOOP+: cpu time 0.6044: real time 0.6211 + + +--------------------------------------- Iteration 3( 1) --------------------------------------- + + + POTLOK: cpu time 0.0564: real time 0.0565 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDAV: cpu time 0.0267: real time 0.0267 + DOS: cpu time 0.0005: real time 0.0005 + CHARGE: cpu time 0.0050: real time 0.0050 + MIXING: cpu time 0.0019: real time 0.0019 + -------------------------------------------- + LOOP: cpu time 0.0915: real time 0.0916 + + eigenvalue-minimisations : 32 + total energy-change (2. order) :-0.1746511E-03 (-0.3450564E-03) + number of electron 8.0000007 magnetization + augmentation part 0.1915077 magnetization + + Broyden mixing: + rms(total) = 0.38422E-02 rms(broyden)= 0.38412E-02 + rms(prec ) = 0.52817E-02 + weight for this iteration 100.00 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23913775 + Ewald energy TEWEN = 129.12002510 + -Hartree energ DENC = -284.91442329 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.41084863 + PAW double counting = 89.30894760 -90.76019412 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.11295880 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12741759 eV + + energy without entropy = -24.12741759 energy(sigma->0) = -24.12741759 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 3( 2) --------------------------------------- + + + POTLOK: cpu time 0.0573: real time 0.0575 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0039: real time 0.0039 + RMM-DIIS: cpu time 0.0136: real time 0.0136 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0050: real time 0.0050 + MIXING: cpu time 0.0017: real time 0.0017 + -------------------------------------------- + LOOP: cpu time 0.0828: real time 0.0829 + + eigenvalue-minimisations : 16 + total energy-change (2. order) : 0.4828479E-04 (-0.1444238E-04) + number of electron 8.0000007 magnetization + augmentation part 0.1914134 magnetization + + Broyden mixing: + rms(total) = 0.13377E-02 rms(broyden)= 0.13376E-02 + rms(prec ) = 0.17650E-02 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 1.4868 + 1.4868 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23913775 + Ewald energy TEWEN = 129.12002510 + -Hartree energ DENC = -284.98784245 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.41478583 + PAW double counting = 89.46501121 -90.91652449 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.04316178 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12736931 eV + + energy without entropy = -24.12736931 energy(sigma->0) = -24.12736931 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 3( 3) --------------------------------------- + + + POTLOK: cpu time 0.0571: real time 0.0572 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0035: real time 0.0035 + RMM-DIIS: cpu time 0.0126: real time 0.0126 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0050: real time 0.0050 + MIXING: cpu time 0.0019: real time 0.0019 + -------------------------------------------- + LOOP: cpu time 0.0812: real time 0.0814 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.2422001E-05 (-0.9368841E-05) + number of electron 8.0000007 magnetization + augmentation part 0.1913363 magnetization + + Broyden mixing: + rms(total) = 0.60998E-03 rms(broyden)= 0.60958E-03 + rms(prec ) = 0.77351E-03 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 1.0041 + 1.3123 0.6960 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23913775 + Ewald energy TEWEN = 129.12002510 + -Hartree energ DENC = -285.02230627 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.41677469 + PAW double counting = 89.55329552 -91.00469810 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.01079995 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12737173 eV + + energy without entropy = -24.12737173 energy(sigma->0) = -24.12737173 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 3( 4) --------------------------------------- + + + POTLOK: cpu time 0.0589: real time 0.0594 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0098: real time 0.0100 + ORTHCH: cpu time 0.0003: real time 0.0761 + DOS: cpu time 0.0001: real time 0.0001 + -------------------------------------------- + LOOP: cpu time 0.0733: real time 0.1497 + + eigenvalue-minimisations : 12 + total energy-change (2. order) : 0.2510364E-06 (-0.4260472E-06) + number of electron 8.0000007 magnetization + augmentation part 0.1913363 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23913775 + Ewald energy TEWEN = 129.12002510 + -Hartree energ DENC = -285.01556747 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.41650856 + PAW double counting = 89.54721031 -90.99833546 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.01754980 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12737148 eV + + energy without entropy = -24.12737148 energy(sigma->0) = -24.12737148 + + +-------------------------------------------------------------------------------------------------------- + + + + + average (electrostatic) potential at core + the test charge radii are 0.5201 0.6991 + (the norm of the test charge is 1.0000) + 1 -41.5730 2 -41.5669 3 -41.5745 4 -41.5692 5 -58.9867 + + + + E-fermi : -9.1185 XC(G=0): -0.6228 alpha+bet : -0.2111 + + Fermi energy: -9.1185412810 + + k-point 1 : 0.0000 0.0000 0.0000 + band No. band energies occupation + 1 -16.9357 2.00000 + 2 -9.3595 2.00000 + 3 -9.3573 2.00000 + 4 -9.3563 2.00000 + 5 -0.5440 0.00000 + 6 0.9905 0.00000 + 7 1.0451 0.00000 + 8 1.0571 0.00000 + + +-------------------------------------------------------------------------------------------------------- + + + soft charge-density along one line, spin component 1 + 0 1 2 3 4 5 6 7 8 9 + total charge-density along one line + + pseudopotential strength for first ion, spin component: 1 + -2.358 -0.011 -0.001 -0.002 0.001 + -0.011 0.050 -0.001 -0.002 0.001 + -0.001 -0.001 -0.339 0.002 -0.001 + -0.002 -0.002 0.002 -0.338 -0.001 + 0.001 0.001 -0.001 -0.001 -0.340 + total augmentation occupancy for first ion, spin component: 1 + 1.742 -0.486 0.167 0.234 -0.097 + -0.486 0.185 -0.053 -0.074 0.031 + 0.167 -0.053 0.023 0.020 -0.008 + 0.234 -0.074 0.020 0.037 -0.011 + -0.097 0.031 -0.008 -0.011 0.014 + + +------------------------ aborting loop because EDIFF is reached ---------------------------------------- + + + CHARGE: cpu time 0.0058: real time 0.0058 + FORLOC: cpu time 0.0043: real time 0.0043 + FORNL : cpu time 0.0014: real time 0.0014 + STRESS: cpu time 0.0214: real time 0.0214 + FORHAR: cpu time 0.0129: real time 0.0129 + MIXING: cpu time 0.0021: real time 0.0021 + OFIELD: cpu time 0.0000: real time 0.0000 + + FORCE on cell =-STRESS in cart. coord. units (eV): + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Alpha Z 0.23914 0.23914 0.23914 + Ewald 42.99968 43.08225 43.03805 -0.04447 0.00385 0.00308 + Hartree 94.97529 95.02367 95.00474 -0.02586 -0.00149 0.00457 + E(xc) -27.07690 -27.07707 -27.07697 -0.00034 -0.00004 0.00004 + Local -197.11680 -197.23261 -197.18136 0.06895 0.00068 -0.00913 + n-local -15.59867 -15.60095 -15.59872 -0.00114 -0.00063 0.00034 + augment 0.18991 0.19003 0.19001 0.00001 -0.00009 -0.00002 + Kinetic 101.29657 101.30477 101.29624 0.01522 0.00306 -0.00305 + Fock 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 + ------------------------------------------------------------------------------------- + Total -0.09178 -0.07077 -0.08889 0.01238 0.00533 -0.00418 + in kB -0.14701 -0.11335 -0.14239 0.01982 0.00854 -0.00669 + external pressure = -1.13 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = -0.13 kB + Total+kin. -0.147 -0.113 -0.142 0.020 0.009 -0.007 + + VOLUME and BASIS-vectors are now : + ----------------------------------------------------------------------------- + energy-cutoff : 520.00 + volume of cell : 1000.23 + direct lattice vectors reciprocal lattice vectors + 10.003006767 -0.004715163 0.001714120 0.099969941 -0.000000000 -0.000000000 + 0.000000000 9.998558676 0.000846627 0.000047144 0.100014415 0.000000000 + 0.000000000 -0.000000000 10.000757138 -0.000017139 -0.000008467 0.099992429 + + length of vectors + 10.003008025 9.998558712 10.000757138 0.099969941 0.100014426 0.099992431 + + + FORCES acting on ions + electron-ion (+dipol) ewald-force non-local-force convergence-correction + ----------------------------------------------------------------------------------------------- + -.169E+02 0.292E+02 0.409E+02 0.186E+02 -.322E+02 -.452E+02 -.178E+01 0.307E+01 0.431E+01 -.429E-03 0.101E-02 0.133E-02 + 0.524E+02 -.634E+01 0.327E+01 -.579E+02 0.700E+01 -.362E+01 0.553E+01 -.669E+00 0.345E+00 0.178E-02 -.434E-04 -.231E-04 + -.236E+02 -.474E+02 0.121E+01 0.261E+02 0.524E+02 -.134E+01 -.249E+01 -.500E+01 0.128E+00 -.677E-03 -.156E-02 0.845E-06 + -.120E+02 0.245E+02 -.453E+02 0.133E+02 -.271E+02 0.501E+02 -.127E+01 0.258E+01 -.478E+01 -.154E-03 0.101E-02 -.164E-02 + 0.727E-01 0.652E-01 -.306E-01 -.845E-01 -.745E-01 0.366E-01 -.130E-02 -.450E-03 0.168E-02 -.143E-03 -.293E-03 -.287E-04 + ----------------------------------------------------------------------------------------------- + 0.115E-01 0.143E-01 -.731E-02 0.534E-14 -.357E-14 0.713E-14 -.108E-01 -.148E-01 0.783E-02 0.378E-03 0.121E-03 -.361E-03 + + + POSITION TOTAL-FORCE (eV/Angst) + ----------------------------------------------------------------------------------- + 5.38273 4.06687 3.60888 -0.003244 0.002252 0.005300 + 3.94848 4.80068 4.38628 0.019887 -0.006329 0.001733 + 5.52145 5.64931 4.42908 0.003680 0.006508 0.000486 + 5.28312 4.16171 5.39214 -0.005964 0.007259 -0.014990 + 5.03397 4.66952 4.45406 -0.013299 -0.010050 0.007630 + ----------------------------------------------------------------------------------- + total drift: 0.001061 -0.000360 0.000160 + + +-------------------------------------------------------------------------------------------------------- + + + + FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy TOTEN = -24.12737148 eV + + energy without entropy= -24.12737148 energy(sigma->0) = -24.12737148 + enthalpy is TOTEN = -23.50307590 eV P V= 0.62429558 + + d Force = 0.1365306E-03[ 0.403E-04, 0.233E-03] d Energy = 0.6172069E-04 0.748E-04 + d Force =-0.2855262E+00[-0.286E+00,-0.285E+00] d Ewald =-0.2809075E+00-0.462E-02 + + +-------------------------------------------------------------------------------------------------------- + + + POTLOK: cpu time 0.0562: real time 0.0572 + + +-------------------------------------------------------------------------------------------------------- + + + OFIELD: cpu time 0.0000: real time 0.0000 + RANDOM_SEED = 283862281 162 0 + IONSTEP: cpu time 0.1630: real time 0.1634 + + ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV) + --------------------------------------------------- +% ion-electron TOTEN = -24.127371 see above + kinetic energy EKIN = 0.000354 + kin. lattice EKIN_LAT= 0.003480 (temperature 3.71 K) + nose potential ES = 0.000000 + nose kinetic EPS = 0.000000 + --------------------------------------------------- + total energy ETOTAL = -24.123537 eV + + maximum distance moved by ions : 0.15E-03 + + OFIELD: cpu time 0.0000: real time 0.0000 + + ML FORCE on cell =-STRESS in cart. coord. units (eV/cell) + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Total: 0.04463 0.07078 0.03938 0.01440 0.00696 -0.00472 + in kB 0.07148 0.11337 0.06307 0.02307 0.01115 -0.00756 + external pressure = -0.92 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = 0.08 kB + Total+kin. 0.072 0.114 0.063 0.023 0.011 -0.008 + volume of cell : 1000.33 + direct lattice vectors reciprocal lattice vectors + 10.004437802 -0.007098076 0.002622609 0.099955642 -0.000000000 0.000000000 + 0.000000000 9.997809556 0.001204539 0.000070965 0.100021909 0.000000000 + -0.000000000 -0.000000000 10.001063584 -0.000026220 -0.000012047 0.099989365 + + length of vectors + 10.004440664 9.997809629 10.001063584 0.099955642 0.100021934 0.099989369 + + + POSITION TOTAL-FORCE (eV/Angst) (ML) + ----------------------------------------------------------------------------------- + 5.38317 4.06633 3.61060 0.008312 -0.025622 -0.025738 + 3.95055 4.79954 4.38702 -0.027423 -0.002673 0.000867 + 5.52148 5.64655 4.42994 0.024088 0.049406 0.000984 + 5.28370 4.16073 5.39195 0.001108 -0.014532 0.018921 + 5.03467 4.66795 4.45488 -0.006085 -0.006580 0.004965 + ----------------------------------------------------------------------------------- + total drift: 0.000000 -0.000000 0.000000 + + +-------------------------------------------------------------------------------------------------------- + + + + ML FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy ML TOTEN = -24.12729692 eV + + ML energy without entropy= -24.12729692 ML energy(sigma->0) = -24.12729692 + + enthalpy is ML TOTEN = -23.50293968 eV P V= 0.62435724 + + LOOP+: cpu time 0.5988: real time 0.7244 + RANDOM_SEED = 283862281 210 0 + IONSTEP: cpu time 0.0006: real time 0.0006 + + ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV) + --------------------------------------------------- +% ion-electron TOTEN = -23.502940 see above + kinetic energy EKIN = 0.000324 + kin. lattice EKIN_LAT= 0.003419 (temperature 3.62 K) + nose potential ES = 0.000000 + nose kinetic EPS = 0.000000 + --------------------------------------------------- + total energy ETOTAL = -23.499197 eV + + OFIELD: cpu time 0.0000: real time 0.0000 + + ML FORCE on cell =-STRESS in cart. coord. units (eV/cell) + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Total: 0.09499 0.12555 0.09187 0.01588 0.00662 -0.00475 + in kB 0.15213 0.20107 0.14713 0.02544 0.01061 -0.00760 + external pressure = -0.83 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = 0.17 kB + Total+kin. 0.152 0.201 0.147 0.025 0.011 -0.008 + volume of cell : 1000.41 + direct lattice vectors reciprocal lattice vectors + 10.005811992 -0.009476043 0.003546260 0.099941914 -0.000000000 -0.000000000 + 0.000000000 9.996997221 0.001586820 0.000094734 0.100030037 0.000000000 + 0.000000000 -0.000000000 10.001339909 -0.000035452 -0.000015871 0.099986603 + + length of vectors + 10.005817108 9.996997347 10.001339909 0.099941914 0.100030082 0.099986610 + + + POSITION TOTAL-FORCE (eV/Angst) (ML) + ----------------------------------------------------------------------------------- + 5.38366 4.06531 3.61238 0.018774 -0.046009 -0.053197 + 3.95233 4.79835 4.38784 -0.061552 0.000611 -0.001105 + 5.52169 5.64406 4.43077 0.040478 0.083410 0.000202 + 5.28436 4.15971 5.39182 0.008457 -0.032109 0.050141 + 5.03534 4.66638 4.45578 -0.006157 -0.005903 0.003959 + ----------------------------------------------------------------------------------- + total drift: -0.000000 0.000000 -0.000000 + + +-------------------------------------------------------------------------------------------------------- + + + + ML FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy ML TOTEN = -24.12706616 eV + + ML energy without entropy= -24.12706616 ML energy(sigma->0) = -24.12706616 + + enthalpy is ML TOTEN = -23.50265664 eV P V= 0.62440952 + + LOOP+: cpu time 0.0015: real time 0.0017 + RANDOM_SEED = 283862281 258 0 + IONSTEP: cpu time 0.0006: real time 0.0006 + + ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV) + --------------------------------------------------- +% ion-electron TOTEN = -23.502657 see above + kinetic energy EKIN = 0.000141 + kin. lattice EKIN_LAT= 0.003394 (temperature 3.42 K) + nose potential ES = 0.000000 + nose kinetic EPS = 0.000000 + --------------------------------------------------- + total energy ETOTAL = -23.499121 eV + + OFIELD: cpu time 0.0000: real time 0.0000 + + ML FORCE on cell =-STRESS in cart. coord. units (eV/cell) + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Total: 0.11219 0.14285 0.11266 0.01421 0.00782 -0.00544 + in kB 0.17966 0.22876 0.18042 0.02276 0.01253 -0.00872 + external pressure = -0.80 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = 0.20 kB + Total+kin. 0.180 0.229 0.181 0.023 0.013 -0.009 + volume of cell : 1000.48 + direct lattice vectors reciprocal lattice vectors + 10.007124992 -0.011886170 0.004436715 0.099928801 -0.000000000 0.000000000 + 0.000000000 9.996125727 0.001863572 0.000118823 0.100038758 0.000000000 + -0.000000000 -0.000000000 10.001547736 -0.000044351 -0.000018640 0.099984525 + + length of vectors + 10.007133034 9.996125901 10.001547736 0.099928801 0.100038828 0.099984537 + + + POSITION TOTAL-FORCE (eV/Angst) (ML) + ----------------------------------------------------------------------------------- + 5.38426 4.06385 3.61363 0.023426 -0.054326 -0.064816 + 3.95338 4.79697 4.38836 -0.073490 0.002314 -0.001376 + 5.52206 5.64234 4.43155 0.044640 0.092764 0.000430 + 5.28515 4.15831 5.39216 0.011124 -0.037935 0.061930 + 5.03597 4.66473 4.45658 -0.005701 -0.002818 0.003831 + ----------------------------------------------------------------------------------- + total drift: -0.000000 -0.000000 -0.000000 + + +-------------------------------------------------------------------------------------------------------- + + + + ML FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy ML TOTEN = -24.12695084 eV + + ML energy without entropy= -24.12695084 ML energy(sigma->0) = -24.12695084 + + enthalpy is ML TOTEN = -23.50250084 eV P V= 0.62444999 + + WAVPRE: cpu time 0.0096: real time 0.0098 + FEWALD: cpu time 0.0002: real time 0.0002 + GENKIN: cpu time 0.0005: real time 0.0005 + ORTHCH: cpu time 0.0007: real time 0.0007 + LOOP+: cpu time 0.0133: real time 0.0137 + + +--------------------------------------- Iteration 6( 1) --------------------------------------- + + + POTLOK: cpu time 0.0562: real time 0.0564 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDAV: cpu time 0.0203: real time 0.0203 + DOS: cpu time 0.0007: real time 0.0007 + -------------------------------------------- + LOOP: cpu time 0.0782: real time 0.0783 + + eigenvalue-minimisations : 24 + total energy-change (2. order) : 0.1199621E-03 (-0.1932763E-02) + number of electron 8.0000007 magnetization + augmentation part 0.1913366 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23907862 + Ewald energy TEWEN = 129.77161038 + -Hartree energ DENC = -285.35065823 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.43314619 + PAW double counting = 89.54024632 -90.99063737 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.35123721 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12725177 eV + + energy without entropy = -24.12725177 energy(sigma->0) = -24.12725177 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 6( 2) --------------------------------------- + + + EDDAV: cpu time 0.0251: real time 0.0253 + DOS: cpu time 0.0001: real time 0.0001 + -------------------------------------------- + LOOP: cpu time 0.0252: real time 0.0254 + + eigenvalue-minimisations : 32 + total energy-change (2. order) :-0.6033886E-05 (-0.6033886E-05) + number of electron 8.0000007 magnetization + augmentation part 0.1913366 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23907862 + Ewald energy TEWEN = 129.77161038 + -Hartree energ DENC = -285.35065823 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.43314619 + PAW double counting = 89.54024632 -90.99063737 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.35124325 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12725780 eV + + energy without entropy = -24.12725780 energy(sigma->0) = -24.12725780 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 6( 3) --------------------------------------- + + + EDDAV: cpu time 0.0246: real time 0.0247 + DOS: cpu time 0.0001: real time 0.0001 + -------------------------------------------- + LOOP: cpu time 0.0247: real time 0.0248 + + eigenvalue-minimisations : 32 + total energy-change (2. order) :-0.1278295E-08 (-0.1278273E-08) + number of electron 8.0000007 magnetization + augmentation part 0.1913366 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23907862 + Ewald energy TEWEN = 129.77161038 + -Hartree energ DENC = -285.35065823 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.43314619 + PAW double counting = 89.54024632 -90.99063737 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.35124325 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12725780 eV + + energy without entropy = -24.12725780 energy(sigma->0) = -24.12725780 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 6( 4) --------------------------------------- + + + EDDAV: cpu time 0.0146: real time 0.0148 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0050: real time 0.0050 + MIXING: cpu time 0.0023: real time 0.0023 + -------------------------------------------- + LOOP: cpu time 0.0220: real time 0.0222 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.2842171E-12 (-0.3268497E-12) + number of electron 8.0000006 magnetization + augmentation part 0.1925236 magnetization + + Broyden mixing: + rms(total) = 0.93376E-02 rms(broyden)= 0.93351E-02 + rms(prec ) = 0.12840E-01 + weight for this iteration 100.00 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23907862 + Ewald energy TEWEN = 129.77161038 + -Hartree energ DENC = -285.35065823 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.43314619 + PAW double counting = 89.54024632 -90.99063737 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.35124325 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12725780 eV + + energy without entropy = -24.12725780 energy(sigma->0) = -24.12725780 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 6( 5) --------------------------------------- + + + POTLOK: cpu time 0.0575: real time 0.0577 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0053: real time 0.0053 + RMM-DIIS: cpu time 0.0140: real time 0.0140 + ORTHCH: cpu time 0.0008: real time 0.0008 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0051: real time 0.0051 + MIXING: cpu time 0.0017: real time 0.0017 + -------------------------------------------- + LOOP: cpu time 0.0854: real time 0.0855 + + eigenvalue-minimisations : 16 + total energy-change (2. order) : 0.2949021E-03 (-0.8794435E-04) + number of electron 8.0000006 magnetization + augmentation part 0.1922784 magnetization + + Broyden mixing: + rms(total) = 0.30884E-02 rms(broyden)= 0.30882E-02 + rms(prec ) = 0.41050E-02 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 1.4563 + 1.4563 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23907862 + Ewald energy TEWEN = 129.77161038 + -Hartree energ DENC = -285.52790995 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.44255722 + PAW double counting = 89.91225353 -91.36517099 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.18058123 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12696290 eV + + energy without entropy = -24.12696290 energy(sigma->0) = -24.12696290 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 6( 6) --------------------------------------- + + + POTLOK: cpu time 0.0577: real time 0.0578 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0133: real time 0.0133 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + CHARGE: cpu time 0.0050: real time 0.0050 + MIXING: cpu time 0.0017: real time 0.0017 + -------------------------------------------- + LOOP: cpu time 0.0822: real time 0.0823 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.1251783E-04 (-0.5293058E-04) + number of electron 8.0000006 magnetization + augmentation part 0.1921152 magnetization + + Broyden mixing: + rms(total) = 0.14286E-02 rms(broyden)= 0.14275E-02 + rms(prec ) = 0.18066E-02 + weight for this iteration 100.00 + + eigenvalues of (default mixing * dielectric matrix) + average eigenvalue GAMMA= 0.8500 + 1.4071 0.2929 + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23907862 + Ewald energy TEWEN = 129.77161038 + -Hartree energ DENC = -285.60703382 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.44702809 + PAW double counting = 90.11216482 -91.56507542 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.10594763 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12697542 eV + + energy without entropy = -24.12697542 energy(sigma->0) = -24.12697542 + + +-------------------------------------------------------------------------------------------------------- + + + + +--------------------------------------- Iteration 6( 7) --------------------------------------- + + + POTLOK: cpu time 0.0577: real time 0.0578 + SETDIJ: cpu time 0.0009: real time 0.0009 + EDDIAG: cpu time 0.0033: real time 0.0033 + RMM-DIIS: cpu time 0.0129: real time 0.0129 + ORTHCH: cpu time 0.0002: real time 0.0002 + DOS: cpu time 0.0001: real time 0.0001 + -------------------------------------------- + LOOP: cpu time 0.0751: real time 0.0752 + + eigenvalue-minimisations : 16 + total energy-change (2. order) :-0.1325224E-05 (-0.2970894E-05) + number of electron 8.0000006 magnetization + augmentation part 0.1921152 magnetization + + Free energy of the ion-electron system (eV) + --------------------------------------------------- + alpha Z PSCENC = 0.23907862 + Ewald energy TEWEN = 129.77161038 + -Hartree energ DENC = -285.59869592 + -exchange EXHF = 0.00000000 + -V(xc)+E(xc) XCENC = 25.44671036 + PAW double counting = 90.10531907 -91.55788882 + entropy T*S EENTRO = -0.00000000 + eigenvalues EBANDS = -90.11430998 + atomic energy EATOM = 197.58119954 + Solvation Ediel_sol = 0.00000000 + --------------------------------------------------- + free energy TOTEN = -24.12697674 eV + + energy without entropy = -24.12697674 energy(sigma->0) = -24.12697674 + + +-------------------------------------------------------------------------------------------------------- + + + + + average (electrostatic) potential at core + the test charge radii are 0.5201 0.6991 + (the norm of the test charge is 1.0000) + 1 -41.5951 2 -41.5855 3 -41.5946 4 -41.5893 5 -58.9628 + + + + E-fermi : -9.0713 XC(G=0): -0.6467 alpha+bet : -0.2110 + + Fermi energy: -9.0713031286 + + k-point 1 : 0.0000 0.0000 0.0000 + band No. band energies occupation + 1 -16.9548 2.00000 + 2 -9.3737 2.00000 + 3 -9.3672 2.00000 + 4 -9.3614 2.00000 + 5 -0.5503 0.00000 + 6 0.9390 0.00000 + 7 1.0355 0.00000 + 8 1.0484 0.00000 + + +-------------------------------------------------------------------------------------------------------- + + + soft charge-density along one line, spin component 1 + 0 1 2 3 4 5 6 7 8 9 + total charge-density along one line + + pseudopotential strength for first ion, spin component: 1 + -2.358 -0.011 -0.001 -0.002 0.001 + -0.011 0.050 -0.001 -0.002 0.001 + -0.001 -0.001 -0.339 0.002 -0.001 + -0.002 -0.002 0.002 -0.338 -0.001 + 0.001 0.001 -0.001 -0.001 -0.340 + total augmentation occupancy for first ion, spin component: 1 + 1.748 -0.487 0.168 0.236 -0.098 + -0.487 0.186 -0.053 -0.075 0.031 + 0.168 -0.053 0.023 0.020 -0.008 + 0.236 -0.075 0.020 0.037 -0.012 + -0.098 0.031 -0.008 -0.012 0.014 + + +------------------------ aborting loop because EDIFF is reached ---------------------------------------- + + + CHARGE: cpu time 0.0051: real time 0.0051 + FORLOC: cpu time 0.0037: real time 0.0037 + FORNL : cpu time 0.0014: real time 0.0014 + STRESS: cpu time 0.0214: real time 0.0214 + FORHAR: cpu time 0.0127: real time 0.0129 + MIXING: cpu time 0.0021: real time 0.0020 + OFIELD: cpu time 0.0000: real time 0.0000 + + FORCE on cell =-STRESS in cart. coord. units (eV): + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Alpha Z 0.23908 0.23908 0.23908 + Ewald 43.16907 43.35547 43.24702 -0.16439 -0.00729 0.04687 + Hartree 95.11615 95.25745 95.18234 -0.06239 -0.00387 0.01945 + E(xc) -27.10865 -27.10891 -27.10894 -0.00111 -0.00010 0.00034 + Local -197.39092 -197.70358 -197.53102 0.20353 0.01233 -0.06063 + n-local -15.66511 -15.66738 -15.66556 -0.00114 -0.00096 0.00058 + augment 0.18897 0.18898 0.18899 0.00020 -0.00007 -0.00007 + Kinetic 101.48298 101.48419 101.48693 0.04225 0.00750 -0.01441 + Fock 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 + ------------------------------------------------------------------------------------- + Total 0.03157 0.04530 0.03883 0.01695 0.00754 -0.00786 + in kB 0.05056 0.07254 0.06219 0.02715 0.01208 -0.01259 + external pressure = -0.94 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = 0.06 kB + Total+kin. 0.051 0.073 0.062 0.027 0.012 -0.013 + + VOLUME and BASIS-vectors are now : + ----------------------------------------------------------------------------- + energy-cutoff : 520.00 + volume of cell : 1000.48 + direct lattice vectors reciprocal lattice vectors + 10.007124992 -0.011886170 0.004436715 0.099928801 -0.000000000 0.000000000 + 0.000000000 9.996125727 0.001863572 0.000118823 0.100038758 0.000000000 + -0.000000000 -0.000000000 10.001547736 -0.000044351 -0.000018640 0.099984525 + + length of vectors + 10.007133034 9.996125901 10.001547736 0.099928801 0.100038828 0.099984537 + + + FORCES acting on ions + electron-ion (+dipol) ewald-force non-local-force convergence-correction + ----------------------------------------------------------------------------------------------- + -.169E+02 0.292E+02 0.410E+02 0.188E+02 -.324E+02 -.454E+02 -.179E+01 0.309E+01 0.434E+01 -.155E-02 0.323E-02 0.447E-02 + 0.526E+02 -.642E+01 0.331E+01 -.582E+02 0.710E+01 -.366E+01 0.556E+01 -.682E+00 0.351E+00 0.561E-02 -.354E-03 -.281E-04 + -.237E+02 -.476E+02 0.121E+01 0.262E+02 0.527E+02 -.135E+01 -.250E+01 -.504E+01 0.129E+00 -.246E-02 -.578E-02 0.201E-03 + -.121E+02 0.246E+02 -.455E+02 0.134E+02 -.273E+02 0.503E+02 -.128E+01 0.260E+01 -.481E+01 -.662E-03 0.281E-02 -.518E-02 + 0.116E+00 0.125E+00 -.666E-01 -.130E+00 -.135E+00 0.757E-01 0.715E-02 0.156E-01 -.305E-02 -.438E-03 -.106E-02 -.408E-03 + ----------------------------------------------------------------------------------------------- + 0.100E-01 0.800E-02 -.809E-02 0.888E-14 0.000E+00 0.000E+00 -.980E-02 -.679E-02 0.913E-02 0.509E-03 -.115E-02 -.951E-03 + + + POSITION TOTAL-FORCE (eV/Angst) + ----------------------------------------------------------------------------------- + 5.38426 4.06385 3.61363 0.024419 -0.049633 -0.069040 + 3.95338 4.79697 4.38836 -0.071515 -0.003306 -0.000696 + 5.52206 5.64234 4.43155 0.046633 0.083639 -0.001086 + 5.28515 4.15831 5.39216 0.009183 -0.034893 0.065236 + 5.03597 4.66473 4.45658 -0.007990 0.004255 0.005674 + ----------------------------------------------------------------------------------- + total drift: 0.000730 0.000064 0.000088 + + +-------------------------------------------------------------------------------------------------------- + + + + FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy TOTEN = -24.12697674 eV + + energy without entropy= -24.12697674 energy(sigma->0) = -24.12697674 + enthalpy is TOTEN = -23.50252675 eV P V= 0.62444999 + + d Force =-0.4086392E-03[-0.933E-03, 0.116E-03] d Energy =-0.5491456E-03 0.141E-03 + d Force =-0.6623187E+00[-0.664E+00,-0.661E+00] d Ewald =-0.6515853E+00-0.107E-01 + + +-------------------------------------------------------------------------------------------------------- + + + POTLOK: cpu time 0.0563: real time 0.0563 + + +-------------------------------------------------------------------------------------------------------- + + + OFIELD: cpu time 0.0000: real time 0.0000 + RANDOM_SEED = 283862281 306 0 + IONSTEP: cpu time 0.1635: real time 0.1641 + + ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV) + --------------------------------------------------- +% ion-electron TOTEN = -24.126977 see above + kinetic energy EKIN = 0.000043 + kin. lattice EKIN_LAT= 0.003370 (temperature 3.30 K) + nose potential ES = 0.000000 + nose kinetic EPS = 0.000000 + --------------------------------------------------- + total energy ETOTAL = -24.123564 eV + + maximum distance moved by ions : 0.96E-04 + + OFIELD: cpu time 0.0000: real time 0.0000 + + ML FORCE on cell =-STRESS in cart. coord. units (eV/cell) + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Total: 0.08931 0.11524 0.09970 0.00852 0.00418 -0.00346 + in kB 0.14301 0.18453 0.15966 0.01364 0.00669 -0.00554 + external pressure = -0.84 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = 0.16 kB + Total+kin. 0.143 0.185 0.160 0.014 0.007 -0.006 + volume of cell : 1000.53 + direct lattice vectors reciprocal lattice vectors + 10.008368905 -0.014284955 0.005356384 0.099916381 -0.000000000 0.000000000 + 0.000000000 9.995201345 0.002089127 0.000142799 0.100048010 0.000000000 + -0.000000000 -0.000000000 10.001694428 -0.000053540 -0.000020898 0.099983059 + + length of vectors + 10.008380533 9.995201563 10.001694428 0.099916381 0.100048111 0.099983075 + + + POSITION TOTAL-FORCE (eV/Angst) (ML) + ----------------------------------------------------------------------------------- + 5.38502 4.06171 3.61434 0.019134 -0.044730 -0.055248 + 3.95360 4.79533 4.38886 -0.058857 0.002524 -0.001598 + 5.52270 5.64145 4.43227 0.033670 0.072506 -0.000146 + 5.28601 4.15677 5.39290 0.010140 -0.033710 0.056667 + 5.03649 4.66302 4.45732 -0.004087 0.003410 0.000325 + ----------------------------------------------------------------------------------- + total drift: 0.000000 -0.000000 -0.000000 + + +-------------------------------------------------------------------------------------------------------- + + + + ML FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy ML TOTEN = -24.12708815 eV + + ML energy without entropy= -24.12708815 ML energy(sigma->0) = -24.12708815 + + enthalpy is ML TOTEN = -23.50260913 eV P V= 0.62447902 + + LOOP+: cpu time 0.6619: real time 0.6662 + RANDOM_SEED = 283862281 354 0 + IONSTEP: cpu time 0.0007: real time 0.0013 + + ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV) + --------------------------------------------------- +% ion-electron TOTEN = -23.502609 see above + kinetic energy EKIN = 0.000179 + kin. lattice EKIN_LAT= 0.003334 (temperature 3.40 K) + nose potential ES = 0.000000 + nose kinetic EPS = 0.000000 + --------------------------------------------------- + total energy ETOTAL = -23.499096 eV + + OFIELD: cpu time 0.0000: real time 0.0000 + + ML FORCE on cell =-STRESS in cart. coord. units (eV/cell) + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Total: 0.03455 0.05217 0.05630 0.00044 0.00065 -0.00144 + in kB 0.05532 0.08353 0.09016 0.00071 0.00104 -0.00230 + external pressure = -0.92 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = 0.08 kB + Total+kin. 0.056 0.084 0.090 0.001 0.001 -0.002 + volume of cell : 1000.55 + direct lattice vectors reciprocal lattice vectors + 10.009538389 -0.016644227 0.006272819 0.099904707 0.000000000 -0.000000000 + -0.000000000 9.994202986 0.002391195 0.000166380 0.100058004 0.000000000 + 0.000000000 -0.000000000 10.001788318 -0.000062697 -0.000023922 0.099982120 + + length of vectors + 10.009554193 9.994203272 10.001788318 0.099904707 0.100058142 0.099982143 + + + POSITION TOTAL-FORCE (eV/Angst) (ML) + ----------------------------------------------------------------------------------- + 5.38575 4.05929 3.61446 0.008579 -0.022966 -0.029710 + 3.95304 4.79376 4.38957 -0.022923 0.000856 -0.000680 + 5.52384 5.64127 4.43321 0.011309 0.029103 -0.000282 + 5.28688 4.15481 5.39431 0.004818 -0.019167 0.033309 + 5.03695 4.66126 4.45814 -0.001784 0.012174 -0.002637 + ----------------------------------------------------------------------------------- + total drift: 0.000000 0.000000 0.000000 + + +-------------------------------------------------------------------------------------------------------- + + + + ML FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy ML TOTEN = -24.12731626 eV + + ML energy without entropy= -24.12731626 ML energy(sigma->0) = -24.12731626 + + enthalpy is ML TOTEN = -23.50282079 eV P V= 0.62449547 + + LOOP+: cpu time 0.0016: real time 0.0024 + RANDOM_SEED = 283862281 402 0 + IONSTEP: cpu time 0.0006: real time 0.0030 + + ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV) + --------------------------------------------------- +% ion-electron TOTEN = -23.502821 see above + kinetic energy EKIN = 0.000433 + kin. lattice EKIN_LAT= 0.003358 (temperature 3.67 K) + nose potential ES = 0.000000 + nose kinetic EPS = 0.000000 + --------------------------------------------------- + total energy ETOTAL = -23.499029 eV + + OFIELD: cpu time 0.0000: real time 0.0000 + + ML FORCE on cell =-STRESS in cart. coord. units (eV/cell) + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Total: -0.04264 -0.02738 -0.01300 -0.00314 -0.00257 0.00019 + in kB -0.06828 -0.04385 -0.02081 -0.00504 -0.00412 0.00030 + external pressure = -1.04 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = -0.04 kB + Total+kin. -0.068 -0.043 -0.020 -0.005 -0.004 0.000 + volume of cell : 1000.57 + direct lattice vectors reciprocal lattice vectors + 10.010652335 -0.019025302 0.007189362 0.099893590 0.000000000 -0.000000000 + -0.000000000 9.993136707 0.002664900 0.000190181 0.100068680 0.000000000 + 0.000000000 -0.000000000 10.001883736 -0.000071854 -0.000026662 0.099981166 + + length of vectors + 10.010672996 9.993137062 10.001883736 0.099893590 0.100068861 0.099981196 + + + POSITION TOTAL-FORCE (eV/Angst) (ML) + ----------------------------------------------------------------------------------- + 5.38675 4.05671 3.61409 -0.008107 0.006771 0.009126 + 3.95196 4.79233 4.39031 0.028755 -0.004185 0.001455 + 5.52498 5.64124 4.43418 -0.014858 -0.021888 -0.000071 + 5.28791 4.15241 5.39608 -0.005395 0.002477 -0.005537 + 5.03734 4.65950 4.45892 -0.000396 0.016825 -0.004974 + ----------------------------------------------------------------------------------- + total drift: 0.000000 -0.000000 -0.000000 + + +-------------------------------------------------------------------------------------------------------- + + + + ML FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy ML TOTEN = -24.12735379 eV + + ML energy without entropy= -24.12735379 ML energy(sigma->0) = -24.12735379 + + enthalpy is ML TOTEN = -23.50284950 eV P V= 0.62450429 + + LOOP+: cpu time 0.0017: real time 0.0042 + RANDOM_SEED = 283862281 450 0 + IONSTEP: cpu time 0.0006: real time 0.0006 + + ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV) + --------------------------------------------------- +% ion-electron TOTEN = -23.502849 see above + kinetic energy EKIN = 0.000509 + kin. lattice EKIN_LAT= 0.003431 (temperature 3.81 K) + nose potential ES = 0.000000 + nose kinetic EPS = 0.000000 + --------------------------------------------------- + total energy ETOTAL = -23.498909 eV + + OFIELD: cpu time 0.0000: real time 0.0000 + + ML FORCE on cell =-STRESS in cart. coord. units (eV/cell) + Direction XX YY ZZ XY YZ ZX + -------------------------------------------------------------------------------------- + Total: -0.10733 -0.09866 -0.07502 -0.00639 -0.00814 0.00334 + in kB -0.17186 -0.15799 -0.12013 -0.01023 -0.01303 0.00534 + external pressure = -1.15 kB Pullay stress = 1.00 kB + + kinetic pressure (ideal gas correction) = 0.00 kB + total pressure = -0.15 kB + Total+kin. -0.171 -0.157 -0.120 -0.010 -0.013 0.005 + volume of cell : 1000.58 + direct lattice vectors reciprocal lattice vectors + 10.011776419 -0.021496755 0.008079854 0.099882374 0.000000000 -0.000000000 + -0.000000000 9.992079789 0.002921446 0.000214885 0.100079265 0.000000000 + 0.000000000 -0.000000000 10.001923990 -0.000080751 -0.000029232 0.099980764 + + length of vectors + 10.011802757 9.992080216 10.001923990 0.099882374 0.100079496 0.099980801 + + + POSITION TOTAL-FORCE (eV/Angst) (ML) + ----------------------------------------------------------------------------------- + 5.38787 4.05405 3.61382 -0.023390 0.034980 0.045718 + 3.95119 4.79079 4.39094 0.071382 -0.008284 0.002535 + 5.52595 5.64098 4.43523 -0.037376 -0.067152 -0.000477 + 5.28871 4.14990 5.39763 -0.013280 0.020513 -0.038585 + 5.03772 4.65769 4.45972 0.002665 0.019943 -0.009192 + ----------------------------------------------------------------------------------- + total drift: -0.000000 -0.000000 0.000000 + + +-------------------------------------------------------------------------------------------------------- + + + + ML FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV) + --------------------------------------------------- + free energy ML TOTEN = -24.12712228 eV + + ML energy without entropy= -24.12712228 ML energy(sigma->0) = -24.12712228 + + enthalpy is ML TOTEN = -23.50261141 eV P V= 0.62451087 + + LOOP+: cpu time 0.0015: real time 0.0016 + RANDOM_SEED = 283862281 498 0 + IONSTEP: cpu time 0.0006: real time 0.0006 + + ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV) + --------------------------------------------------- +% ion-electron TOTEN = -23.502611 see above + kinetic energy EKIN = 0.000323 + kin. lattice EKIN_LAT= 0.003518 (temperature 3.71 K) + nose potential ES = 0.000000 + nose kinetic EPS = 0.000000 + --------------------------------------------------- + total energy ETOTAL = -23.498771 eV + + + mean value of Nose-termostat : 1.000 mean value of : 3.564 + mean temperature /<1/S> : 3.564 + + LOOP+: cpu time 0.0021: real time 0.0075 + + total amount of memory used by VASP MPI-rank0 41513. kBytes +======================================================================= + + base : 30000. kBytes + nonl-proj : 699. kBytes + fftplans : 3956. kBytes + grid : 6748. kBytes + one-center: 3. kBytes + wavefun : 107. kBytes + + + + General timing and accounting informations for this job: + ======================================================== + + Total CPU time used (sec): 3.965 + User time (sec): 3.483 + System time (sec): 0.482 + Elapsed time (sec): 4.234 + + Maximum memory used (kb): 470384. + Average memory used (kb): N/A + + Minor page faults: 43208 + Major page faults: 0 + Voluntary context switches: 4416 diff --git a/tests/test_vasp_outcar.py b/tests/test_vasp_outcar.py index 6306c1eff..23c40d5c3 100644 --- a/tests/test_vasp_outcar.py +++ b/tests/test_vasp_outcar.py @@ -84,6 +84,18 @@ def test(self): self.assertEqual(list(data['atom_numbs']), [3, 4]) +class TestVaspOUTCARML(unittest.TestCase): + def test(self): + system1 = dpdata.LabeledSystem('poscars/OUTCAR.ch4.ml', fmt = 'vasp/outcar',ml=True) + system2 = dpdata.LabeledSystem('poscars/OUTCAR.ch4.ml', fmt = 'vasp/outcar',ml=False) + expected_types = [0, 0, 0, 0, 1] + self.assertEqual(list(system1['atom_types']), expected_types) + self.assertEqual(system1['atom_names'], ['H', 'C']) + self.assertEqual(len(system1['energies']), 10) + self.assertEqual(list(system2['atom_types']), expected_types) + self.assertEqual(system2['atom_names'], ['H', 'C']) + self.assertEqual(len(system2['energies']), 4) + if __name__ == '__main__': unittest.main() From 26e4bcc77e056384c514b255e7db266c934ca1a2 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sun, 15 May 2022 04:11:25 -0400 Subject: [PATCH 06/18] add sqm driver (#286) --- dpdata/plugins/amber.py | 70 ++++++++++++++++++++++++++++++++++++++++ tests/comp_sys.py | 6 ++-- tests/test_sqm_driver.py | 31 ++++++++++++++++++ 3 files changed, 103 insertions(+), 4 deletions(-) create mode 100644 tests/test_sqm_driver.py diff --git a/dpdata/plugins/amber.py b/dpdata/plugins/amber.py index 2c6fa56a5..d2a13c5bf 100644 --- a/dpdata/plugins/amber.py +++ b/dpdata/plugins/amber.py @@ -1,6 +1,11 @@ +import tempfile +import os +import subprocess as sp + import dpdata.amber.md import dpdata.amber.sqm from dpdata.format import Format +from dpdata.driver import Driver @Format.register("amber/md") @@ -49,5 +54,70 @@ class SQMINFormat(Format): def to_system(self, data, fname=None, frame_idx=0, **kwargs): """ Generate input files for semi-emperical calculation in sqm software + + Parameters + ---------- + data : dict + system data + fname : str + output file name + frame_idx : int, default=0 + index of frame to write + + Other Parameters + ---------------- + **kwargs : dict + valid parameters are: + theory : str, default=dftb3 + level of theory. Options includes AM1, RM1, MNDO, PM3-PDDG, MNDO-PDDG, + PM3-CARB1, MNDO/d, AM1/d, PM6, DFTB2, DFTB3 + charge : int, default=0 + total charge in electron units + maxcyc : int, default=0 + maximum number of minimization cycles to allow. 0 represents a + single-point calculation + mult : int, default=1 + multiplicity. Only 1 is allowed. """ return dpdata.amber.sqm.make_sqm_in(data, fname, frame_idx, **kwargs) + + +@Driver.register("sqm") +class SQMDriver(Driver): + """AMBER sqm program driver. + + Parameters + ---------- + sqm_exec : str, default=sqm + path to sqm program + **kwargs : dict + other arguments to make input files. See :class:`SQMINFormat` + + Examples + -------- + Use DFTB3 method to calculate potential energy: + >>> labeled_system = system.predict(theory="DFTB3", driver="sqm") + >>> labeled_system['energies'][0] + -15.41111246 + """ + def __init__(self, sqm_exec: str="sqm", **kwargs: dict) -> None: + self.sqm_exec = sqm_exec + self.kwargs = kwargs + + def label(self, data: dict) -> dict: + ori_system = dpdata.System(data=data) + labeled_system = dpdata.LabeledSystem() + with tempfile.TemporaryDirectory() as d: + for ii, ss in enumerate(ori_system): + inp_fn = os.path.join(d, "%d.in" % ii) + out_fn = os.path.join(d, "%d.out" % ii) + ss.to("sqm/in", inp_fn, **self.kwargs) + try: + sp.check_output([*self.sqm_exec.split(), "-O", "-i", inp_fn, "-o", out_fn]) + except sp.CalledProcessError as e: + with open(out_fn) as f: + raise RuntimeError( + "Run sqm failed! Output:\n" + f.read() + ) from e + labeled_system.append(dpdata.LabeledSystem(out_fn, fmt="sqm/out")) + return labeled_system.data diff --git a/tests/comp_sys.py b/tests/comp_sys.py index 2b87828c5..3996b0f42 100644 --- a/tests/comp_sys.py +++ b/tests/comp_sys.py @@ -18,10 +18,8 @@ def test_atom_names(self): self.system_2.data['atom_names']) def test_atom_types(self): - self.assertEqual(self.system_1.data['atom_types'][0], - self.system_2.data['atom_types'][0]) - self.assertEqual(self.system_1.data['atom_types'][1], - self.system_2.data['atom_types'][1]) + np.testing.assert_array_equal(self.system_1.data['atom_types'], + self.system_2.data['atom_types']) def test_orig(self): for d0 in range(3) : diff --git a/tests/test_sqm_driver.py b/tests/test_sqm_driver.py new file mode 100644 index 000000000..3755fac97 --- /dev/null +++ b/tests/test_sqm_driver.py @@ -0,0 +1,31 @@ +import unittest +import shutil + +import numpy as np +from context import dpdata +from comp_sys import CompSys, IsNoPBC + + +@unittest.skipIf(shutil.which("sqm") is None, "sqm is not installed") +class TestSQMdriver(unittest.TestCase, CompSys, IsNoPBC): + """Test sqm with a hydrogen ion.""" + @classmethod + def setUpClass(cls): + cls.system_1 = dpdata.System(data={ + "atom_names": ["H"], + "atom_numbs": [1], + "atom_types": np.zeros((1,), dtype=int), + "coords": np.zeros((1, 1, 3), dtype=np.float32), + "cells": np.zeros((1, 3, 3), dtype=np.float32), + "orig": np.zeros(3, dtype=np.float32), + "nopbc": True, + }) + cls.system_2 = cls.system_1.predict(theory="DFTB3", charge=1, driver="sqm") + cls.places = 6 + + def test_energy(self): + self.assertAlmostEqual(self.system_2['energies'].ravel()[0], 6.549447) + + def test_forces(self): + forces = self.system_2['forces'] + np.testing.assert_allclose(forces, np.zeros_like(forces)) From ad73779eda3db44db5a671a0c389f2854296a6ff Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 23 May 2022 05:21:45 -0400 Subject: [PATCH 07/18] fix reading SQM minimization output (#288) Before, only single-point calculation output is supported. --- dpdata/amber/sqm.py | 8 +- tests/amber/sqm_opt.out | 771 ++++++++++++++++++++++++++++++++++++++++ tests/test_amber_sqm.py | 16 + 3 files changed, 794 insertions(+), 1 deletion(-) create mode 100644 tests/amber/sqm_opt.out diff --git a/dpdata/amber/sqm.py b/dpdata/amber/sqm.py index 62f7424e9..557bbd6ce 100644 --- a/dpdata/amber/sqm.py +++ b/dpdata/amber/sqm.py @@ -25,15 +25,18 @@ def parse_sqm_out(fname): for line in f: if line.startswith(" Total SCF energy"): energy = float(line.strip().split()[-2]) - energies.append(energy) + energies = [energy] elif line.startswith(" Atom Element Mulliken Charge"): flag = READ_CHARGE + charges = [] elif line.startswith(" Total Mulliken Charge"): flag = START elif line.startswith(" Final Structure"): flag = READ_COORDS_START + coords = [] elif line.startswith("QMMM: Forces on QM atoms"): flag = READ_FORCES + forces = [] elif flag == READ_CHARGE: ls = line.strip().split() atom_symbols.append(ls[-2]) @@ -46,6 +49,9 @@ def parse_sqm_out(fname): flag = START elif flag == READ_FORCES: ll = line.strip() + if not ll.startswith("QMMM: Atm "): + flag = START + continue forces.append([float(ll[-60:-40]), float(ll[-40:-20]), float(ll[-20:])]) if len(forces) == len(charges): flag = START diff --git a/tests/amber/sqm_opt.out b/tests/amber/sqm_opt.out new file mode 100644 index 000000000..6e32002bd --- /dev/null +++ b/tests/amber/sqm_opt.out @@ -0,0 +1,771 @@ + -------------------------------------------------------- + AMBER SQM VERSION 19 + + By + Ross C. Walker, Michael F. Crowley, Scott Brozell, + Tim Giese, Andreas W. Goetz, + Tai-Sung Lee and David A. Case + + -------------------------------------------------------- + + +-------------------------------------------------------------------------------- + QM CALCULATION INFO +-------------------------------------------------------------------------------- + +| QMMM: Citation for AMBER QMMM Run: +| QMMM: R.C. Walker, M.F. Crowley and D.A. Case, J. COMP. CHEM. 29:1019, 2008 + +| QMMM: DFTB Calculation - Additional citation for AMBER DFTB QMMM Run: +| QMMM: Seabra, G.M., Walker, R.C. et al., J. PHYS. CHEM. A., 111, 5655, (2007) + +| QMMM: DFTB3 - Additional citation to follow. Implementation by: +| QMMM: A.W. Goetz +| QMMM: +| QMMM: DFTB3 method citation: +| QMMM: M. Gaus, Q. Cui, M. Elstner, J. CHEM. THEORY COMPUT. 7, 931 (2011) +| QMMM: +| QMMM: DFTB3 dispersion correction [D3(BJ)] and halogen correction not available. + +| QMMM: Please cite also the appropriate references for the DFTB parameters +| QMMM: that you are using (see the manual and www.dftb.org). + + +QMMM: SINGLET STATE CALCULATION +QMMM: RHF CALCULATION, NO. OF DOUBLY OCCUPIED LEVELS = 4 + +| QMMM: *** SCF convergence criteria *** +| QMMM: Energy change : 0.1D-07 kcal/mol +| QMMM: Error matrix |FP-PF| : 0.1D+00 au +| QMMM: Density matrix change : 0.5D-05 +| QMMM: Maximum number of SCF cycles : 1000 + DFTB: Number of atom types = 2 + + Parameter files: + TYP (AT) TYP (AT) SK integral FILE +| 1 1 (C ) 1 (C ) /usr/local/amber20/dat/slko/3ob-3-1/C-C.skf +| 2 1 (C ) 2 (H ) /usr/local/amber20/dat/slko/3ob-3-1/C-H.skf +| 3 2 (H ) 1 (C ) /usr/local/amber20/dat/slko/3ob-3-1/H-C.skf +| 4 2 (H ) 2 (H ) /usr/local/amber20/dat/slko/3ob-3-1/H-H.skf + +QMMM: Hubbard Derivatives dU/dq: +QMMM: C -0.149200 +QMMM: H -0.185700 + +QMMM: zeta = 4.000000 + + QMMM: QM Region Cartesian Coordinates (*=link atom) + QMMM: QM_NO. MM_NO. ATOM X Y Z + QMMM: 1 1 C -0.0221 0.0032 0.0165 + QMMM: 2 2 H -0.6690 0.8894 -0.1009 + QMMM: 3 3 H -0.3778 -0.8578 -0.5883 + QMMM: 4 4 H 0.0964 -0.3151 1.0638 + QMMM: 5 5 H 0.9725 0.2803 -0.3911 + +-------------------------------------------------------------------------------- + RESULTS +-------------------------------------------------------------------------------- + + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C -0.0221000000 0.0032000000 0.0165000000 0.0000000000 + QMMM SCC-DFTB: 2 2 1 1 H -0.6690000000 0.8894000000 -0.1009000000 0.0000000000 + QMMM SCC-DFTB: 3 2 1 1 H -0.3778000000 -0.8578000000 -0.5883000000 0.0000000000 + QMMM SCC-DFTB: 4 2 1 1 H 0.0964000000 -0.3151000000 1.0638000000 0.0000000000 + QMMM SCC-DFTB: 5 2 1 1 H 0.9725000000 0.2803000000 -0.3911000000 0.0000000000 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.157799880131646 + QMMM SCC-DFTB: 2 -3.157824613290581 -0.000024733158935 0.298293766328793 1 1 C -0.37250 + QMMM SCC-DFTB: 3 -3.158199563935489 -0.000374950644908 0.019934591031811 1 1 C -0.39847 + QMMM SCC-DFTB: 4 -3.158238966380289 -0.000039402444800 0.002476750818148 1 1 C -0.40133 + QMMM SCC-DFTB: 5 -3.158255573884495 -0.000016607504205 0.004585404872750 1 1 C -0.40251 + QMMM SCC-DFTB: 6 -3.158245092771366 0.000010481113129 0.000107585599371 1 1 C -0.40174 + QMMM SCC-DFTB: 7 -3.158244836495692 0.000000256275674 0.000002411826609 1 1 C -0.40172 + QMMM SCC-DFTB: 8 -3.158244842549473 -0.000000006053781 0.000000199663518 1 1 C -0.40172 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 8 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -85.935842165771 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.924790869738 + QMMM SCC-DFTB: Total Energy (eV) = -87.860633035509 + QMMM SCC-DFTB: SCF Energy (eV) = -18.131741202909 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.158244842549 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.070738363460 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.228983206009 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.666363146009 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -418.13608388028837 KCal/mol, -1749.48137495512651 KJ/mol +QMMM: +QMMM: Electronic energy = -85.93584217 eV ( -1981.76645618 KCal/mol) +QMMM: Repulsive energy = -1.92479087 eV ( -44.38760225 KCal/mol) +QMMM: Total energy = -87.86063304 eV ( -2026.15405843 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -13.74670327739973 3.65547862388900 13.81483034563851 +QMMM: Atm 2: -4.90340977577246 16.35088467587560 -5.20621249045626 +QMMM: Atm 3: -1.43273040245665 -17.63544875270559 -11.91662605007330 +QMMM: Atm 4: 4.44538283013336 -7.38377343857182 12.75287244204118 +QMMM: Atm 5: 15.63746062570429 5.01285889151487 -9.44486424761330 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C -0.0220999687 0.0031999917 0.0164999685 -0.4017199086 + QMMM SCC-DFTB: 2 2 1 1 H -0.6689999888 0.8893999627 -0.1008999881 0.1047408987 + QMMM SCC-DFTB: 3 2 1 1 H -0.3777999967 -0.8577999598 -0.5882999728 0.0991061487 + QMMM SCC-DFTB: 4 2 1 1 H 0.0963999899 -0.3150999832 1.0637999709 0.1043123572 + QMMM SCC-DFTB: 5 2 1 1 H 0.9724999643 0.2802999886 -0.3910999785 0.0935605041 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.158244872256237 + QMMM SCC-DFTB: 2 -3.158244872254534 0.000000000001703 0.000000015122551 4 4 H 0.10431 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 2 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -85.935842974046 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.924790223407 + QMMM SCC-DFTB: Total Energy (eV) = -87.860633197453 + QMMM SCC-DFTB: SCF Energy (eV) = -18.131741364853 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.158244872255 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.070738339706 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.228983211961 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.666363151961 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -418.13608761487853 KCal/mol, -1749.48139058065181 KJ/mol +QMMM: +QMMM: Electronic energy = -85.93584297 eV ( -1981.76647482 KCal/mol) +QMMM: Repulsive energy = -1.92479022 eV ( -44.38758734 KCal/mol) +QMMM: Total energy = -87.86063320 eV ( -2026.15406217 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -13.74666278262608 3.65546521339185 13.81478479550825 +QMMM: Atm 2: -4.90340646058408 16.35087377436513 -5.20620722220688 +QMMM: Atm 3: -1.43272261896924 -17.63541726762958 -11.91660188136875 +QMMM: Atm 4: 4.44537812583215 -7.38376888783980 12.75286665628583 +QMMM: Atm 5: 15.63741373622763 5.01284716771441 -9.44484234833637 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C -0.0221000121 0.0032000084 0.0165000217 -0.4017199009 + QMMM SCC-DFTB: 2 2 1 1 H -0.6689999826 0.8893999415 -0.1008999849 0.1047408876 + QMMM SCC-DFTB: 3 2 1 1 H -0.3778000082 -0.8577999755 -0.5882999891 0.0991061590 + QMMM SCC-DFTB: 4 2 1 1 H 0.0963999875 -0.3150999729 1.0637999491 0.1043123380 + QMMM SCC-DFTB: 5 2 1 1 H 0.9725000154 0.2802999985 -0.3910999967 0.0935605164 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.158244864097563 + QMMM SCC-DFTB: 2 -3.158244864091829 0.000000000005735 0.000000028544296 5 5 H 0.09356 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 2 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -85.935842751939 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.924790352857 + QMMM SCC-DFTB: Total Energy (eV) = -87.860633104795 + QMMM SCC-DFTB: SCF Energy (eV) = -18.131741272195 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.158244864092 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.070738344464 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.228983208556 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.666363148556 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -418.13608547809997 KCal/mol, -1749.48138164037027 KJ/mol +QMMM: +QMMM: Electronic energy = -85.93584275 eV ( -1981.76646970 KCal/mol) +QMMM: Repulsive energy = -1.92479035 eV ( -44.38759033 KCal/mol) +QMMM: Total energy = -87.86063310 eV ( -2026.15406003 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -13.74674292408972 3.65549549628298 13.81488140458653 +QMMM: Atm 2: -4.90338368522172 16.35084405392652 -5.20620836094378 +QMMM: Atm 3: -1.43272964586336 -17.63544295426037 -11.91662475897387 +QMMM: Atm 4: 4.44537778375399 -7.38375816312764 12.75282322394532 +QMMM: Atm 5: 15.63747847251340 5.01286156692956 -9.44487150789251 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C -0.0220999770 0.0031999942 0.0164999786 -0.4017198929 + QMMM SCC-DFTB: 2 2 1 1 H -0.6690000286 0.8893999644 -0.1008999763 0.1047409081 + QMMM SCC-DFTB: 3 2 1 1 H -0.3778000356 -0.8577999896 -0.5883000054 0.0991061407 + QMMM SCC-DFTB: 4 2 1 1 H 0.0963999854 -0.3150999728 1.0638000028 0.1043123640 + QMMM SCC-DFTB: 5 2 1 1 H 0.9725000558 0.2803000039 -0.3910999998 0.0935604801 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.158244838402994 + QMMM SCC-DFTB: 2 -3.158244838395710 0.000000000007284 0.000000023300674 4 4 H 0.10431 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 2 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -85.935842052747 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.924790997617 + QMMM SCC-DFTB: Total Energy (eV) = -87.860633050364 + QMMM SCC-DFTB: SCF Energy (eV) = -18.131741217764 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.158244838396 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.070738368159 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.228983206555 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.666363146555 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -418.13608422286637 KCal/mol, -1749.48137638847288 KJ/mol +QMMM: +QMMM: Electronic energy = -85.93584205 eV ( -1981.76645358 KCal/mol) +QMMM: Repulsive energy = -1.92479100 eV ( -44.38760520 KCal/mol) +QMMM: Total energy = -87.86063305 eV ( -2026.15405877 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -13.74670305475924 3.65547229171135 13.81481909316784 +QMMM: Atm 2: -4.90341744044170 16.35087993595888 -5.20620701223694 +QMMM: Atm 3: -1.43273826196118 -17.63544523659553 -11.91662485212175 +QMMM: Atm 4: 4.44537952259198 -7.38376958855279 12.75287923818410 +QMMM: Atm 5: 15.63747923478301 5.01286259730783 -9.44486646623504 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C -0.0022758867 -0.0007767586 -0.0007109555 -0.4017198684 + QMMM SCC-DFTB: 2 2 1 1 H -0.6673769496 0.8463624077 -0.0844628839 0.1047408826 + QMMM SCC-DFTB: 3 2 1 1 H -0.3882629741 -0.8284725465 -0.5733587230 0.0991061497 + QMMM SCC-DFTB: 4 2 1 1 H 0.0840834583 -0.2923013588 1.0377587851 0.1043123345 + QMMM SCC-DFTB: 5 2 1 1 H 0.9738324351 0.2751884580 -0.3792280081 0.0935605016 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.177019277204838 + QMMM SCC-DFTB: 2 -3.177025052002878 -0.000005774798040 0.010493789293413 1 1 C -0.41474 + QMMM SCC-DFTB: 3 -3.177047239463107 -0.000022187460229 0.002204125798446 1 1 C -0.41618 + QMMM SCC-DFTB: 4 -3.177053122189775 -0.000005882726668 0.000021626035352 2 2 H 0.10441 + QMMM SCC-DFTB: 5 -3.177053178549945 -0.000000056360170 0.000001222939759 2 2 H 0.10441 + QMMM SCC-DFTB: 6 -3.177053178489194 0.000000000060751 0.000000018760599 1 1 C -0.41657 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 6 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -86.447616986691 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.471967370268 + QMMM SCC-DFTB: Total Energy (eV) = -87.919584356959 + QMMM SCC-DFTB: SCF Energy (eV) = -18.190692524359 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.177053178489 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.054096558996 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.231149737485 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.668529677485 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -419.49556030423253 KCal/mol, -1755.16942431290886 KJ/mol +QMMM: +QMMM: Electronic energy = -86.44761699 eV ( -1993.56849533 KCal/mol) +QMMM: Repulsive energy = -1.47196737 eV ( -33.94503953 KCal/mol) +QMMM: Total energy = -87.91958436 eV ( -2027.51353486 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -3.00001738071813 -1.50619543749513 -1.58741102759545 +QMMM: Atm 2: 0.60135963409961 0.36993708543853 0.02617975416810 +QMMM: Atm 3: 1.00751030160294 0.98592419104974 1.13885513088302 +QMMM: Atm 4: 0.13675393072060 -0.51889044079648 1.02882655685741 +QMMM: Atm 5: 1.25439351430015 0.66922460179871 -0.60645041442821 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C -0.0022758254 -0.0007767336 -0.0007109343 -0.4165722368 + QMMM SCC-DFTB: 2 2 1 1 H -0.6673769737 0.8463623871 -0.0844628744 0.1044109119 + QMMM SCC-DFTB: 3 2 1 1 H -0.3882630080 -0.8284725620 -0.5733587476 0.1048882360 + QMMM SCC-DFTB: 4 2 1 1 H 0.0840834501 -0.2923013382 1.0377587695 0.1038385532 + QMMM SCC-DFTB: 5 2 1 1 H 0.9738324400 0.2751884484 -0.3792279986 0.1034345357 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.177053176423371 + QMMM SCC-DFTB: 2 -3.177053176424210 -0.000000000000839 0.000000021241782 5 5 H 0.10343 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 2 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -86.447616930503 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.471967444611 + QMMM SCC-DFTB: Total Energy (eV) = -87.919584375114 + QMMM SCC-DFTB: SCF Energy (eV) = -18.190692542514 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.177053176424 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.054096561728 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.231149738152 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.668529678152 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -419.49556072291301 KCal/mol, -1755.16942606466819 KJ/mol +QMMM: +QMMM: Electronic energy = -86.44761693 eV ( -1993.56849403 KCal/mol) +QMMM: Repulsive energy = -1.47196744 eV ( -33.94504124 KCal/mol) +QMMM: Total energy = -87.91958438 eV ( -2027.51353527 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -2.99993072311282 -1.50614849359069 -1.58736044544401 +QMMM: Atm 2: 0.60134391066191 0.36993942396946 0.02617856069717 +QMMM: Atm 3: 1.00748094020025 0.98587971470655 1.13882119827186 +QMMM: Atm 4: 0.13674581727437 -0.51888280486258 1.02879998530180 +QMMM: Atm 5: 1.25436005443588 0.66921216009831 -0.60643929883291 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C -0.0022758759 -0.0007767626 -0.0007109613 -0.4165722380 + QMMM SCC-DFTB: 2 2 1 1 H -0.6673769734 0.8463623560 -0.0844628783 0.1044109015 + QMMM SCC-DFTB: 3 2 1 1 H -0.3882629907 -0.8284725004 -0.5733587378 0.1048882103 + QMMM SCC-DFTB: 4 2 1 1 H 0.0840834733 -0.2923013234 1.0377587795 0.1038385635 + QMMM SCC-DFTB: 5 2 1 1 H 0.9738324498 0.2751884322 -0.3792279874 0.1034345627 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.177053189902282 + QMMM SCC-DFTB: 2 -3.177053189906454 -0.000000000004173 0.000000029572285 3 3 H 0.10489 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 2 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -86.447617297355 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.471967063523 + QMMM SCC-DFTB: Total Energy (eV) = -87.919584360878 + QMMM SCC-DFTB: SCF Energy (eV) = -18.190692528278 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.177053189906 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.054096547722 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.231149737629 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.668529677629 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -419.49556039461277 KCal/mol, -1755.16942469105993 KJ/mol +QMMM: +QMMM: Electronic energy = -86.44761730 eV ( -1993.56850249 KCal/mol) +QMMM: Repulsive energy = -1.47196706 eV ( -33.94503245 KCal/mol) +QMMM: Total energy = -87.91958436 eV ( -2027.51353495 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -3.00001595789464 -1.50619959497283 -1.58741808638720 +QMMM: Atm 2: 0.60135965944853 0.36992131728738 0.02618177329187 +QMMM: Atm 3: 1.00751092479538 0.98594231266698 1.13885924141731 +QMMM: Atm 4: 0.13675562187275 -0.51888230503968 1.02882105346303 +QMMM: Atm 5: 1.25438975749003 0.66921826988072 -0.60644398225300 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C -0.0022759240 -0.0007767665 -0.0007109443 -0.4165722482 + QMMM SCC-DFTB: 2 2 1 1 H -0.6673769688 0.8463624208 -0.0844629104 0.1044109120 + QMMM SCC-DFTB: 3 2 1 1 H -0.3882629652 -0.8284725266 -0.5733587547 0.1048882478 + QMMM SCC-DFTB: 4 2 1 1 H 0.0840835104 -0.2923013583 1.0377588146 0.1038385508 + QMMM SCC-DFTB: 5 2 1 1 H 0.9738324306 0.2751884323 -0.3792279905 0.1034345376 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.177053171661357 + QMMM SCC-DFTB: 2 -3.177053171655763 0.000000000005594 0.000000010752099 5 5 H 0.10343 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 2 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -86.447616800753 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.471967554219 + QMMM SCC-DFTB: Total Energy (eV) = -87.919584354973 + QMMM SCC-DFTB: SCF Energy (eV) = -18.190692522373 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.177053171656 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.054096565756 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.231149737412 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.668529677412 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -419.49556025843816 KCal/mol, -1755.16942412130538 KJ/mol +QMMM: +QMMM: Electronic energy = -86.44761680 eV ( -1993.56849104 KCal/mol) +QMMM: Repulsive energy = -1.47196755 eV ( -33.94504377 KCal/mol) +QMMM: Total energy = -87.91958435 eV ( -2027.51353481 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -3.00004968153394 -1.50620963619432 -1.58741778817088 +QMMM: Atm 2: 0.60135657004798 0.36994265717245 0.02617394714159 +QMMM: Atm 3: 1.00751788058786 0.98593536590786 1.13885373849680 +QMMM: Atm 4: 0.13676701341870 -0.51889254828514 1.02884259812090 +QMMM: Atm 5: 1.25440821726414 0.66922416139912 -0.60645249570357 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C 0.0000038338 -0.0000741137 -0.0000915666 -0.4165722357 + QMMM SCC-DFTB: 2 2 1 1 H -0.6690925881 0.8440618468 -0.0841048801 0.1044109150 + QMMM SCC-DFTB: 3 2 1 1 H -0.3899330263 -0.8274220054 -0.5748810102 0.1048882424 + QMMM SCC-DFTB: 4 2 1 1 H 0.0845718862 -0.2904408216 1.0372016233 0.1038385542 + QMMM SCC-DFTB: 5 2 1 1 H 0.9744495465 0.2738752702 -0.3781262149 0.1034345240 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.177297107065937 + QMMM SCC-DFTB: 2 -3.177297189242046 -0.000000082176109 0.000714476993429 5 5 H 0.10434 + QMMM SCC-DFTB: 3 -3.177297448974965 -0.000000259732919 0.000050374225117 1 1 C -0.41677 + QMMM SCC-DFTB: 4 -3.177297583444879 -0.000000134469914 0.000000664777074 1 1 C -0.41678 + QMMM SCC-DFTB: 5 -3.177297585243204 -0.000000001798325 0.000000010687417 4 4 H 0.10417 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 5 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -86.454267294468 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.465661705715 + QMMM SCC-DFTB: Total Energy (eV) = -87.919929000182 + QMMM SCC-DFTB: SCF Energy (eV) = -18.191037167582 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.177297585243 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.053864818292 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.231162403535 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.668542343535 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -419.50350812161315 KCal/mol, -1755.20267798082955 KJ/mol +QMMM: +QMMM: Electronic energy = -86.45426729 eV ( -1993.72185808 KCal/mol) +QMMM: Repulsive energy = -1.46566171 eV ( -33.79962460 KCal/mol) +QMMM: Total energy = -87.91992900 eV ( -2027.52148267 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -0.08397438585120 -0.11992372445546 -0.11648100404662 +QMMM: Atm 2: 0.02413338666108 -0.01213651509183 0.01920691201260 +QMMM: Atm 3: 0.04594261530503 0.10271287370538 0.09299635501682 +QMMM: Atm 4: -0.02000842001580 -0.00089167325386 0.01917324403620 +QMMM: Atm 5: 0.03390680653361 0.03023903909095 -0.01489550500940 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C 0.0000038243 -0.0000740764 -0.0000915287 -0.4167784643 + QMMM SCC-DFTB: 2 2 1 1 H -0.6690926075 0.8440618473 -0.0841048975 0.1041805592 + QMMM SCC-DFTB: 3 2 1 1 H -0.3899330395 -0.8274220238 -0.5748810590 0.1042383015 + QMMM SCC-DFTB: 4 2 1 1 H 0.0845719235 -0.2904408174 1.0372016385 0.1041707783 + QMMM SCC-DFTB: 5 2 1 1 H 0.9744495513 0.2738752466 -0.3781262018 0.1041888253 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.177297572848879 + QMMM SCC-DFTB: 2 -3.177297572844566 0.000000000004313 0.000000020485338 3 3 H 0.10424 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 2 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -86.454266957101 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.465662044402 + QMMM SCC-DFTB: Total Energy (eV) = -87.919929001502 + QMMM SCC-DFTB: SCF Energy (eV) = -18.191037168902 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.177297572845 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.053864830739 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.231162403583 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.668542343583 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -419.50350815205553 KCal/mol, -1755.20267810820042 KJ/mol +QMMM: +QMMM: Electronic energy = -86.45426696 eV ( -1993.72185030 KCal/mol) +QMMM: Repulsive energy = -1.46566204 eV ( -33.79963241 KCal/mol) +QMMM: Total energy = -87.91992900 eV ( -2027.52148270 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -0.08396941860273 -0.11985835095379 -0.11642882888525 +QMMM: Atm 2: 0.02413760202554 -0.01214907360599 0.01920165485925 +QMMM: Atm 3: 0.04592229065449 0.10266729765707 0.09295742713355 +QMMM: Atm 4: -0.02000172847949 -0.00089224660803 0.01916687245340 +QMMM: Atm 5: 0.03391125450313 0.03023237989853 -0.01489712556091 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C 0.0000038614 -0.0000741309 -0.0000915578 -0.4167784546 + QMMM SCC-DFTB: 2 2 1 1 H -0.6690926261 0.8440618880 -0.0841049009 0.1041805702 + QMMM SCC-DFTB: 3 2 1 1 H -0.3899330240 -0.8274220040 -0.5748810378 0.1042382755 + QMMM SCC-DFTB: 4 2 1 1 H 0.0845719215 -0.2904408219 1.0372016410 0.1041707902 + QMMM SCC-DFTB: 5 2 1 1 H 0.9744495193 0.2738752451 -0.3781261931 0.1041888187 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.177297575948840 + QMMM SCC-DFTB: 2 -3.177297575949379 -0.000000000000539 0.000000028770979 2 2 H 0.10418 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 2 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -86.454267041583 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.465661958868 + QMMM SCC-DFTB: Total Energy (eV) = -87.919929000450 + QMMM SCC-DFTB: SCF Energy (eV) = -18.191037167850 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.177297575949 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.053864827595 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.231162403545 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.668542343545 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -419.50350812779499 KCal/mol, -1755.20267800669421 KJ/mol +QMMM: +QMMM: Electronic energy = -86.45426704 eV ( -1993.72185225 KCal/mol) +QMMM: Repulsive energy = -1.46566196 eV ( -33.79963043 KCal/mol) +QMMM: Total energy = -87.91992900 eV ( -2027.52148268 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -0.08389606940974 -0.11995651422258 -0.11648189816041 +QMMM: Atm 2: 0.02409298945252 -0.01208920057537 0.01919866286834 +QMMM: Atm 3: 0.04593742903092 0.10270854098333 0.09298669811655 +QMMM: Atm 4: -0.02000477088421 -0.00089063282067 0.01917739144805 +QMMM: Atm 5: 0.03387042191143 0.03022780663044 -0.01488085456804 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C 0.0000038176 -0.0000741005 -0.0000915615 -0.4167784558 + QMMM SCC-DFTB: 2 2 1 1 H -0.6690925757 0.8440618436 -0.0841048900 0.1041805336 + QMMM SCC-DFTB: 3 2 1 1 H -0.3899329958 -0.8274219846 -0.5748810036 0.1042383039 + QMMM SCC-DFTB: 4 2 1 1 H 0.0845719140 -0.2904408194 1.0372015916 0.1041707818 + QMMM SCC-DFTB: 5 2 1 1 H 0.9744494919 0.2738752371 -0.3781261851 0.1041888366 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.177297609890104 + QMMM SCC-DFTB: 2 -3.177297609902009 -0.000000000011905 0.000000031528976 2 2 H 0.10418 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 2 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -86.454267965434 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.465661033211 + QMMM SCC-DFTB: Total Energy (eV) = -87.919928998644 + QMMM SCC-DFTB: SCF Energy (eV) = -18.191037166044 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.177297609902 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.053864793576 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.231162403478 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.668542343478 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -419.50350808614820 KCal/mol, -1755.20267783244412 KJ/mol +QMMM: +QMMM: Electronic energy = -86.45426797 eV ( -1993.72187355 KCal/mol) +QMMM: Repulsive energy = -1.46566103 eV ( -33.79960909 KCal/mol) +QMMM: Total energy = -87.91992900 eV ( -2027.52148264 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: -0.08396699091083 -0.11991097989157 -0.11648255229622 +QMMM: Atm 2: 0.02414617070286 -0.01215050708276 0.01920612150528 +QMMM: Atm 3: 0.04595307066413 0.10272477147955 0.09300363203994 +QMMM: Atm 4: -0.02000388964462 -0.00088812436557 0.01915299001483 +QMMM: Atm 5: 0.03387164178397 0.03022483954725 -0.01488018434134 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C 0.0000028335 -0.0000024337 0.0000027987 -0.4167784825 + QMMM SCC-DFTB: 2 2 1 1 H -0.6691668036 0.8441000307 -0.0841661042 0.1041805735 + QMMM SCC-DFTB: 3 2 1 1 H -0.3899499108 -0.8274546196 -0.5750132435 0.1042383013 + QMMM SCC-DFTB: 4 2 1 1 H 0.0846969405 -0.2904312731 1.0372413187 0.1041707840 + QMMM SCC-DFTB: 5 2 1 1 H 0.9744164720 0.2737884277 -0.3780667942 0.1041888237 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.177269698695105 + QMMM SCC-DFTB: 2 -3.177269688959342 0.000000009735763 0.000046807800887 3 3 H 0.10418 + QMMM SCC-DFTB: 3 -3.177269657215860 0.000000031743483 0.000005855871898 1 1 C -0.41675 + QMMM SCC-DFTB: 4 -3.177269641375190 0.000000015840670 0.000000000735283 3 3 H 0.10419 + QMMM SCC-DFTB: 5 -3.177269641376874 -0.000000000001684 0.000000000023997 2 2 H 0.10419 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 5 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -86.453506941865 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.466423047235 + QMMM SCC-DFTB: Total Energy (eV) = -87.919929989100 + QMMM SCC-DFTB: SCF Energy (eV) = -18.191038156500 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.177269641377 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.053892798502 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.231162439879 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.668542379879 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -419.50353092704279 KCal/mol, -1755.20277339874701 KJ/mol +QMMM: +QMMM: Electronic energy = -86.45350694 eV ( -1993.70432359 KCal/mol) +QMMM: Repulsive energy = -1.46642305 eV ( -33.81718189 KCal/mol) +QMMM: Total energy = -87.91992999 eV ( -2027.52150548 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: 0.00197580770225 -0.00035980687995 0.00070646556414 +QMMM: Atm 2: 0.00046647101156 -0.00106870093684 -0.00079556384126 +QMMM: Atm 3: -0.00072529720144 0.00096065618636 -0.00077488088056 +QMMM: Atm 4: -0.00020413609271 0.00017694635464 0.00105468965912 +QMMM: Atm 5: -0.00151284761905 0.00029090519209 -0.00019071050406 + QMMM SCC-DFTB: No external charges defined. + + QMMM SCC-DFTB: QM Region Input Cartesian Coordinates + QMMM SCC-DFTB: NO. TYP L AT# SYM X Y Z Charge + QMMM SCC-DFTB: 1 1 2 6 C 0.0000028335 -0.0000024337 0.0000027987 -0.4167535319 + QMMM SCC-DFTB: 2 2 1 1 H -0.6691668036 0.8441000307 -0.0841661042 0.1041874493 + QMMM SCC-DFTB: 3 2 1 1 H -0.3899499108 -0.8274546196 -0.5750132435 0.1041881140 + QMMM SCC-DFTB: 4 2 1 1 H 0.0846969405 -0.2904312731 1.0372413187 0.1041892284 + QMMM SCC-DFTB: 5 2 1 1 H 0.9744164720 0.2737884277 -0.3780667942 0.1041887402 + + QMMM SCC-DFTB: SCC convergence criteria: + QMMM SCC-DFTB: Energy: 1.0E-08 + QMMM SCC-DFTB: Charge: 5.0E-06 + QMMM SCC-DFTB: Telec : 0.000K + QMMM SCC-DFTB: It# Energy Diff MaxChDiff At# Index Symb MullikCh + QMMM SCC-DFTB: 1 -3.177269641376872 + QMMM SCC-DFTB: 2 -3.177269641376872 -0.000000000000000 0.000000000005430 2 2 H 0.10419 + QMMM SCC-DFTB: SCC-DFTB for step 0 converged in 2 cycles. + + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (eV) = -69.728891832600 + QMMM SCC-DFTB: Electronic Energy (eV) = -86.453506941865 + QMMM SCC-DFTB: Repulsive Energy (eV) = -1.466423047235 + QMMM SCC-DFTB: Total Energy (eV) = -87.919929989100 + QMMM SCC-DFTB: SCF Energy (eV) = -18.191038156500 + QMMM SCC-DFTB: + QMMM SCC-DFTB: + QMMM SCC-DFTB: Atomization Energy (a.u.) = -2.562620060000 + QMMM SCC-DFTB: Electronic Energy (a.u.) = -3.177269641377 + QMMM SCC-DFTB: Repulsive Energy (a.u.) = -0.053892798502 + QMMM SCC-DFTB: Total Energy (a.u.) = -3.231162439879 + QMMM SCC-DFTB: SCF Energy (a.u.) = -0.668542379879 + QMMM SCC-DFTB: +QMMM: +QMMM: SCF Energy = -419.50353092704194 KCal/mol, -1755.20277339874360 KJ/mol +QMMM: +QMMM: Electronic energy = -86.45350694 eV ( -1993.70432359 KCal/mol) +QMMM: Repulsive energy = -1.46642305 eV ( -33.81718189 KCal/mol) +QMMM: Total energy = -87.91992999 eV ( -2027.52150548 KCal/mol) +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: 0.00197580855841 -0.00035980761466 0.00070646591546 +QMMM: Atm 2: 0.00046647069005 -0.00106870058785 -0.00079556392153 +QMMM: Atm 3: -0.00072529733534 0.00096065631988 -0.00077488092885 +QMMM: Atm 4: -0.00020413624517 0.00017694651691 0.00105468945196 +QMMM: Atm 5: -0.00151284786736 0.00029090528194 -0.00019071051969 + ... geometry converged ! + + Final MO eigenvalues (au): + -0.5724 -0.3317 -0.3317 -0.3317 0.3784 0.3784 0.3784 0.6704 + + + Heat of formation = -419.50353093 kcal/mol ( -18.19103816 eV) + + Total SCF energy = -2027.52150548 kcal/mol ( -87.91992999 eV) + Electronic energy = -1993.70432359 kcal/mol ( -86.45350694 eV) + Core-core repulsion = -33.81718189 kcal/mol ( -1.46642305 eV) + + Atomic Charges for Step 1 : + Atom Element Mulliken Charge + 1 C -0.417 + 2 H 0.104 + 3 H 0.104 + 4 H 0.104 + 5 H 0.104 + Total Mulliken Charge = 0.000 + + X Y Z TOTAL + QM DIPOLE -0.000 0.000 -0.000 0.000 + + Final Structure + + QMMM: QM Region Cartesian Coordinates (*=link atom) + QMMM: QM_NO. MM_NO. ATOM X Y Z + QMMM: 1 1 C 0.0000 -0.0000 0.0000 + QMMM: 2 2 H -0.6692 0.8441 -0.0842 + QMMM: 3 3 H -0.3899 -0.8275 -0.5750 + QMMM: 4 4 H 0.0847 -0.2904 1.0372 + QMMM: 5 5 H 0.9744 0.2738 -0.3781 +QMMM: +QMMM: Forces on QM atoms from SCF calculation +QMMM: Atm 1: 0.00197580855841 -0.00035980761466 0.00070646591546 +QMMM: Atm 2: 0.00046647069005 -0.00106870058785 -0.00079556392153 +QMMM: Atm 3: -0.00072529733534 0.00096065631988 -0.00077488092885 +QMMM: Atm 4: -0.00020413624517 0.00017694651691 0.00105468945196 +QMMM: Atm 5: -0.00151284786736 0.00029090528194 -0.00019071051969 + + --------- Calculation Completed ---------- + diff --git a/tests/test_amber_sqm.py b/tests/test_amber_sqm.py index 705e7ba9e..c8f762ba8 100644 --- a/tests/test_amber_sqm.py +++ b/tests/test_amber_sqm.py @@ -39,6 +39,22 @@ def tearDown(self) : if os.path.exists('tmp.sqm.forces'): shutil.rmtree('tmp.sqm.forces') + +class TestAmberSqmOutOpt(unittest.TestCase, CompLabeledSys, IsNoPBC): + def setUp(self) : + self.system_1 = dpdata.LabeledSystem('amber/sqm_opt.out', fmt = 'sqm/out') + self.system_1.to('deepmd/npy','tmp.sqm.opt') + self.system_2 = dpdata.LabeledSystem('tmp.sqm.opt', fmt = 'deepmd/npy') + self.places = 5 + self.e_places = 4 + self.f_places = 6 + self.v_places = 6 + + def tearDown(self) : + if os.path.exists('tmp.sqm.opt'): + shutil.rmtree('tmp.sqm.opt') + + @unittest.skipIf(skip_bond_order_system, "dpdata does not have BondOrderSystem. One may install rdkit to fix.") class TestAmberSqmIn(unittest.TestCase): def setUp(self): From 6e73a62561dcf30bb5dba2449299ad1f98d015c1 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 23 May 2022 05:23:12 -0400 Subject: [PATCH 08/18] fix DP driver energy shape (#289) The shape of energies should be (nframes,) instead of (nframes, 1) --- dpdata/plugins/deepmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dpdata/plugins/deepmd.py b/dpdata/plugins/deepmd.py index 2798d78ae..d07745887 100644 --- a/dpdata/plugins/deepmd.py +++ b/dpdata/plugins/deepmd.py @@ -163,7 +163,7 @@ def label(self, data: dict) -> dict: cell = None e, f, v = self.dp.eval(coord, cell, atype) data = ss.data - data['energies'] = e.reshape((1, 1)) + data['energies'] = e.reshape((1,)) data['forces'] = f.reshape((1, ss.get_natoms(), 3)) data['virials'] = v.reshape((1, 3, 3)) this_sys = dpdata.LabeledSystem.from_dict({'data': data}) @@ -178,7 +178,7 @@ def label(self, data: dict) -> dict: cell = None e, f, v = self.dp.eval(coord, cell, atype) data = ori_sys.data.copy() - data['energies'] = e.reshape((ori_sys.get_nframes(), 1)) + data['energies'] = e.reshape((ori_sys.get_nframes(),)) data['forces'] = f.reshape((ori_sys.get_nframes(), ori_sys.get_natoms(), 3)) data['virials'] = v.reshape((ori_sys.get_nframes(), 3, 3)) return data From ed0a6a6175585b57cff45c433589227c69f67fa8 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 23 May 2022 05:31:35 -0400 Subject: [PATCH 09/18] support converting ase.Atoms to System and LabeledSystem (#290) #190 added `from_labeled_system`, but it just passes a dict and does nothing else. This commit rewrites it. --- docs/conf.py | 3 + dpdata/plugins/ase.py | 126 +++++++++++++++++++++++++++++++----------- tests/test_to_ase.py | 30 ++++++++-- 3 files changed, 121 insertions(+), 38 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index dbe2c0bf8..d82fa6a48 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -183,4 +183,7 @@ def setup(app): intersphinx_mapping = { "numpy": ("https://docs.scipy.org/doc/numpy/", None), "python": ("https://docs.python.org/", None), + "ase": ("https://wiki.fysik.dtu.dk/ase/", None), + "monty": ("https://guide.materialsvirtuallab.org/monty/", None), + "h5py": ("https://docs.h5py.org/en/stable/", None), } diff --git a/dpdata/plugins/ase.py b/dpdata/plugins/ase.py index 891b2d90a..957aac568 100644 --- a/dpdata/plugins/ase.py +++ b/dpdata/plugins/ase.py @@ -18,41 +18,101 @@ class ASEStructureFormat(Format): automatic detection fails. """ - def from_labeled_system(self, data, **kwargs): - return data - - def from_multi_systems(self, file_name, begin=None, end=None, step=None, ase_fmt=None, **kwargs): + def from_system(self, atoms: "ase.Atoms", **kwargs) -> dict: + """Convert ase.Atoms to a System. + + Parameters + ---------- + atoms : ase.Atoms + an ASE Atoms, containing a structure + + Returns + ------- + dict + data dict + """ + symbols = atoms.get_chemical_symbols() + atom_names = list(set(symbols)) + atom_numbs = [symbols.count(symbol) for symbol in atom_names] + atom_types = np.array([atom_names.index(symbol) for symbol in symbols]).astype(int) + cells = atoms.cell[:] + coords = atoms.get_positions() + info_dict = { + 'atom_names': atom_names, + 'atom_numbs': atom_numbs, + 'atom_types': atom_types, + 'cells': np.array([cells]).astype('float32'), + 'coords': np.array([coords]).astype('float32'), + 'orig': [0,0,0], + } + return info_dict + + def from_labeled_system(self, atoms: "ase.Atoms", **kwargs) -> dict: + """Convert ase.Atoms to a LabeledSystem. Energies and forces + are calculated by the calculator. + + Parameters + ---------- + atoms : ase.Atoms + an ASE Atoms, containing a structure + + Returns + ------- + dict + data dict + + Raises + ------ + RuntimeError + ASE will raise RuntimeError if the atoms does not + have a calculator + """ + info_dict = self.from_system(atoms) + try: + energies = atoms.get_potential_energy(force_consistent=True) + except PropertyNotImplementedError: + energies = atoms.get_potential_energy() + forces = atoms.get_forces() + info_dict = { + ** info_dict, + 'energies': np.array([energies]).astype('float32'), + 'forces': np.array([forces]).astype('float32'), + } + try: + stress = atoms.get_stress(False) + except PropertyNotImplementedError: + pass + else: + virials = np.array([-atoms.get_volume() * stress]).astype('float32') + info_dict['virials'] = virials + return info_dict + + def from_multi_systems(self, file_name: str, begin: int=None, end: int=None, step: int=None, ase_fmt: str=None, **kwargs) -> "ase.Atoms": + """Convert a ASE supported file to ASE Atoms. + + It will finally be converted to MultiSystems. + + Parameters + ---------- + file_name : str + path to file + begin : int, optional + begin frame index + end : int, optional + end frame index + step : int, optional + frame index step + ase_fmt : str, optional + ASE format. See the ASE documentation about supported formats + + Yields + ------ + ase.Atoms + ASE atoms in the file + """ frames = ase.io.read(file_name, format=ase_fmt, index=slice(begin, end, step)) for atoms in frames: - symbols = atoms.get_chemical_symbols() - atom_names = list(set(symbols)) - atom_numbs = [symbols.count(symbol) for symbol in atom_names] - atom_types = np.array([atom_names.index(symbol) for symbol in symbols]).astype(int) - - cells = atoms.cell[:] - coords = atoms.get_positions() - try: - energies = atoms.get_potential_energy(force_consistent=True) - except PropertyNotImplementedError: - energies = atoms.get_potential_energy() - forces = atoms.get_forces() - info_dict = { - 'atom_names': atom_names, - 'atom_numbs': atom_numbs, - 'atom_types': atom_types, - 'cells': np.array([cells]).astype('float32'), - 'coords': np.array([coords]).astype('float32'), - 'energies': np.array([energies]).astype('float32'), - 'forces': np.array([forces]).astype('float32'), - 'orig': [0,0,0], - } - try: - stress = atoms.get_stress(False) - virials = np.array([-atoms.get_volume() * stress]).astype('float32') - info_dict['virials'] = virials - except PropertyNotImplementedError: - pass - yield info_dict + yield atoms def to_system(self, data, **kwargs): ''' diff --git a/tests/test_to_ase.py b/tests/test_to_ase.py index 4ea870c79..d1c42b8b4 100644 --- a/tests/test_to_ase.py +++ b/tests/test_to_ase.py @@ -4,11 +4,13 @@ from context import dpdata from comp_sys import CompSys, IsPBC try: - from ase import Atoms - from ase.io import write - exist_module=True -except Exception: - exist_module=False + from ase import Atoms + from ase.io import write +except ModuleNotFoundError: + exist_module=False +else: + exist_module=True + @unittest.skipIf(not exist_module,"skip test_ase") class TestASE(unittest.TestCase, CompSys, IsPBC): @@ -24,6 +26,24 @@ def setUp(self): self.f_places = 6 self.v_places = 6 + +@unittest.skipIf(not exist_module, "skip test_ase") +class TestFromASE(unittest.TestCase, CompSys, IsPBC): + """Test ASEStructureFormat.from_system""" + def setUp(self): + system_1 = dpdata.System() + system_1.from_lammps_lmp(os.path.join('poscars', 'conf.lmp'), type_map = ['O', 'H']) + atoms = system_1.to_ase_structure()[0] + self.system_1 = system_1 + self.system_2 = dpdata.System(atoms, fmt="ase/structure") + # assign the same type_map + self.system_2.sort_atom_names(type_map=self.system_1.get_atom_names()) + self.places = 6 + self.e_places = 6 + self.f_places = 6 + self.v_places = 6 + + if __name__ == '__main__': unittest.main() From 31292fd0d8d4aa92cc1d29897442bb1621579881 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 23 May 2022 05:33:38 -0400 Subject: [PATCH 10/18] refactor and optimize deepmd/hdf5 MultiSystems (#291) Now it is avoided to open the same file multiple times. --- dpdata/deepmd/hdf5.py | 14 +-- dpdata/plugins/deepmd.py | 173 ++++++++++++++++++++++++++++++++------ tests/test_deepmd_hdf5.py | 31 ++++++- 3 files changed, 185 insertions(+), 33 deletions(-) diff --git a/dpdata/deepmd/hdf5.py b/dpdata/deepmd/hdf5.py index 4b2486ba8..8bbd00484 100644 --- a/dpdata/deepmd/hdf5.py +++ b/dpdata/deepmd/hdf5.py @@ -1,4 +1,6 @@ """Utils for deepmd/hdf5 format.""" +from typing import Union + import h5py import numpy as np @@ -7,7 +9,7 @@ __all__ = ['to_system_data', 'dump'] -def to_system_data(f: h5py.File, +def to_system_data(f: Union[h5py.File, h5py.Group], folder: str, type_map: list = None, labels: bool = True) : @@ -15,8 +17,8 @@ def to_system_data(f: h5py.File, Parameters ---------- - f : h5py.File - HDF5 file object + f : h5py.File or h5py.Group + HDF5 file or group object folder : str path in the HDF5 file type_map : list @@ -82,7 +84,7 @@ def to_system_data(f: h5py.File, data['cells'] = np.zeros((nframes, 3, 3)) return data -def dump(f: h5py.File, +def dump(f: Union[h5py.File, h5py.Group], folder: str, data: dict, set_size = 5000, @@ -92,8 +94,8 @@ def dump(f: h5py.File, Parameters ---------- - f : h5py.File - HDF5 file object + f : h5py.File or h5py.Group + HDF5 file or group object folder : str path in the HDF5 file data : dict diff --git a/dpdata/plugins/deepmd.py b/dpdata/plugins/deepmd.py index d07745887..aa69c44b8 100644 --- a/dpdata/plugins/deepmd.py +++ b/dpdata/plugins/deepmd.py @@ -1,3 +1,5 @@ +from typing import Union, List + import dpdata import dpdata.deepmd.raw import dpdata.deepmd.comp @@ -69,41 +71,164 @@ class DeePMDHDF5Format(Format): >>> import dpdata >>> dpdata.MultiSystems().from_deepmd_npy("data").to_deepmd_hdf5("data.hdf5") """ - def from_system(self, file_name, type_map=None, **kwargs): - s = file_name.split("#") - name = s[1] if len(s) > 1 else "" - with h5py.File(s[0], 'r') as f: - return dpdata.deepmd.hdf5.to_system_data(f, name, type_map=type_map, labels=False) + def _from_system(self, file_name: Union[str, h5py.Group, h5py.File], type_map: List[str], labels: bool): + """Convert HDF5 file to System or LabeledSystem data. + + This method is used to switch from labeled or non-labeled options. + + Parameters + ---------- + file_name : str or h5py.Group or h5py.File + file name of the HDF5 file or HDF5 object. If it is a string, + hashtag is used to split path to the HDF5 file and the HDF5 group + type_map : dict[str] + type map + labels : bool + if Labeled + + Returns + ------- + dict + System or LabeledSystem data + + Raises + ------ + TypeError + file_name is not str or h5py.Group or h5py.File + """ + if isinstance(file_name, (h5py.Group, h5py.File)): + return dpdata.deepmd.hdf5.to_system_data(file_name, "", type_map=type_map, labels=labels) + elif isinstance(file_name, str): + s = file_name.split("#") + name = s[1] if len(s) > 1 else "" + with h5py.File(s[0], 'r') as f: + return dpdata.deepmd.hdf5.to_system_data(f, name, type_map=type_map, labels=labels) + else: + raise TypeError("Unsupported file_name") + + def from_system(self, + file_name: Union[str, h5py.Group, h5py.File], + type_map: List[str]=None, + **kwargs) -> dict: + """Convert HDF5 file to System data. + + Parameters + ---------- + file_name : str or h5py.Group or h5py.File + file name of the HDF5 file or HDF5 object. If it is a string, + hashtag is used to split path to the HDF5 file and the HDF5 group + type_map : dict[str] + type map + + Returns + ------- + dict + System data + + Raises + ------ + TypeError + file_name is not str or h5py.Group or h5py.File + """ + return self._from_system(file_name, type_map=type_map, labels=False) + + def from_labeled_system(self, + file_name: Union[str, h5py.Group, h5py.File], + type_map: List[str]=None, + **kwargs) -> dict: + """Convert HDF5 file to LabeledSystem data. + + Parameters + ---------- + file_name : str or h5py.Group or h5py.File + file name of the HDF5 file or HDF5 object. If it is a string, + hashtag is used to split path to the HDF5 file and the HDF5 group + type_map : dict[str] + type map + + Returns + ------- + dict + LabeledSystem data + + Raises + ------ + TypeError + file_name is not str or h5py.Group or h5py.File + """ + return self._from_system(file_name, type_map=type_map, labels=True) - def from_labeled_system(self, file_name, type_map=None, **kwargs): - s = file_name.split("#") - name = s[1] if len(s) > 1 else "" - with h5py.File(s[0], 'r') as f: - return dpdata.deepmd.hdf5.to_system_data(f, name, type_map=type_map, labels=True) - def to_system(self, data : dict, - file_name : str, + file_name: Union[str, h5py.Group, h5py.File], set_size : int = 5000, comp_prec : np.dtype = np.float64, **kwargs): - s = file_name.split("#") - name = s[1] if len(s) > 1 else "" - mode = 'a' if name else 'w' - with h5py.File(s[0], mode) as f: - dpdata.deepmd.hdf5.dump(f, name, data, set_size = set_size, comp_prec = comp_prec) + """Convert System data to HDF5 file. + + Parameters + ---------- + data : dict + data dict + file_name : str or h5py.Group or h5py.File + file name of the HDF5 file or HDF5 object. If it is a string, + hashtag is used to split path to the HDF5 file and the HDF5 group + set_size : int, default=5000 + set size + comp_prec : np.dtype + data precision + """ + if isinstance(file_name, (h5py.Group, h5py.File)): + dpdata.deepmd.hdf5.dump(file_name, "", data, set_size = set_size, comp_prec = comp_prec) + elif isinstance(file_name, str): + s = file_name.split("#") + name = s[1] if len(s) > 1 else "" + with h5py.File(s[0], 'w') as f: + dpdata.deepmd.hdf5.dump(f, name, data, set_size = set_size, comp_prec = comp_prec) + else: + raise TypeError("Unsupported file_name") def from_multi_systems(self, - directory, - **kwargs): + directory: str, + **kwargs) -> h5py.Group: + """Generate HDF5 groups from a HDF5 file, which will be + passed to `from_system`. + + Parameters + ---------- + directory : str + HDF5 file name + + Yields + ------ + h5py.Group + a HDF5 group in the HDF5 file + """ with h5py.File(directory, 'r') as f: - return ["%s#%s" % (directory, ff) for ff in f.keys()] + for ff in f.keys(): + yield f[ff] def to_multi_systems(self, - formulas, - directory, - **kwargs): - return ["%s#%s" % (directory, ff) for ff in formulas] + formulas: List[str], + directory: str, + **kwargs) -> h5py.Group: + """Generate HDF5 groups, which will be passed to `to_system`. + + Parameters + ---------- + formulas : list[str] + formulas of MultiSystems + directory : str + HDF5 file name + + Yields + ------ + h5py.Group + a HDF5 group with the name of formula + """ + with h5py.File(directory, 'w') as f: + for ff in formulas: + yield f.create_group(ff) @Driver.register("dp") diff --git a/tests/test_deepmd_hdf5.py b/tests/test_deepmd_hdf5.py index 3c15b45e8..08d25730e 100644 --- a/tests/test_deepmd_hdf5.py +++ b/tests/test_deepmd_hdf5.py @@ -2,9 +2,9 @@ import numpy as np import unittest from context import dpdata -from comp_sys import CompLabeledSys, CompSys, IsPBC +from comp_sys import CompLabeledSys, CompSys, IsNoPBC, IsPBC, MultiSystems -class TestDeepmdLoadDumpComp(unittest.TestCase, CompLabeledSys, IsPBC): +class TestDeepmdLoadDumpHDF5(unittest.TestCase, CompLabeledSys, IsPBC): def setUp (self) : self.system_1 = dpdata.LabeledSystem('poscars/OUTCAR.h2o.md', fmt = 'vasp/outcar') @@ -25,7 +25,7 @@ def tearDown(self) : os.remove('tmp.deepmd.hdf5') -class TestDeepmdCompNoLabels(unittest.TestCase, CompSys, IsPBC) : +class TestDeepmdHDF5NoLabels(unittest.TestCase, CompSys, IsPBC) : def setUp (self) : self.system_1 = dpdata.System('poscars/POSCAR.h2o.md', fmt = 'vasp/poscar') @@ -43,3 +43,28 @@ def setUp (self) : def tearDown(self) : if os.path.exists('tmp.deepmd.hdf5'): os.remove('tmp.deepmd.hdf5') + + +class TestHDF5Multi(unittest.TestCase, CompLabeledSys, MultiSystems, IsNoPBC): + def setUp (self): + self.places = 6 + self.e_places = 6 + self.f_places = 6 + self.v_places = 6 + + system_1 = dpdata.LabeledSystem('gaussian/methane.gaussianlog', fmt='gaussian/log') + system_2 = dpdata.LabeledSystem('gaussian/methane_reordered.gaussianlog', fmt='gaussian/log') + system_3 = dpdata.LabeledSystem('gaussian/methane_sub.gaussianlog', fmt='gaussian/log') + systems = dpdata.MultiSystems(system_1, system_2, system_3) + systems.to_deepmd_hdf5("tmp.deepmd.hdf5") + + self.systems = dpdata.MultiSystems().from_deepmd_hdf5("tmp.deepmd.hdf5") + self.system_names = ['C1H4', 'C1H3'] + self.system_sizes = {'C1H4':2, 'C1H3':1} + self.atom_names = ['C', 'H'] + self.system_1 = self.systems['C1H3'] + self.system_2 = system_3 + + def tearDown(self) : + if os.path.exists('tmp.deepmd.hdf5'): + os.remove('tmp.deepmd.hdf5') From c0bb79825196ed7c72b0bf94c08514fb9c4d162e Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 23 May 2022 05:35:07 -0400 Subject: [PATCH 11/18] add HybridDriver (#292) --- dpdata/driver.py | 63 ++++++++++++++++++++++++++++++++++++++++++- tests/test_predict.py | 37 +++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 1 deletion(-) diff --git a/dpdata/driver.py b/dpdata/driver.py index 84419cfe6..29ae2703f 100644 --- a/dpdata/driver.py +++ b/dpdata/driver.py @@ -1,5 +1,5 @@ """Driver plugin system.""" -from typing import Callable +from typing import Callable, List, Union from .plugin import Plugin from abc import ABC, abstractmethod @@ -78,3 +78,64 @@ def label(self, data: dict) -> dict: labeled data with energies and forces """ return NotImplemented + + +@Driver.register("hybrid") +class HybridDriver(Driver): + """Hybrid driver, with mixed drivers. + + Parameters + ---------- + drivers : list[dict, Driver] + list of drivers or drivers dict. For a dict, it should + contain `type` as the name of the driver, and others + are arguments of the driver. + + Raises + ------ + TypeError + The value of `drivers` is not a dict or `Driver`. + + Examples + -------- + >>> driver = HybridDriver([ + ... {"type": "sqm", "qm_theory": "DFTB3"}, + ... {"type": "dp", "dp": "frozen_model.pb"}, + ... ]) + This driver is the hybrid of SQM and DP. + """ + def __init__(self, drivers: List[Union[dict, Driver]]) -> None: + self.drivers = [] + for driver in drivers: + if isinstance(driver, Driver): + self.drivers.append(driver) + elif isinstance(driver, dict): + type = driver["type"] + del driver["type"] + self.drivers.append(Driver.get_driver(type)(**driver)) + else: + raise TypeError("driver should be Driver or dict") + + def label(self, data: dict) -> dict: + """Label a system data. + + Energies and forces are the sum of those of each driver. + + Parameters + ---------- + data : dict + data with coordinates and atom types + + Returns + ------- + dict + labeled data with energies and forces + """ + for ii, driver in enumerate(self.drivers): + lb_data = driver.label(data.copy()) + if ii == 0: + labeled_data = lb_data.copy() + else: + labeled_data['energies'] += lb_data ['energies'] + labeled_data['forces'] += lb_data ['forces'] + return labeled_data diff --git a/tests/test_predict.py b/tests/test_predict.py index 1cb816cce..c5fe5d76c 100644 --- a/tests/test_predict.py +++ b/tests/test_predict.py @@ -16,6 +16,17 @@ def label(self, data): return data +@dpdata.driver.Driver.register("one") +class ZeroDriver(dpdata.driver.Driver): + def label(self, data): + nframes = data['coords'].shape[0] + natoms = data['coords'].shape[1] + data['energies'] = np.ones((nframes,)) + data['forces'] = np.ones((nframes, natoms, 3)) + data['virials'] = np.ones((nframes, 3, 3)) + return data + + class TestPredict(unittest.TestCase, CompLabeledSys): def setUp (self) : ori_sys = dpdata.LabeledSystem('poscars/deepmd.h2o.md', @@ -32,3 +43,29 @@ def setUp (self) : self.e_places = 6 self.f_places = 6 self.v_places = 6 + + +class TestHybridDriver(unittest.TestCase, CompLabeledSys): + """Test HybridDriver.""" + def setUp(self) : + ori_sys = dpdata.LabeledSystem('poscars/deepmd.h2o.md', + fmt = 'deepmd/raw', + type_map = ['O', 'H']) + self.system_1 = ori_sys.predict([ + {"type": "one"}, + {"type": "one"}, + {"type": "one"}, + {"type": "zero"}, + ], + driver="hybrid") + # sum is 3 + self.system_2 = dpdata.LabeledSystem('poscars/deepmd.h2o.md', + fmt = 'deepmd/raw', + type_map = ['O', 'H']) + for pp in ('energies', 'forces'): + self.system_2.data[pp][:] = 3. + + self.places = 6 + self.e_places = 6 + self.f_places = 6 + self.v_places = 6 From 5c4008d0703afd2b607a999f6bf45bcc0ce6d9a1 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 26 May 2022 08:22:08 -0400 Subject: [PATCH 12/18] add empty __init__.py file to subpackages (#295) otherwise they are not listed in the doc --- dpdata/abacus/__init__.py | 0 dpdata/xyz/__init__.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 dpdata/abacus/__init__.py create mode 100644 dpdata/xyz/__init__.py diff --git a/dpdata/abacus/__init__.py b/dpdata/abacus/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/dpdata/xyz/__init__.py b/dpdata/xyz/__init__.py new file mode 100644 index 000000000..e69de29bb From 31552db897e9739f60024f9c54ebbd67ca450b04 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sun, 5 Jun 2022 21:43:08 -0400 Subject: [PATCH 13/18] add data type; refactor methods (#299) * add data type; refactor methods * add DataType to manage types of data * refactor data checking to check type and shape of data ** fix incorrect data type in some codes * refactor methods including sub_system, append, sort_atom_types, shuffle, pick_atom_idx, and merge methods in LabeledSystem into those in System * small fix * fix the shape of formal_charges. Looks like the docstring is wrong * remove wrong import * fix system class in sub_system --- dpdata/bond_order_system.py | 15 +- dpdata/cp2k/output.py | 2 +- dpdata/plugins/ase.py | 2 +- dpdata/pwmat/atomconfig.py | 4 +- dpdata/pymatgen/molecule.py | 4 +- dpdata/system.py | 353 ++++++++++++++++++++---------------- dpdata/xyz/quip_gap_xyz.py | 2 +- tests/comp_sys.py | 4 + 8 files changed, 214 insertions(+), 172 deletions(-) diff --git a/dpdata/bond_order_system.py b/dpdata/bond_order_system.py index 0a43bda5f..f2a66fd2a 100644 --- a/dpdata/bond_order_system.py +++ b/dpdata/bond_order_system.py @@ -1,15 +1,13 @@ #%% # Bond Order System -from dpdata.system import System, LabeledSystem, check_System, load_format +import numpy as np +from dpdata.system import System, LabeledSystem, load_format, DataType, Axis import dpdata.rdkit.utils from dpdata.rdkit.sanitize import Sanitizer, SanitizeError from copy import deepcopy from rdkit.Chem import Conformer # import dpdata.rdkit.mol2 -def check_BondOrderSystem(data): - check_System(data) - assert ('bonds' in data.keys()) class BondOrderSystem(System): ''' @@ -23,6 +21,11 @@ class BondOrderSystem(System): 1 - single bond, 2 - double bond, 3 - triple bond, 1.5 - aromatic bond - `d_example['formal_charges']` : a numpy array of size 5 x 1 ''' + DTYPES = System.DTYPES + ( + DataType("bonds", np.ndarray, (Axis.NBONDS, 3)), + DataType("formal_charges", np.ndarray, (Axis.NATOMS,)), + ) + def __init__(self, file_name = None, fmt = 'auto', @@ -86,6 +89,7 @@ def __init__(self, if type_map: self.apply_type_map(type_map) + self.check_data() def from_fmt_obj(self, fmtobj, file_name, **kwargs): mol = fmtobj.from_bond_order_system(file_name, **kwargs) @@ -104,9 +108,6 @@ def to_fmt_obj(self, fmtobj, *args, **kwargs): self.rdkit_mol.AddConformer(conf, assignId=True) return fmtobj.to_bond_order_system(self.data, self.rdkit_mol, *args, **kwargs) - def __repr__(self): - return self.__str__() - def __str__(self): ''' A brief summary of the system diff --git a/dpdata/cp2k/output.py b/dpdata/cp2k/output.py index 808387a3b..31b29feb6 100644 --- a/dpdata/cp2k/output.py +++ b/dpdata/cp2k/output.py @@ -268,7 +268,7 @@ def handle_single_xyz_frame(self, lines): #info_dict['atom_types'] = np.asarray(atom_types_list) info_dict['coords'] = np.asarray([coords_list]).astype('float32') info_dict['energies'] = np.array([energy]).astype('float32') - info_dict['orig']=[0,0,0] + info_dict['orig'] = np.zeros(3) return info_dict #%% diff --git a/dpdata/plugins/ase.py b/dpdata/plugins/ase.py index 957aac568..5f9dff077 100644 --- a/dpdata/plugins/ase.py +++ b/dpdata/plugins/ase.py @@ -43,7 +43,7 @@ def from_system(self, atoms: "ase.Atoms", **kwargs) -> dict: 'atom_types': atom_types, 'cells': np.array([cells]).astype('float32'), 'coords': np.array([coords]).astype('float32'), - 'orig': [0,0,0], + 'orig': np.zeros(3), } return info_dict diff --git a/dpdata/pwmat/atomconfig.py b/dpdata/pwmat/atomconfig.py index 6535edc64..bc06f3470 100644 --- a/dpdata/pwmat/atomconfig.py +++ b/dpdata/pwmat/atomconfig.py @@ -11,7 +11,7 @@ def _to_system_data_lower(lines) : for kk in range(idx+1,idx+1+3): vector=[float(jj) for jj in lines[kk].split()[0:3]] cell.append(vector) - system['cells'] = [np.array(cell)] + system['cells'] = np.array([cell]) coord = [] atomic_number = [] atom_numbs = [] @@ -32,7 +32,7 @@ def _to_system_data_lower(lines) : for ii in np.unique(sorted(atomic_number)) : atom_numbs.append(atomic_number.count(ii)) system['atom_numbs'] = [int(ii) for ii in atom_numbs] - system['coords'] = [np.array(coord)] + system['coords'] = np.array([coord]) system['orig'] = np.zeros(3) atom_types = [] for idx,ii in enumerate(system['atom_numbs']) : diff --git a/dpdata/pymatgen/molecule.py b/dpdata/pymatgen/molecule.py index 06b74c168..a362bb539 100644 --- a/dpdata/pymatgen/molecule.py +++ b/dpdata/pymatgen/molecule.py @@ -24,6 +24,6 @@ def to_system_data(file_name, protect_layer = 9) : # center = [c - h_cell_size for c in mol.center_of_mass] system['orig'] = np.array([0, 0, 0]) - system['coords'] = [tmpcoord] - system['cells'] = [10.0 * np.eye(3)] + system['coords'] = np.array([tmpcoord]) + system['cells'] = np.array([10.0 * np.eye(3)]) return system diff --git a/dpdata/system.py b/dpdata/system.py index df305a6e0..12f839e86 100644 --- a/dpdata/system.py +++ b/dpdata/system.py @@ -5,7 +5,8 @@ import numpy as np import dpdata.md.pbc from copy import deepcopy -from typing import Any +from enum import Enum, unique +from typing import Any, Tuple from monty.json import MSONable from monty.serialization import loadfn,dumpfn from dpdata.periodic_table import Element @@ -35,6 +36,99 @@ def load_format(fmt): fmt, " ".join(formats) )) +@unique +class Axis(Enum): + """Data axis.""" + NFRAMES = "nframes" + NATOMS = "natoms" + NTYPES = "ntypes" + NBONDS = "nbonds" + + +class DataError(Exception): + """Data is not correct.""" + + +class DataType: + """DataType represents a type of data, like coordinates, energies, etc. + + Parameters + ---------- + name : str + name of data + dtype : type or tuple[type] + data type, e.g. np.ndarray + shape : tuple[int], optional + shape of data. Used when data is list or np.ndarray. Use Axis to + represents numbers + required : bool, default=True + whether this data is required + """ + def __init__(self, name: str, dtype: type, shape: Tuple[int, Axis]=None, required: bool=True) -> None: + self.name = name + self.dtype = dtype + self.shape = shape + self.required = required + + def real_shape(self, system: "System") -> Tuple[int]: + """Returns expected real shape of a system.""" + shape = [] + for ii in self.shape: + if ii is Axis.NFRAMES: + shape.append(system.get_nframes()) + elif ii is Axis.NTYPES: + shape.append(system.get_ntypes()) + elif ii is Axis.NATOMS: + shape.append(system.get_natoms()) + elif ii is Axis.NBONDS: + # BondOrderSystem + shape.append(system.get_nbonds()) + elif isinstance(ii, int): + shape.append(ii) + else: + raise RuntimeError("Shape is not an int!") + return tuple(shape) + + def check(self, system: "System"): + """Check if a system has correct data of this type. + + Parameters + ---------- + system : System + checked system + + Raises + ------ + DataError + type or shape of data is not correct + """ + # check if exists + if self.name in system.data: + data = system.data[self.name] + # check dtype + # allow list for empty np.ndarray + if isinstance(data, list) and not len(data): + pass + elif not isinstance(data, self.dtype): + raise DataError("Type of %s is %s, but expected %s" % (self.name, + type(data).__name__, self.dtype.__name__)) + # check shape + if self.shape is not None: + shape = self.real_shape(system) + # skip checking empty list of np.ndarray + if isinstance(data, np.ndarray): + if data.size and shape != data.shape: + raise DataError("Shape of %s is %s, but expected %s" % (self.name, + data.shape, shape)) + elif isinstance(data, list): + if len(shape) and shape[0] != len(data): + raise DataError("Length of %s is %d, but expected %d" % (self.name, + len(shape), shape[0])) + else: + raise RuntimeError("Unsupported type to check shape") + elif self.required: + raise DataError("%s not found in data" % self.name) + class System (MSONable) : ''' @@ -59,7 +153,21 @@ class System (MSONable) : Restrictions: - `d_example['orig']` is always [0, 0, 0] - `d_example['cells'][ii]` is always lower triangular (lammps cell tensor convention) + + Attributes + ---------- + DTYPES : tuple[DataType] + data types of this class ''' + DTYPES = ( + DataType("atom_numbs", list, (Axis.NTYPES,)), + DataType("atom_names", list, (Axis.NTYPES,)), + DataType("atom_types", np.ndarray, (Axis.NATOMS,)), + DataType("orig", np.ndarray, (3,)), + DataType("cells", np.ndarray, (Axis.NFRAMES, 3, 3)), + DataType("coords", np.ndarray, (Axis.NFRAMES, Axis.NATOMS, 3)), + DataType("nopbc", bool, required=False), + ) def __init__ (self, file_name = None, @@ -110,8 +218,8 @@ def __init__ (self, self.data['coords'] = [] if data: - check_System(data) self.data=data + self.check_data() return if file_name is None : return @@ -120,6 +228,21 @@ def __init__ (self, if type_map is not None: self.apply_type_map(type_map) + def check_data(self): + """Check if data is correct. + + Raises + ------ + DataError + if data is not correct + """ + if not isinstance(self.data, dict): + raise DataError("data is not a dict!") + for dd in self.DTYPES: + dd.check(self) + if sum(self.get_atom_numbs()) != self.get_natoms(): + raise DataError("Sum of atom_numbs (%d) is not equal to natoms (%d)." % (sum(self.get_atom_numbs()), self.get_natoms())) + post_funcs = Plugin() def from_fmt(self, file_name, fmt='auto', **kwargs): @@ -136,6 +259,7 @@ def from_fmt_obj(self, fmtobj, file_name, **kwargs): self.append(System(data=dd)) else: self.data = {**self.data, **data} + self.check_data() if hasattr(fmtobj.from_system, 'post_func'): for post_f in fmtobj.from_system.post_func: self.post_funcs.get_plugin(post_f)(self) @@ -283,6 +407,9 @@ def get_natoms(self) : """Returns total number of atoms in the system""" return len(self.data['atom_types']) + def get_ntypes(self) -> int: + """Returns total number of atom types in the system.""" + return len(self.data['atom_names']) def copy(self): """Returns a copy of the system. """ @@ -303,14 +430,22 @@ def sub_system(self, f_idx) : sub_system : System The subsystem """ - tmp = System() - for ii in ['atom_numbs', 'atom_names', 'atom_types', 'orig'] : - tmp.data[ii] = self.data[ii] - - tmp.data['cells'] = self.data['cells'][f_idx].reshape(-1, 3, 3) - tmp.data['coords'] = self.data['coords'][f_idx].reshape(-1, self.data['coords'].shape[1], 3) - tmp.data['nopbc'] = self.nopbc - + tmp = self.__class__() + # convert int to array_like + if isinstance(f_idx, (int, np.int64)): + f_idx = np.array([f_idx]) + for tt in self.DTYPES: + if tt.name not in self.data: + # skip optional data + continue + if tt.shape is not None and Axis.NFRAMES in tt.shape: + axis_nframes = tt.shape.index(Axis.NFRAMES) + new_shape = [slice(None) for _ in self.data[tt.name].shape] + new_shape[axis_nframes] = f_idx + tmp.data[tt.name] = self.data[tt.name][tuple(new_shape)] + else: + # keep the original data + tmp.data[tt.name] = self.data[tt.name] return tmp @@ -345,8 +480,19 @@ def append(self, system) : for ii in ['atom_types','orig'] : eq = [v1==v2 for v1,v2 in zip(system.data[ii], self.data[ii])] assert(all(eq)) - for ii in ['coords', 'cells'] : - self.data[ii] = np.concatenate((self.data[ii], system[ii]), axis = 0) + for tt in self.DTYPES: + # check if the first shape is nframes + if tt.shape is not None and Axis.NFRAMES in tt.shape: + if tt.name not in self.data and tt.name in system.data: + raise RuntimeError('system has %s, but this does not' % tt.name) + elif tt.name in self.data and tt.name not in system.data: + raise RuntimeError('this has %s, but system does not' % tt.name) + elif tt.name not in self.data and tt.name not in system.data: + # skip if both not exist + continue + # concat any data in nframes axis + axis_nframes = tt.shape.index(Axis.NFRAMES) + self.data[tt.name] = np.concatenate((self.data[tt.name], system[tt.name]), axis=axis_nframes) if self.nopbc and not system.nopbc: # appended system uses PBC, cancel nopbc self.data['nopbc'] = False @@ -384,10 +530,24 @@ def apply_type_map(self, type_map) : else: raise RuntimeError('invalid type map, cannot be applied') - def sort_atom_types(self): + def sort_atom_types(self) -> np.ndarray: + """Sort atom types. + + Returns + ------- + idx : np.ndarray + new atom index in the Axis.NATOMS + """ idx = np.argsort(self.data['atom_types']) - self.data['atom_types'] = self.data['atom_types'][idx] - self.data['coords'] = self.data['coords'][:, idx] + for tt in self.DTYPES: + if tt.name not in self.data: + # skip optional data + continue + if tt.shape is not None and Axis.NATOMS in tt.shape: + axis_natoms = tt.shape.index(Axis.NATOMS) + new_shape = [slice(None) for _ in self.data[tt.name].shape] + new_shape[axis_natoms] = idx + self.data[tt.name] = self.data[tt.name][tuple(new_shape)] return idx @property @@ -639,8 +799,7 @@ def nopbc(self, value): def shuffle(self): """Shuffle frames randomly.""" idx = np.random.permutation(self.get_nframes()) - for ii in ['cells', 'coords']: - self.data[ii] = self.data[ii][idx] + self.data = self.sub_system(idx).data return idx def predict(self, *args: Any, driver: str="dp", **kwargs: Any) -> "LabeledSystem": @@ -687,8 +846,17 @@ def pick_atom_idx(self, idx, nopbc=None): new system """ new_sys = self.copy() - new_sys.data['coords'] = self.data['coords'][:, idx, :] - new_sys.data['atom_types'] = self.data['atom_types'][idx] + if isinstance(idx, (int, np.int64)): + idx = np.array([idx]) + for tt in self.DTYPES: + if tt.name not in self.data: + # skip optional data + continue + if tt.shape is not None and Axis.NATOMS in tt.shape: + axis_natoms = tt.shape.index(Axis.NATOMS) + new_shape = [slice(None) for _ in self.data[tt.name].shape] + new_shape[axis_natoms] = idx + new_sys.data[tt.name] = self.data[tt.name][tuple(new_shape)] # recalculate atom_numbs according to atom_types atom_numbs = np.bincount(new_sys.data['atom_types'], minlength=len(self.get_atom_names())) new_sys.data['atom_numbs'] = list(atom_numbs) @@ -799,18 +967,6 @@ class LabeledSystem (System): It is noted that - The order of frames stored in `'energies'`, `'forces'` and `'virials'` should be consistent with `'atom_types'`, `'cells'` and `'coords'`. - The order of atoms in **every** frame of `'forces'` should be consistent with `'coords'` and `'atom_types'`. - ''' - - def __init__ (self, - file_name = None, - fmt = 'auto', - type_map = None, - begin = 0, - step = 1, - data=None, - **kwargs) : - """ - Constructor Parameters ---------- @@ -841,19 +997,14 @@ def __init__ (self, The beginning frame when loading MD trajectory. step : int The number of skipped frames when loading MD trajectory. - """ - - System.__init__(self) + ''' - if data: - check_LabeledSystem(data) - self.data=data - return - if file_name is None : - return - self.from_fmt(file_name, fmt, type_map=type_map, begin= begin, step=step, **kwargs) - if type_map is not None: - self.apply_type_map(type_map) + DTYPES = System.DTYPES + ( + DataType("energies", np.ndarray, (Axis.NFRAMES,)), + DataType("forces", np.ndarray, (Axis.NFRAMES, Axis.NATOMS, 3)), + DataType("virials", np.ndarray, (Axis.NFRAMES, 3, 3), required=False), + DataType("atom_pref", np.ndarray, (Axis.NFRAMES, Axis.NATOMS), required=False), + ) post_funcs = Plugin() + System.post_funcs @@ -865,6 +1016,7 @@ def from_fmt_obj(self, fmtobj, file_name, **kwargs): self.append(LabeledSystem(data=dd)) else: self.data = {**self.data, **data} + self.check_data() if hasattr(fmtobj.from_labeled_system, 'post_func'): for post_f in fmtobj.from_labeled_system.post_func: self.post_funcs.get_plugin(post_f)(self) @@ -873,9 +1025,6 @@ def from_fmt_obj(self, fmtobj, file_name, **kwargs): def to_fmt_obj(self, fmtobj, *args, **kwargs): return fmtobj.to_labeled_system(self.data, *args, **kwargs) - def __repr__(self): - return self.__str__() - def __str__(self): ret="Data Summary" ret+="\nLabeled System" @@ -925,68 +1074,6 @@ def rot_frame_lower_triangular(self, f_idx = 0) : self.affine_map_fv(trans, f_idx = f_idx) return trans - def sub_system(self, f_idx) : - """ - Construct a subsystem from the system - - Parameters - ---------- - f_idx : int or index - Which frame to use in the subsystem - - Returns - ------- - sub_system : LabeledSystem - The subsystem - """ - tmp_sys = LabeledSystem() - tmp_sys.data = System.sub_system(self, f_idx).data - tmp_sys.data['energies'] = np.atleast_1d(self.data['energies'][f_idx]) - tmp_sys.data['forces'] = self.data['forces'][f_idx].reshape(-1, self.data['forces'].shape[1], 3) - if 'virials' in self.data: - tmp_sys.data['virials'] = self.data['virials'][f_idx].reshape(-1, 3, 3) - return tmp_sys - - def append(self, system): - """ - Append a system to this system - - Parameters - ---------- - system : System - The system to append - """ - if not System.append(self, system): - # skip if this system or the system to append is non-converged - return - tgt = ['energies', 'forces'] - for ii in ['atom_pref']: - if ii in self.data: - tgt.append(ii) - if ('virials' in system.data) and ('virials' not in self.data): - raise RuntimeError('system has virial, but this does not') - if ('virials' not in system.data) and ('virials' in self.data): - raise RuntimeError('this has virial, but system does not') - if 'virials' in system.data : - tgt.append('virials') - for ii in tgt: - self.data[ii] = np.concatenate((self.data[ii], system[ii]), axis = 0) - - def sort_atom_types(self): - idx = System.sort_atom_types(self) - self.data['forces'] = self.data['forces'][:, idx] - for ii in ['atom_pref']: - if ii in self.data: - self.data[ii] = self.data[ii][:, idx] - - def shuffle(self): - """Also shuffle labeled data e.g. energies and forces.""" - idx = System.shuffle(self) - for ii in ['energies', 'forces', 'virials', 'atom_pref']: - if ii in self.data: - self.data[ii] = self.data[ii][idx] - return idx - def correction(self, hl_sys): """Get energy and force correction between self and a high-level LabeledSystem. The self's coordinates will be kept, but energy and forces will be replaced by @@ -1014,26 +1101,6 @@ def correction(self, hl_sys): corrected_sys.data['virials'] = hl_sys.data['virials'] - self.data['virials'] return corrected_sys - def pick_atom_idx(self, idx, nopbc=None): - """Pick atom index - - Parameters - ---------- - idx: int or list or slice - atom index - nopbc: Boolen (default: None) - If nopbc is True or False, set nopbc - - Returns - ------- - new_sys: LabeledSystem - new system - """ - new_sys = System.pick_atom_idx(self, idx, nopbc=nopbc) - # forces - new_sys.data['forces'] = self.data['forces'][:, idx, :] - return new_sys - class MultiSystems: '''A set containing several systems.''' @@ -1282,33 +1349,3 @@ def to_format(self, *args, **kwargs): setattr(MultiSystems, method, get_func(formatcls)) add_format_methods() - -def check_System(data): - keys={'atom_names','atom_numbs','cells','coords','orig','atom_types'} - assert( isinstance(data,dict) ) - assert( keys.issubset(set(data.keys())) ) - if len(data['coords']) > 0 : - assert( len(data['coords'][0])==len(data['atom_types'])==sum(data['atom_numbs']) ) - else : - assert( len(data['atom_types'])==sum(data['atom_numbs']) ) - assert( len(data['cells']) == len(data['coords']) ) - assert( len(data['atom_names'])==len(data['atom_numbs']) ) - -def check_LabeledSystem(data): - keys={'atom_names', 'atom_numbs', 'atom_types', 'cells', 'coords', 'energies', - 'forces', 'orig'} - - assert( keys.issubset(set(data.keys())) ) - assert( isinstance(data,dict) ) - assert( len(data['atom_names'])==len(data['atom_numbs']) ) - - if len(data['coords']) > 0 : - assert( len(data['coords'][0])==len(data['atom_types']) ==sum(data['atom_numbs']) ) - else: - assert( len(data['atom_types']) ==sum(data['atom_numbs']) ) - if 'virials' in data: - assert( len(data['cells']) == len(data['coords']) == len(data['virials']) == len(data['energies']) ) - else: - assert( len(data['cells']) == len(data['coords']) == len(data['energies']) ) - - diff --git a/dpdata/xyz/quip_gap_xyz.py b/dpdata/xyz/quip_gap_xyz.py index 54e74376d..e902958ac 100644 --- a/dpdata/xyz/quip_gap_xyz.py +++ b/dpdata/xyz/quip_gap_xyz.py @@ -129,5 +129,5 @@ def handle_single_xyz_frame(lines): info_dict['forces'] = np.array([force_array]).astype('float32') if virials is not None: info_dict['virials'] = virials - info_dict['orig'] = [0,0,0] + info_dict['orig'] = np.zeros(3) return info_dict diff --git a/tests/comp_sys.py b/tests/comp_sys.py index 3996b0f42..94c3e52a0 100644 --- a/tests/comp_sys.py +++ b/tests/comp_sys.py @@ -54,6 +54,10 @@ def test_coord(self): def test_nopbc(self): self.assertEqual(self.system_1.nopbc, self.system_2.nopbc) + def test_data_check(self): + self.system_1.check_data() + self.system_2.check_data() + class CompLabeledSys (CompSys) : def test_energy(self) : From 2bbfc9bf0aec6d39630fc95e27857df982dffb4e Mon Sep 17 00:00:00 2001 From: Liu Renxi <75369672+Liu-RX@users.noreply.github.com> Date: Sat, 11 Jun 2022 14:18:57 +0800 Subject: [PATCH 14/18] adapt abacus/md interface to MD output without stress calculation. (#301) * adapt abacus/md interface to MD output without stress calculation. * add unit test for abacus md without stress output. * Add files via upload * add assertion failed reason for abacus/md interface Co-authored-by: LiuRenxi --- dpdata/abacus/md.py | 28 +- tests/abacus.md.nostress/INPUT | 27 + tests/abacus.md.nostress/OUT.autotest/MD_dump | 44 ++ .../OUT.autotest/running_md.log | 527 ++++++++++++++++++ tests/abacus.md.nostress/STRU | 19 + tests/abacus.md.nostress/Si_coord | 8 + tests/abacus.md.nostress/Si_force | 8 + tests/test_abacus_md.py | 104 ++-- 8 files changed, 723 insertions(+), 42 deletions(-) create mode 100644 tests/abacus.md.nostress/INPUT create mode 100644 tests/abacus.md.nostress/OUT.autotest/MD_dump create mode 100644 tests/abacus.md.nostress/OUT.autotest/running_md.log create mode 100644 tests/abacus.md.nostress/STRU create mode 100644 tests/abacus.md.nostress/Si_coord create mode 100644 tests/abacus.md.nostress/Si_force diff --git a/dpdata/abacus/md.py b/dpdata/abacus/md.py index 8bd9c72cf..020f968b5 100644 --- a/dpdata/abacus/md.py +++ b/dpdata/abacus/md.py @@ -33,8 +33,17 @@ def get_coord_dump_freq(inlines): def get_coords_from_dump(dumplines, natoms): nlines = len(dumplines) total_natoms = sum(natoms) - nframes_dump = int(nlines/(total_natoms + 13)) - + calc_stress = False + if "VIRIAL" in dumplines[6]: + calc_stress = True + else: + assert("POSITIONS" in dumplines[6] and "FORCE" in dumplines[6]), "keywords 'POSITIONS' and 'FORCE' cannot be found in the 6th line. Please check." + nframes_dump = -1 + if calc_stress: + nframes_dump = int(nlines/(total_natoms + 13)) + else: + nframes_dump = int(nlines/(total_natoms + 9)) + assert(nframes_dump > 0), "Number of lines in MD_dump file = %d. Number of atoms = %d. The MD_dump file is incomplete."%(nlines, total_natoms) cells = np.zeros([nframes_dump, 3, 3]) stresses = np.zeros([nframes_dump, 3, 3]) forces = np.zeros([nframes_dump, total_natoms, 3]) @@ -47,12 +56,17 @@ def get_coords_from_dump(dumplines, natoms): # read in LATTICE_VECTORS for ix in range(3): cells[iframe, ix] = np.array([float(i) for i in re.split('\s+', dumplines[iline+3+ix])[-3:]]) * celldm - stresses[iframe, ix] = np.array([float(i) for i in re.split('\s+', dumplines[iline+7+ix])[-3:]]) + if calc_stress: + stresses[iframe, ix] = np.array([float(i) for i in re.split('\s+', dumplines[iline+7+ix])[-3:]]) for iat in range(total_natoms): - coords[iframe, iat] = np.array([float(i) for i in re.split('\s+', dumplines[iline+11+iat])[-6:-3]])*celldm - forces[iframe, iat] = np.array([float(i) for i in re.split('\s+', dumplines[iline+11+iat])[-3:]]) + if calc_stress: + coords[iframe, iat] = np.array([float(i) for i in re.split('\s+', dumplines[iline+11+iat])[-6:-3]])*celldm + forces[iframe, iat] = np.array([float(i) for i in re.split('\s+', dumplines[iline+11+iat])[-3:]]) + else: + coords[iframe, iat] = np.array([float(i) for i in re.split('\s+', dumplines[iline+7+iat])[-6:-3]])*celldm + forces[iframe, iat] = np.array([float(i) for i in re.split('\s+', dumplines[iline+7+iat])[-3:]]) iframe += 1 - assert(iframe == nframes_dump) + assert(iframe == nframes_dump), "iframe=%d, nframe_dump=%d. Number of frames does not match number of lines in MD_dump."%(iframe, nframes_dump) cells *= bohr2ang coords *= bohr2ang stresses *= kbar2evperang3 @@ -66,7 +80,7 @@ def get_energy(outlines, ndump, dump_freq): if nenergy%dump_freq == 0: energy.append(float(line.split()[-2])) nenergy+=1 - assert(ndump == len(energy)) + assert(ndump == len(energy)), "Number of total energies in running_md.log = %d. Number of frames in MD_dump = %d. Please check."%(len(energy), ndump) energy = np.array(energy) return energy diff --git a/tests/abacus.md.nostress/INPUT b/tests/abacus.md.nostress/INPUT new file mode 100644 index 000000000..4dd5c0fa6 --- /dev/null +++ b/tests/abacus.md.nostress/INPUT @@ -0,0 +1,27 @@ +INPUT_PARAMETERS +#Parameters (General) +suffix autotest +pseudo_dir ./ +ntype 1 +nbands 8 +calculation md + +#Parameters (Accuracy) +ecutwfc 20 +scf_nmax 20 + +basis_type pw +md_nstep 3 + +#cal_stress 1 +stress_thr 1e-6 +cal_force 1 +force_thr_ev 1.0e-3 + +ks_solver cg +mixing_type pulay +mixing_beta 0.7 + +md_type -1 +md_dt 1 +md_tfirst 0 diff --git a/tests/abacus.md.nostress/OUT.autotest/MD_dump b/tests/abacus.md.nostress/OUT.autotest/MD_dump new file mode 100644 index 000000000..12bde6abd --- /dev/null +++ b/tests/abacus.md.nostress/OUT.autotest/MD_dump @@ -0,0 +1,44 @@ +MDSTEP: 0 +LATTICE_CONSTANT: 10.200000000000 +LATTICE_VECTORS + 0.500000000000 0.500000000000 0.000000000000 + 0.500000000000 0.000000000000 0.500000000000 + 0.000000000000 0.500000000000 0.500000000000 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 Si 0.000000000000 0.000000000000 0.000000000000 -0.885362725259 0.500467424429 0.150239620221 + 1 Si 0.241000000000 0.255000000000 0.250999999999 0.885362725259 -0.500467424429 -0.150239620221 + + +MDSTEP: 1 +LATTICE_CONSTANT: 10.200000000000 +LATTICE_VECTORS + 0.500000000000 0.500000000000 0.000000000000 + 0.500000000000 0.000000000000 0.500000000000 + 0.000000000000 0.500000000000 0.500000000000 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 Si 0.999208682339 0.500447306737 0.500134280856 -0.728804779648 0.408578746723 0.107042476463 + 1 Si 0.241791317661 0.254552693263 0.250865719143 0.728804779648 -0.408578746723 -0.107042476463 + + +MDSTEP: 2 +LATTICE_CONSTANT: 10.200000000000 +LATTICE_VECTORS + 0.500000000000 0.500000000000 0.000000000000 + 0.500000000000 0.000000000000 0.500000000000 + 0.000000000000 0.500000000000 0.500000000000 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 Si 0.997114226602 0.501624803733 0.500458153134 -0.316038867402 0.171613491764 0.014802659803 + 1 Si 0.243885773398 0.253375196267 0.250541846865 0.316038867402 -0.171613491764 -0.014802659803 + + +MDSTEP: 3 +LATTICE_CONSTANT: 10.200000000000 +LATTICE_VECTORS + 0.500000000000 0.500000000000 0.000000000000 + 0.500000000000 0.000000000000 0.500000000000 + 0.000000000000 0.500000000000 0.500000000000 +INDEX LABEL POSITIONS FORCE (eV/Angstrom) + 0 Si 0.994451593844 0.503106810892 0.500786060548 0.204324467775 -0.117398116295 -0.052955519257 + 1 Si 0.246548406156 0.251893189108 0.250213939451 -0.204324467775 0.117398116295 0.052955519257 + + diff --git a/tests/abacus.md.nostress/OUT.autotest/running_md.log b/tests/abacus.md.nostress/OUT.autotest/running_md.log new file mode 100644 index 000000000..1f5269321 --- /dev/null +++ b/tests/abacus.md.nostress/OUT.autotest/running_md.log @@ -0,0 +1,527 @@ + + WELCOME TO ABACUS + + 'Atomic-orbital Based Ab-initio Computation at UStc' + + Website: http://abacus.ustc.edu.cn/ + + Version: Parallel, in development + Processor Number is 1 + Start Time is Thu Jun 9 13:13:06 2022 + + ------------------------------------------------------------------------------------ + + READING GENERAL INFORMATION + global_out_dir = OUT.autotest/ + global_in_card = INPUT + pseudo_dir = + orbital_dir = + pseudo_type = auto + DRANK = 1 + DSIZE = 1 + 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 = 1 + atom label for species 1 = Si + lattice constant (Bohr) = 10.2 + lattice constant (Angstrom) = 5.39761 + + READING ATOM TYPE 1 + atom label = Si + L=0, number of zeta = 1 + L=1, number of zeta = 1 + L=2, number of zeta = 1 + number of atom for this type = 2 + start magnetization = FALSE + start magnetization = FALSE + + TOTAL ATOM NUMBER = 2 + + CARTESIAN COORDINATES ( UNIT = 10.2 Bohr ). + atom x y z mag vx vy vz + tauc_Si1 0 0 0 0 -0 0 0 + tauc_Si2 0.241 0.255 0.250999999999 0 0 -0 -0 + + + Volume (Bohr^3) = 265.302 + Volume (A^3) = 39.3136533177 + + Lattice vectors: (Cartesian coordinate: in unit of a_0) + +0.5 +0.5 +0 + +0.5 +0 +0.5 + +0 +0.5 +0.5 + Reciprocal vectors: (Cartesian coordinate: in unit of 2 pi/a_0) + +1 +1 -1 + +1 -1 +1 + -1 +1 +1 + + + + + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + | | + | 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 ../tools/PP_ORB/Si_ONCV_PBE-1.0.upf + pseudopotential type = NC + exchange-correlation functional = PBE + 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 = 18 + + + + + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + | | + | Setup plane waves of charge/potential: | + | 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. The number of plane waves | + | is 'npw' in each processor. | + <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + + + + + + SETUP THE PLANE WAVE BASIS + energy cutoff for charge/potential (unit:Ry) = 80 + use input fft dimensions for wave functions. + [fft grid for charge/potential] = 24, 24, 24 + [fft grid division] = 1, 1, 1 + [big fft grid for charge/potential] = 24, 24, 24 + nbxx = 13824 + nrxx = 13824 + + SETUP PLANE WAVES FOR CHARGE/POTENTIAL + number of plane waves = 3143 + number of sticks = 283 + + PARALLEL PW FOR CHARGE/POTENTIAL + PROC COLUMNS(POT) PW + 1 283 3143 + --------------- sum ------------------- + 1 283 3143 + number of |g| = 72 + max |g| = 208 + min |g| = 0 + + SETUP THE ELECTRONS NUMBER + electron number of element Si = 4 + total electron number of element Si = 8 + occupied bands = 4 + NBANDS = 8 + DONE : SETUP UNITCELL Time : 0.0560910534114 (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 = 8 + + KPOINTS DIRECT_X DIRECT_Y DIRECT_Z WEIGHT + 1 0 0 0 0.125 + 2 0.5 0 0 0.125 + 3 0 0.5 0 0.125 + 4 0.5 0.5 0 0.125 + 5 0 0 0.5 0.125 + 6 0.5 0 0.5 0.125 + 7 0 0.5 0.5 0.125 + 8 0.5 0.5 0.5 0.125 + + k-point number in this process = 8 + minimum distributed K point number = 8 + + KPOINTS CARTESIAN_X CARTESIAN_Y CARTESIAN_Z WEIGHT + 1 0 0 0 0.25 + 2 0.5 0.5 -0.5 0.25 + 3 0.5 -0.5 0.5 0.25 + 4 1 0 0 0.25 + 5 -0.5 0.5 0.5 0.25 + 6 0 1 0 0.25 + 7 0 0 1 0.25 + 8 0.5 0.5 0.5 0.25 + + KPOINTS DIRECT_X DIRECT_Y DIRECT_Z WEIGHT + 1 0 0 0 0.25 + 2 0.5 0 0 0.25 + 3 0 0.5 0 0.25 + 4 0.5 0.5 0 0.25 + 5 0 0 0.5 0.25 + 6 0.5 0 0.5 0.25 + 7 0 0.5 0.5 0.25 + 8 0.5 0.5 0.5 0.25 + DONE : INIT K-POINTS Time : 0.0567067414522 (SEC) + + + + + + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + | | + | Setup plane waves of wave functions: | + | 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. The number of plane wave of | + | each k-point is 'npwk[ik]' in each processor | + <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + + + + + + SETUP PLANE WAVES FOR WAVE FUNCTIONS + energy cutoff for wavefunc (unit:Ry) = 20 + [fft grid for wave functions] = 24, 24, 24 + number of plane waves = 609 + number of sticks = 91 + + PARALLEL PW FOR WAVE FUNCTIONS + PROC COLUMNS(POT) PW + 1 91 609 + --------------- sum ------------------- + 1 91 609 + DONE : INIT PLANEWAVE Time : 0.0586343016475 (SEC) + + DONE : INIT CHARGE Time : 0.0770398713648 (SEC) + + npwx = 411 + + SETUP NONLOCAL PSEUDOPOTENTIALS IN PLANE WAVE BASIS + Si 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.0790216308087 (SEC) + + + Init Non-Local PseudoPotential table : + Init Non-Local-Pseudopotential done. + DONE : NON-LOCAL POTENTIAL Time : 0.0908586103469 (SEC) + + init_chg = atomic + DONE : INIT POTENTIAL Time : 0.119327 (SEC) + + + Make real space PAO into reciprocal space. + max mesh points in Pseudopotential = 601 + dq(describe PAO in reciprocal space) = 0.01 + max q = 542 + + number of pseudo atomic orbitals for Si is 0 + DONE : INIT BASIS Time : 0.188532 (SEC) + + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 0 + ------------------------------------------- + + PW ALGORITHM --------------- ION= 1 ELEC= 1-------------------------------- + + Density error is 0.108050977159 + + PW ALGORITHM --------------- ION= 1 ELEC= 2-------------------------------- + + Density error is 0.00433478793135 + + PW ALGORITHM --------------- ION= 1 ELEC= 3-------------------------------- + + Density error is 0.000134739737693 + + PW ALGORITHM --------------- ION= 1 ELEC= 4-------------------------------- + + Density error is 1.46497067882e-05 + + PW ALGORITHM --------------- ION= 1 ELEC= 5-------------------------------- + + Density error is 5.9940961597e-07 + + PW ALGORITHM --------------- ION= 1 ELEC= 6-------------------------------- + + Density error is 4.85331534904e-08 + + PW ALGORITHM --------------- ION= 1 ELEC= 7-------------------------------- + + Density error is 2.82302502273e-09 + + PW ALGORITHM --------------- ION= 1 ELEC= 8-------------------------------- + + Density error is 6.09165139828e-11 + + charge density convergence is achieved + final etot is -211.771846025 eV + + + + ><><><><><><><><><><><><><><><><><><><><><>< + + TOTAL-FORCE (eV/Angstrom) + + ><><><><><><><><><><><><><><><><><><><><><>< + + atom x y z + Si1 -0.88536267 +0.50046739 +0.15023961 + Si2 +0.88536267 -0.50046739 -0.15023961 + + + ------------------------------------------------------------------------------------------------ + Energy Potential Kinetic Temperature + -7.782469 -7.782469 0 0 + ------------------------------------------------------------------------------------------------ + + + LARGEST GRAD (eV/A) : 0.88536273 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 1 + ------------------------------------------- + + PW ALGORITHM --------------- ION=2 ELEC=1 -------------------------------- + Notice: Threshold on eigenvalues was too large. + hsover_error=0.08 > DRHO=9.38864e-06 + Origin diag_ethr = 0.01 + New diag_ethr = 1.17358e-07 + + Density error is 2.53667694344e-06 + + PW ALGORITHM --------------- ION=2 ELEC=2 -------------------------------- + + Density error is 2.28596275709e-07 + + PW ALGORITHM --------------- ION=2 ELEC=3 -------------------------------- + + Density error is 1.09611454258e-09 + + PW ALGORITHM --------------- ION=2 ELEC=4 -------------------------------- + + Density error is 1.16027364188e-10 + + charge density convergence is achieved + final etot is -211.781119663 eV + + + + ><><><><><><><><><><><><><><><><><><><><><>< + + TOTAL-FORCE (eV/Angstrom) + + ><><><><><><><><><><><><><><><><><><><><><>< + + atom x y z + Si1 -0.72880473 +0.40857872 +0.10704247 + Si2 +0.72880473 -0.40857872 -0.10704247 + + + ------------------------------------------------------------------------------------------------ + Energy Potential Kinetic Temperature + -7.7824997 -7.7828098 0.0003100856 65.278113 + ------------------------------------------------------------------------------------------------ + + + LARGEST GRAD (eV/A) : 0.72880478 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 2 + ------------------------------------------- + + PW ALGORITHM --------------- ION=3 ELEC=1 -------------------------------- + Notice: Threshold on eigenvalues was too large. + hsover_error=0.08 > DRHO=5.29133e-05 + Origin diag_ethr = 0.01 + New diag_ethr = 6.61416e-07 + + Density error is 1.76079784755e-05 + + PW ALGORITHM --------------- ION=3 ELEC=2 -------------------------------- + + Density error is 1.54869752683e-06 + + PW ALGORITHM --------------- ION=3 ELEC=3 -------------------------------- + + Density error is 5.21746321277e-09 + + PW ALGORITHM --------------- ION=3 ELEC=4 -------------------------------- + + Density error is 6.06706894933e-10 + + charge density convergence is achieved + final etot is -211.796816626 eV + + + + ><><><><><><><><><><><><><><><><><><><><><>< + + TOTAL-FORCE (eV/Angstrom) + + ><><><><><><><><><><><><><><><><><><><><><>< + + atom x y z + Si1 -0.31603885 +0.17161348 +0.01480266 + Si2 +0.31603885 -0.17161348 -0.01480266 + + + ------------------------------------------------------------------------------------------------ + Energy Potential Kinetic Temperature + -7.7825506 -7.7833867 0.00083609165 176.01103 + ------------------------------------------------------------------------------------------------ + + + LARGEST GRAD (eV/A) : 0.31603887 + + ------------------------------------------- + STEP OF MOLECULAR DYNAMICS : 3 + ------------------------------------------- + + PW ALGORITHM --------------- ION=4 ELEC=1 -------------------------------- + Notice: Threshold on eigenvalues was too large. + hsover_error=0.08 > DRHO=8.44133e-05 + Origin diag_ethr = 0.01 + New diag_ethr = 1.05517e-06 + + Density error is 2.78326201367e-05 + + PW ALGORITHM --------------- ION=4 ELEC=2 -------------------------------- + + Density error is 2.45782918146e-06 + + PW ALGORITHM --------------- ION=4 ELEC=3 -------------------------------- + + Density error is 7.86601506443e-09 + + PW ALGORITHM --------------- ION=4 ELEC=4 -------------------------------- + + Density error is 9.90158000398e-10 + + charge density convergence is achieved + final etot is -211.798755244 eV + + + + ><><><><><><><><><><><><><><><><><><><><><>< + + TOTAL-FORCE (eV/Angstrom) + + ><><><><><><><><><><><><><><><><><><><><><>< + + atom x y z + Si1 +0.20432445 -0.11739811 -0.05295552 + Si2 -0.20432445 +0.11739811 +0.05295552 + + + ------------------------------------------------------------------------------------------------ + Energy Potential Kinetic Temperature + -7.7825562 -7.7834579 0.00090165915 189.81406 + ------------------------------------------------------------------------------------------------ + + + LARGEST GRAD (eV/A) : 0.20432447 + + + -------------------------------------------- + !FINAL_ETOT_IS -211.7987552435292 eV + -------------------------------------------- + + + + + + + |CLASS_NAME---------|NAME---------------|TIME(Sec)-----|CALLS----|AVG------|PER%------- + total 2.7171 17 0.16 1e+02 % + Run_pw plane_wave_line 2.7017 1 2.7 99 % + PW_Basis gathers_scatterp 1.3404 3580 0.00037 49 % + Potential v_of_rho 0.25409 24 0.011 9.4 % + XC_Functional v_xc 0.27163 28 0.0097 10 % + PW_Basis gatherp_scatters 1.3094 3249 0.0004 48 % + Hamilt_PW h_psi 1.7435 5100 0.00034 64 % + Hamilt_PW vloc 1.563 5100 0.00031 58 % + PW_Basis_K recip2real 0.78296 7012 0.00011 29 % + PW_Basis_K real2recip 1.3247 3138 0.00042 49 % + Hamilt_PW vnl 0.14363 5100 2.8e-05 5.3 % + Run_MD_PW md_cells_pw 2.5221 1 2.5 93 % + Run_MD_PW md_ions_pw 2.5221 1 2.5 93 % + FIRE setup 0.94517 1 0.95 35 % + MD_func force_stress 1.5034 2 0.75 55 % + ESolver_KS_PW Run 2.3747 4 0.59 87 % + DiagoCG diag 1.4984 184 0.0081 55 % + DiagoIterAssist diagH_subspace 0.36157 160 0.0023 13 % + MD_func md_force_stress 1.0426 2 0.52 38 % + ---------------------------------------------------------------------------------------- + + CLASS_NAME---------|NAME---------------|MEMORY(MB)-------- + 4.003 + ---------------------------------------------------------- + + Start Time : Thu Jun 9 13:13:06 2022 + Finish Time : Thu Jun 9 13:13:08 2022 + Total Time : 0 h 0 mins 2 secs diff --git a/tests/abacus.md.nostress/STRU b/tests/abacus.md.nostress/STRU new file mode 100644 index 000000000..1533a93a6 --- /dev/null +++ b/tests/abacus.md.nostress/STRU @@ -0,0 +1,19 @@ +ATOMIC_SPECIES +Si 1 ../tools/PP_ORB/Si_ONCV_PBE-1.0.upf + +LATTICE_CONSTANT +10.2 + +LATTICE_VECTORS +0.5 0.5 0 #latvec1 +0.5 0 0.5 #latvec2 +0 0.5 0.5 #latvec3 + +ATOMIC_POSITIONS +Cartesian + +Si #label +0 #magnetism +2 #number of atoms +0 0 0 m 1 1 1 v -0 0 0 +0.241 0.255 0.251 m 1 1 1 v 0 -0 -0 diff --git a/tests/abacus.md.nostress/Si_coord b/tests/abacus.md.nostress/Si_coord new file mode 100644 index 000000000..177fd3690 --- /dev/null +++ b/tests/abacus.md.nostress/Si_coord @@ -0,0 +1,8 @@ +0 0 0 +1.30082342 1.37638993 1.3547995 +5.39333633 2.70121816 2.69952857 +1.30509464 1.37397554 1.3540747 +5.38203128 2.70757383 2.70127671 +1.31639969 1.36761987 1.35232656 +5.36765943 2.71557312 2.70304662 +1.33077154 1.35962058 1.35055665 \ No newline at end of file diff --git a/tests/abacus.md.nostress/Si_force b/tests/abacus.md.nostress/Si_force new file mode 100644 index 000000000..ab4566813 --- /dev/null +++ b/tests/abacus.md.nostress/Si_force @@ -0,0 +1,8 @@ +-0.88536273 0.50046742 0.15023962 +0.88536273 -0.50046742 -0.15023962 +-0.72880478 0.40857875 0.10704248 +0.72880478 -0.40857875 -0.10704248 +-0.31603887 0.17161349 0.01480266 +0.31603887 -0.17161349 -0.01480266 +0.20432447 -0.11739812 -0.05295552 +-0.20432447 0.11739812 0.05295552 \ No newline at end of file diff --git a/tests/test_abacus_md.py b/tests/test_abacus_md.py index 2ed61a994..27fe75c48 100644 --- a/tests/test_abacus_md.py +++ b/tests/test_abacus_md.py @@ -10,74 +10,108 @@ class TestABACUSMD: def test_atom_names(self) : self.assertEqual(self.system_water.data['atom_names'], ['H', 'O']) + self.assertEqual(self.system_Si.data['atom_names'], ['Si']) def test_atom_numbs(self) : self.assertEqual(self.system_water.data['atom_numbs'], [2, 1]) + self.assertEqual(self.system_Si.data['atom_numbs'], [2]) def test_atom_types(self) : ref_type = [0, 0, 1] ref_type = np.array(ref_type) + ref_type2 = np.array([0, 0]) for ii in range(ref_type.shape[0]) : self.assertEqual(self.system_water.data['atom_types'][ii], ref_type[ii]) + for ii in range(ref_type2.shape[0]) : + self.assertEqual(self.system_Si.data['atom_types'][ii], ref_type2[ii]) def test_cell(self) : cell = bohr2ang * 28 * np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) + cell2 = bohr2ang * 5.1 * np.array([[1, 1, 0], [1, 0, 1], [0, 1, 1]]) for idx in range(np.shape(self.system_water.data['cells'])[0]): for ii in range(cell.shape[0]) : for jj in range(cell.shape[1]) : self.assertAlmostEqual(self.system_water.data['cells'][idx][ii][jj], cell[ii][jj]) + for idx in range(np.shape(self.system_Si.data['cells'])[0]): + for ii in range(cell2.shape[0]) : + for jj in range(cell2.shape[1]) : + self.assertAlmostEqual(self.system_Si.data['cells'][idx][ii][jj], cell2[ii][jj]) def test_coord(self) : - fp = open('abacus.md/water_coord') - coord = [] - for ii in fp : - coord.append([float(jj) for jj in ii.split()]) - coord = np.array(coord) - coord = coord.reshape([5, 3, 3]) - for ii in range(coord.shape[0]) : - for jj in range(coord.shape[1]) : - for kk in range(coord.shape[2]): - self.assertAlmostEqual(self.system_water.data['coords'][ii][jj][kk], coord[ii][jj][kk]) - fp.close() + with open('abacus.md/water_coord') as fp: + coord = [] + for ii in fp : + coord.append([float(jj) for jj in ii.split()]) + coord = np.array(coord) + coord = coord.reshape([5, 3, 3]) + for ii in range(coord.shape[0]) : + for jj in range(coord.shape[1]) : + for kk in range(coord.shape[2]): + self.assertAlmostEqual(self.system_water.data['coords'][ii][jj][kk], coord[ii][jj][kk]) + + with open('abacus.md.nostress/Si_coord') as fp2: + coord = [] + for ii in fp2 : + coord.append([float(jj) for jj in ii.split()]) + coord = np.array(coord) + coord = coord.reshape([4, 2, 3]) + for ii in range(coord.shape[0]) : + for jj in range(coord.shape[1]) : + for kk in range(coord.shape[2]): + self.assertAlmostEqual(self.system_Si.data['coords'][ii][jj][kk], coord[ii][jj][kk]) def test_force(self) : - fp = open('abacus.md/water_force') - force = [] - for ii in fp : - force.append([float(jj) for jj in ii.split()]) - force = np.array(force) - force = force.reshape([5, 3, 3]) - for ii in range(force.shape[0]) : - for jj in range(force.shape[1]) : - for kk in range(force.shape[2]): - self.assertAlmostEqual(self.system_water.data['forces'][ii][jj][kk], force[ii][jj][kk]) - fp.close() + with open('abacus.md/water_force') as fp: + force = [] + for ii in fp : + force.append([float(jj) for jj in ii.split()]) + force = np.array(force) + force = force.reshape([5, 3, 3]) + for ii in range(force.shape[0]) : + for jj in range(force.shape[1]) : + for kk in range(force.shape[2]): + self.assertAlmostEqual(self.system_water.data['forces'][ii][jj][kk], force[ii][jj][kk]) + + + with open('abacus.md.nostress/Si_force') as fp2: + force = [] + for ii in fp2 : + force.append([float(jj) for jj in ii.split()]) + force = np.array(force) + force = force.reshape([4, 2, 3]) + for ii in range(force.shape[0]) : + for jj in range(force.shape[1]) : + for kk in range(force.shape[2]): + self.assertAlmostEqual(self.system_Si.data['forces'][ii][jj][kk], force[ii][jj][kk]) + def test_virial(self) : - fp = open('abacus.md/water_virial') - virial = [] - for ii in fp : - virial.append([float(jj) for jj in ii.split()]) - virial = np.array(virial) - virial = virial.reshape([5, 3, 3]) - for ii in range(virial.shape[0]) : - for jj in range(virial.shape[1]) : - for kk in range(virial.shape[2]) : - self.assertAlmostEqual(self.system_water.data['virials'][ii][jj][kk], virial[ii][jj][kk]) - fp.close() + with open('abacus.md/water_virial') as fp: + virial = [] + for ii in fp : + virial.append([float(jj) for jj in ii.split()]) + virial = np.array(virial) + virial = virial.reshape([5, 3, 3]) + for ii in range(virial.shape[0]) : + for jj in range(virial.shape[1]) : + for kk in range(virial.shape[2]) : + self.assertAlmostEqual(self.system_water.data['virials'][ii][jj][kk], virial[ii][jj][kk]) def test_energy(self) : ref_energy = np.array([-466.69285117, -466.69929051, -466.69829826, -466.70364664, -466.6976083]) + ref_energy2 = np.array([-211.77184603, -211.78111966, -211.79681663, -211.79875524]) for ii in range(5): self.assertAlmostEqual(self.system_water.data['energies'][ii], ref_energy[ii]) + for ii in range(4): + self.assertAlmostEqual(self.system_Si.data['energies'][ii], ref_energy2[ii]) class TestABACUSMDLabeledOutput(unittest.TestCase, TestABACUSMD): def setUp(self): - self.system_water = dpdata.LabeledSystem('abacus.md',fmt='abacus/md') - + self.system_water = dpdata.LabeledSystem('abacus.md',fmt='abacus/md') # system with stress + self.system_Si = dpdata.LabeledSystem('abacus.md.nostress',fmt='abacus/md') # system without stress if __name__ == '__main__': unittest.main() \ No newline at end of file From e4919caac3382fc3bf896b1dae77596bcee95dab Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 11 Jun 2022 05:33:13 -0400 Subject: [PATCH 15/18] dpdata driver <--> ase calculator (#302) * add ase calculator * add ASEDriver * add ase_calculator property --- dpdata/ase_calculator.py | 76 ++++++++++++++++++++++++++++++++++++++++ dpdata/driver.py | 10 +++++- dpdata/plugins/ase.py | 41 ++++++++++++++++++++++ tests/test_predict.py | 25 +++++++++++-- 4 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 dpdata/ase_calculator.py diff --git a/dpdata/ase_calculator.py b/dpdata/ase_calculator.py new file mode 100644 index 000000000..df89d05cb --- /dev/null +++ b/dpdata/ase_calculator.py @@ -0,0 +1,76 @@ +from typing import List, Optional, TYPE_CHECKING + +from ase.calculators.calculator import ( + Calculator, all_changes, PropertyNotImplementedError +) + +import dpdata +from .driver import Driver + +if TYPE_CHECKING: + from ase import Atoms + + +class DPDataCalculator(Calculator): + """Implementation of ASE deepmd calculator based on a driver. + + Parameters + ---------- + driver : Driver + dpdata driver + """ + + name = "dpdata" + implemented_properties = [ + "energy", "free_energy", "forces", "virial", "stress"] + + def __init__( + self, + driver: Driver, + **kwargs + ) -> None: + Calculator.__init__(self, label=Driver.__name__, **kwargs) + self.driver = driver + + def calculate( + self, + atoms: Optional["Atoms"] = None, + properties: List[str] = ["energy", "forces"], + system_changes: List[str] = all_changes, + ): + """Run calculation with a driver. + + Parameters + ---------- + atoms : Optional[Atoms], optional + atoms object to run the calculation on, by default None + properties : List[str], optional + unused, only for function signature compatibility, + by default ["energy", "forces"] + system_changes : List[str], optional + unused, only for function signature compatibility, by default all_changes + """ + if atoms is not None: + self.atoms = atoms.copy() + + system = dpdata.System(self.atoms, fmt="ase/structure") + data = system.predict(driver=self.driver).data + + self.results['energy'] = data['energies'][0] + # see https://gitlab.com/ase/ase/-/merge_requests/2485 + self.results['free_energy'] = data['energies'][0] + self.results['forces'] = data['forces'][0] + if 'virials' in data: + self.results['virial'] = data['virials'][0].reshape(3, 3) + + # convert virial into stress for lattice relaxation + if "stress" in properties: + if sum(atoms.get_pbc()) > 0: + # the usual convention (tensile stress is positive) + # stress = -virial / volume + stress = -0.5 * (data['virials'][0].copy() + data['virials'][0].copy().T) / \ + atoms.get_volume() + # Voigt notation + self.results['stress'] = stress.flat[[0, 4, 8, 5, 2, 1]] + else: + raise PropertyNotImplementedError diff --git a/dpdata/driver.py b/dpdata/driver.py index 29ae2703f..97583a101 100644 --- a/dpdata/driver.py +++ b/dpdata/driver.py @@ -1,8 +1,10 @@ """Driver plugin system.""" -from typing import Callable, List, Union +from typing import Callable, List, Union, TYPE_CHECKING from .plugin import Plugin from abc import ABC, abstractmethod +if TYPE_CHECKING: + import ase class Driver(ABC): """The base class for a driver plugin. A driver can @@ -79,6 +81,12 @@ def label(self, data: dict) -> dict: """ return NotImplemented + @property + def ase_calculator(self) -> "ase.calculators.calculator.Calculator": + """Returns an ase calculator based on this driver.""" + from .ase_calculator import DPDataCalculator + return DPDataCalculator(self) + @Driver.register("hybrid") class HybridDriver(Driver): diff --git a/dpdata/plugins/ase.py b/dpdata/plugins/ase.py index 5f9dff077..f1745b472 100644 --- a/dpdata/plugins/ase.py +++ b/dpdata/plugins/ase.py @@ -1,5 +1,7 @@ +from dpdata.driver import Driver from dpdata.format import Format import numpy as np +import dpdata try: import ase.io from ase.calculators.calculator import PropertyNotImplementedError @@ -162,3 +164,42 @@ def to_labeled_system(self, data, *args, **kwargs): structures.append(structure) return structures + + +@Driver.register("ase") +class ASEDriver(Driver): + """ASE Driver. + + Parameters + ---------- + calculator : ase.calculators.calculator.Calculato + ASE calculator + """ + + def __init__(self, calculator: "ase.calculators.calculator.Calculator") -> None: + """Setup the driver.""" + self.calculator = calculator + + def label(self, data: dict) -> dict: + """Label a system data. Returns new data with energy, forces, and virials. + + Parameters + ---------- + data : dict + data with coordinates and atom types + + Returns + ------- + dict + labeled data with energies and forces + """ + # convert data to ase data + system = dpdata.System(data=data) + # list[Atoms] + structures = system.to_ase_structure() + labeled_system = dpdata.LabeledSystem() + for atoms in structures: + atoms.calc = self.calculator + ls = dpdata.LabeledSystem(atoms, fmt="ase/structure", type_map=data['atom_names']) + labeled_system.append(ls) + return labeled_system.data diff --git a/tests/test_predict.py b/tests/test_predict.py index c5fe5d76c..8535d02ea 100644 --- a/tests/test_predict.py +++ b/tests/test_predict.py @@ -1,8 +1,14 @@ import unittest import numpy as np -from comp_sys import CompLabeledSys +from comp_sys import CompLabeledSys, IsPBC from context import dpdata +try: + import ase +except ModuleNotFoundError: + skip_ase = True +else: + skip_ase = False @dpdata.driver.Driver.register("zero") @@ -17,7 +23,7 @@ def label(self, data): @dpdata.driver.Driver.register("one") -class ZeroDriver(dpdata.driver.Driver): +class OneDriver(dpdata.driver.Driver): def label(self, data): nframes = data['coords'].shape[0] natoms = data['coords'].shape[1] @@ -69,3 +75,18 @@ def setUp(self) : self.e_places = 6 self.f_places = 6 self.v_places = 6 + + +@unittest.skipIf(skip_ase,"skip ase related test. install ase to fix") +class TestASEtraj1(unittest.TestCase, CompLabeledSys, IsPBC): + def setUp (self) : + ori_sys = dpdata.LabeledSystem('poscars/deepmd.h2o.md', + fmt = 'deepmd/raw', + type_map = ['O', 'H']) + one_driver = OneDriver() + self.system_1 = ori_sys.predict(driver=one_driver) + self.system_2 = ori_sys.predict(one_driver.ase_calculator, driver="ase") + self.places = 6 + self.e_places = 6 + self.f_places = 6 + self.v_places = 4 From b70e3e058cbea629ad270f8ea1033a5a4cfd7e03 Mon Sep 17 00:00:00 2001 From: Liu Renxi <75369672+Liu-RX@users.noreply.github.com> Date: Mon, 13 Jun 2022 09:29:40 +0800 Subject: [PATCH 16/18] Add unlabeled abacus STRU read/dump interface (#303) * adapt abacus/md interface to MD output without stress calculation. * add unit test for abacus md without stress output. * Add files via upload * add unlabeled read and dump interface for ABACUS STRU format. * add assertion failed reason for abacus/md interface * fix open file method * fix typo; introduce np.testing in abacus tests. * remove useless if clause Co-authored-by: LiuRenxi --- dpdata/abacus/scf.py | 100 ++++++++++++++++++++++++++++++++- dpdata/plugins/abacus.py | 33 +++++++++++ tests/abacus.scf/stru_test | 32 +++++++++++ tests/test_abacus_md.py | 39 +++---------- tests/test_abacus_pw_scf.py | 63 +++++++++------------ tests/test_abacus_stru_dump.py | 22 ++++++++ 6 files changed, 221 insertions(+), 68 deletions(-) create mode 100644 tests/abacus.scf/stru_test create mode 100644 tests/test_abacus_stru_dump.py diff --git a/dpdata/abacus/scf.py b/dpdata/abacus/scf.py index f167c249e..ee5208820 100644 --- a/dpdata/abacus/scf.py +++ b/dpdata/abacus/scf.py @@ -1,7 +1,7 @@ import os,sys import numpy as np from ..unit import EnergyConversion, PressureConversion, LengthConversion - +import re bohr2ang = LengthConversion("bohr", "angstrom").value() ry2ev = EnergyConversion("rydberg", "eV").value() kbar2evperang3 = PressureConversion("kbar", "eV/angstrom^3").value() @@ -16,10 +16,10 @@ def get_block (lines, keyword, skip = 0, nlines = None): found = True blk_idx = idx + 1 + skip line_idx = 0 - while len(lines[blk_idx].split("\s+")) == 0: + while len(re.split("\s+", lines[blk_idx])) == 0: blk_idx += 1 while line_idx < nlines and blk_idx != len(lines): - if len(lines[blk_idx].split("\s+")) == 0 or lines[blk_idx] == "": + if len(re.split("\s+", lines[blk_idx])) == 0 or lines[blk_idx] == "": blk_idx+=1 continue ret.append(lines[blk_idx]) @@ -184,6 +184,100 @@ def get_frame (fname): # print("virial = ", data['virials']) return data +def get_nele_from_stru(geometry_inlines): + key_words_list = ["ATOMIC_SPECIES", "NUMERICAL_ORBITAL", "LATTICE_CONSTANT", "LATTICE_VECTORS", "ATOMIC_POSITIONS", "NUMERICAL_DESCRIPTOR"] + keyword_sequence = [] + keyword_line_index = [] + atom_names = [] + atom_numbs = [] + for iline, line in enumerate(geometry_inlines): + if line.split() == []: + continue + have_key_word = False + for keyword in key_words_list: + if keyword in line and keyword == line.split()[0]: + keyword_sequence.append(keyword) + keyword_line_index.append(iline) + assert(len(keyword_line_index) == len(keyword_sequence)) + assert(len(keyword_sequence) > 0) + keyword_line_index.append(len(geometry_inlines)) + + nele = 0 + for idx, keyword in enumerate(keyword_sequence): + if keyword == "ATOMIC_SPECIES": + for iline in range(keyword_line_index[idx]+1, keyword_line_index[idx+1]): + if len(re.split("\s+", geometry_inlines[iline])) >= 3: + nele += 1 + return nele + +def get_frame_from_stru(fname): + assert(type(fname) == str) + with open(fname, 'r') as fp: + geometry_inlines = fp.read().split('\n') + nele = get_nele_from_stru(geometry_inlines) + inlines = ["ntype %d" %nele] + celldm, cell = get_cell(geometry_inlines) + atom_names, natoms, types, coords = get_coords(celldm, cell, geometry_inlines, inlines) + data = {} + data['atom_names'] = atom_names + data['atom_numbs'] = natoms + data['atom_types'] = types + data['cells'] = cell[np.newaxis, :, :] + data['coords'] = coords[np.newaxis, :, :] + data['orig'] = np.zeros(3) + + return data + +def make_unlabeled_stru(data, frame_idx, pp_file=None, numerical_orbital=None, numerical_descriptor=None, mass=None): + out = "ATOMIC_SPECIES\n" + for iele in range(len(data['atom_names'])): + out += data['atom_names'][iele] + " " + if mass is not None: + out += "%d "%mass[iele] + else: + out += "1 " + if pp_file is not None: + out += "%s\n"%pp_file[iele] + else: + out += "\n" + out += "\n" + + if numerical_orbital is not None: + assert(len(numerical_orbital) == len(data['atom_names'])) + out += "NUMERICAL_ORBITAL\n" + for iele in range(len(numerical_orbital)): + out += "%s\n"%numerical_orbital[iele] + out += "\n" + + if numerical_descriptor is not None: + assert(type(numerical_descriptor) == str) + out += "NUMERICAL_DESCRIPTOR\n%s\n"%numerical_descriptor + out += "\n" + + out += "LATTICE_CONSTANT\n" + out += str(1/bohr2ang) + "\n\n" + + out += "LATTICE_VECTORS\n" + for ix in range(3): + for iy in range(3): + out += str(data['cells'][frame_idx][ix][iy]) + " " + out += "\n" + out += "\n" + + out += "ATOMIC_POSITIONS\n" + out += "Cartesian # Cartesian(Unit is LATTICE_CONSTANT)\n" + #ret += "\n" + natom_tot = 0 + for iele in range(len(data['atom_names'])): + out += data['atom_names'][iele] + "\n" + out += "0.0\n" + out += str(data['atom_numbs'][iele]) + "\n" + for iatom in range(data['atom_numbs'][iele]): + out += "%.12f %.12f %.12f %d %d %d\n" % (data['coords'][frame_idx][natom_tot, 0], data['coords'][frame_idx][natom_tot, 1], data['coords'][frame_idx][natom_tot, 2], 1, 1, 1) + natom_tot += 1 + assert(natom_tot == sum(data['atom_numbs'])) + return out + #if __name__ == "__main__": # path = "/home/lrx/work/12_ABACUS_dpgen_interface/dpdata/dpdata/tests/abacus.scf" # data = get_frame(path) \ No newline at end of file diff --git a/dpdata/plugins/abacus.py b/dpdata/plugins/abacus.py index aec05a7db..e4e1c291e 100644 --- a/dpdata/plugins/abacus.py +++ b/dpdata/plugins/abacus.py @@ -2,6 +2,39 @@ import dpdata.abacus.md from dpdata.format import Format +@Format.register("abacus/stru") +@Format.register("stru") +class AbacusSTRUFormat(Format): + def from_system(self, file_name, **kwargs): + return dpdata.abacus.scf.get_frame_from_stru(file_name) + + def to_system(self, data, file_name, frame_idx=0, **kwargs): + """ + Dump the system into ABACUS STRU format file. + + Parameters + ---------- + file_name : str + The output file name + frame_idx : int + The index of the frame to dump + pp_file: list of string, optional + List of pseudo potential files + numerical_orbital: list of string, optional + List of orbital files + mass: list of float, optional + List of atomic masses + numerical_descriptor: str, optional + numerical descriptor file + """ + + pp_file = kwargs.get('pp_file') + numerical_orbital = kwargs.get('numerical_orbital') + mass = kwargs.get('mass') + numerical_descriptor = kwargs.get('numerical_descriptor') + stru_string = dpdata.abacus.scf.make_unlabeled_stru(data=data, frame_idx=frame_idx, pp_file=pp_file, numerical_orbital=numerical_orbital, numerical_descriptor=numerical_descriptor, mass=mass) + with open(file_name, "w") as fp: + fp.write(stru_string) @Format.register("abacus/scf") @Format.register("abacus/pw/scf") diff --git a/tests/abacus.scf/stru_test b/tests/abacus.scf/stru_test new file mode 100644 index 000000000..7e7323a1a --- /dev/null +++ b/tests/abacus.scf/stru_test @@ -0,0 +1,32 @@ +ATOMIC_SPECIES +C 12 C.upf +H 1 H.upf + +NUMERICAL_ORBITAL +C.orb +H.orb + +NUMERICAL_DESCRIPTOR +jle.orb + +LATTICE_CONSTANT +1.8897261246257702 + +LATTICE_VECTORS +5.291772109029999 0.0 0.0 +0.0 5.291772109029999 0.0 +0.0 0.0 5.291772109029999 + +ATOMIC_POSITIONS +Cartesian # Cartesian(Unit is LATTICE_CONSTANT) +C +0.0 +1 +5.192682633809 4.557725978258 4.436846615358 1 1 1 +H +0.0 +4 +5.416431453540 4.011298860305 3.511161492417 1 1 1 +4.131588222365 4.706745191323 4.431136645083 1 1 1 +5.630930319126 5.521640894956 4.450356541303 1 1 1 +5.499851012568 4.003388899277 5.342621842622 1 1 1 diff --git a/tests/test_abacus_md.py b/tests/test_abacus_md.py index 27fe75c48..14607bbaf 100644 --- a/tests/test_abacus_md.py +++ b/tests/test_abacus_md.py @@ -29,13 +29,9 @@ def test_cell(self) : cell = bohr2ang * 28 * np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) cell2 = bohr2ang * 5.1 * np.array([[1, 1, 0], [1, 0, 1], [0, 1, 1]]) for idx in range(np.shape(self.system_water.data['cells'])[0]): - for ii in range(cell.shape[0]) : - for jj in range(cell.shape[1]) : - self.assertAlmostEqual(self.system_water.data['cells'][idx][ii][jj], cell[ii][jj]) + np.testing.assert_almost_equal(cell, self.system_water.data['cells'][idx], decimal = 5) for idx in range(np.shape(self.system_Si.data['cells'])[0]): - for ii in range(cell2.shape[0]) : - for jj in range(cell2.shape[1]) : - self.assertAlmostEqual(self.system_Si.data['cells'][idx][ii][jj], cell2[ii][jj]) + np.testing.assert_almost_equal(self.system_Si.data['cells'][idx], cell2, decimal = 5) def test_coord(self) : with open('abacus.md/water_coord') as fp: @@ -44,10 +40,7 @@ def test_coord(self) : coord.append([float(jj) for jj in ii.split()]) coord = np.array(coord) coord = coord.reshape([5, 3, 3]) - for ii in range(coord.shape[0]) : - for jj in range(coord.shape[1]) : - for kk in range(coord.shape[2]): - self.assertAlmostEqual(self.system_water.data['coords'][ii][jj][kk], coord[ii][jj][kk]) + np.testing.assert_almost_equal(self.system_water.data['coords'], coord, decimal = 5) with open('abacus.md.nostress/Si_coord') as fp2: coord = [] @@ -55,10 +48,7 @@ def test_coord(self) : coord.append([float(jj) for jj in ii.split()]) coord = np.array(coord) coord = coord.reshape([4, 2, 3]) - for ii in range(coord.shape[0]) : - for jj in range(coord.shape[1]) : - for kk in range(coord.shape[2]): - self.assertAlmostEqual(self.system_Si.data['coords'][ii][jj][kk], coord[ii][jj][kk]) + np.testing.assert_almost_equal(self.system_Si.data['coords'], coord, decimal = 5) def test_force(self) : with open('abacus.md/water_force') as fp: @@ -67,10 +57,7 @@ def test_force(self) : force.append([float(jj) for jj in ii.split()]) force = np.array(force) force = force.reshape([5, 3, 3]) - for ii in range(force.shape[0]) : - for jj in range(force.shape[1]) : - for kk in range(force.shape[2]): - self.assertAlmostEqual(self.system_water.data['forces'][ii][jj][kk], force[ii][jj][kk]) + np.testing.assert_almost_equal(self.system_water.data['forces'], force, decimal=5) with open('abacus.md.nostress/Si_force') as fp2: @@ -79,10 +66,7 @@ def test_force(self) : force.append([float(jj) for jj in ii.split()]) force = np.array(force) force = force.reshape([4, 2, 3]) - for ii in range(force.shape[0]) : - for jj in range(force.shape[1]) : - for kk in range(force.shape[2]): - self.assertAlmostEqual(self.system_Si.data['forces'][ii][jj][kk], force[ii][jj][kk]) + np.testing.assert_almost_equal(self.system_Si.data['forces'], force, decimal=5) def test_virial(self) : @@ -92,19 +76,14 @@ def test_virial(self) : virial.append([float(jj) for jj in ii.split()]) virial = np.array(virial) virial = virial.reshape([5, 3, 3]) - for ii in range(virial.shape[0]) : - for jj in range(virial.shape[1]) : - for kk in range(virial.shape[2]) : - self.assertAlmostEqual(self.system_water.data['virials'][ii][jj][kk], virial[ii][jj][kk]) + np.testing.assert_almost_equal(self.system_water.data['virials'], virial, decimal=5) def test_energy(self) : ref_energy = np.array([-466.69285117, -466.69929051, -466.69829826, -466.70364664, -466.6976083]) ref_energy2 = np.array([-211.77184603, -211.78111966, -211.79681663, -211.79875524]) - for ii in range(5): - self.assertAlmostEqual(self.system_water.data['energies'][ii], ref_energy[ii]) - for ii in range(4): - self.assertAlmostEqual(self.system_Si.data['energies'][ii], ref_energy2[ii]) + np.testing.assert_almost_equal(self.system_water.data['energies'], ref_energy) + np.testing.assert_almost_equal(self.system_Si.data['energies'], ref_energy2) class TestABACUSMDLabeledOutput(unittest.TestCase, TestABACUSMD): diff --git a/tests/test_abacus_pw_scf.py b/tests/test_abacus_pw_scf.py index 3813943f2..3a2da17f1 100644 --- a/tests/test_abacus_pw_scf.py +++ b/tests/test_abacus_pw_scf.py @@ -11,17 +11,17 @@ class TestABACUSSinglePointEnergy: def test_atom_names(self) : self.assertEqual(self.system_ch4.data['atom_names'], ['C', 'H']) #self.assertEqual(self.system_h2o.data['atom_names'], ['O','H']) - + self.assertEqual(self.system_ch4_unlabeled.data['atom_names'], ['C', 'H']) def test_atom_numbs(self) : self.assertEqual(self.system_ch4.data['atom_numbs'], [1, 4]) #self.assertEqual(self.system_h2o.data['atom_numbs'], [64,128]) - + self.assertEqual(self.system_ch4_unlabeled.data['atom_numbs'], [1, 4]) def test_atom_types(self) : ref_type = [0,1,1,1,1] ref_type = np.array(ref_type) for ii in range(ref_type.shape[0]) : self.assertEqual(self.system_ch4.data['atom_types'][ii], ref_type[ii]) - + self.assertEqual(self.system_ch4_unlabeled['atom_types'][ii], ref_type[ii]) # ref_type = [0]*64 + [1]*128 # ref_type = np.array(ref_type) # for ii in range(ref_type.shape[0]) : @@ -30,10 +30,8 @@ def test_atom_types(self) : def test_cell(self) : # cell = 5.29177 * np.eye(3) cell = bohr2ang * 10 * np.eye(3) - for ii in range(cell.shape[0]) : - for jj in range(cell.shape[1]) : - self.assertAlmostEqual(self.system_ch4.data['cells'][0][ii][jj], cell[ii][jj]) - + np.testing.assert_almost_equal(self.system_ch4.data['cells'][0], cell) + np.testing.assert_almost_equal(self.system_ch4_unlabeled.data['cells'][0], cell) # fp = open('qe.scf/h2o_cell') # cell = [] # for ii in fp : @@ -46,15 +44,14 @@ def test_cell(self) : def test_coord(self) : - fp = open('abacus.scf/ch4_coord') - coord = [] - for ii in fp : - coord.append([float(jj) for jj in ii.split()]) - coord = np.array(coord) - for ii in range(coord.shape[0]) : - for jj in range(coord.shape[1]) : - self.assertAlmostEqual(self.system_ch4.data['coords'][0][ii][jj], coord[ii][jj], places=5) - fp.close() + with open('abacus.scf/ch4_coord') as fp: + coord = [] + for ii in fp : + coord.append([float(jj) for jj in ii.split()]) + coord = np.array(coord) + np.testing.assert_almost_equal(self.system_ch4.data['coords'][0], coord, decimal=5) + np.testing.assert_almost_equal(self.system_ch4_unlabeled.data['coords'][0], coord, decimal=5) + # fp = open('qe.scf/h2o_coord') # coord = [] @@ -67,15 +64,13 @@ def test_coord(self) : # fp.close() def test_force(self) : - fp = open('abacus.scf/ch4_force') - force = [] - for ii in fp : - force.append([float(jj) for jj in ii.split()]) - force = np.array(force) - for ii in range(force.shape[0]) : - for jj in range(force.shape[1]) : - self.assertAlmostEqual(self.system_ch4.data['forces'][0][ii][jj], force[ii][jj]) - fp.close() + with open('abacus.scf/ch4_force') as fp: + force = [] + for ii in fp : + force.append([float(jj) for jj in ii.split()]) + force = np.array(force) + np.testing.assert_almost_equal(self.system_ch4.data['forces'][0], force) + # fp = open('qe.scf/h2o_force') # force = [] @@ -88,15 +83,13 @@ def test_force(self) : # fp.close() def test_virial(self) : - fp = open('abacus.scf/ch4_virial') - virial = [] - for ii in fp : - virial.append([float(jj) for jj in ii.split()]) - virial = np.array(virial) - for ii in range(virial.shape[0]) : - for jj in range(virial.shape[1]) : - self.assertAlmostEqual(self.system_ch4.data['virials'][0][ii][jj], virial[ii][jj], places = 3) - fp.close() + with open('abacus.scf/ch4_virial') as fp: + virial = [] + for ii in fp : + virial.append([float(jj) for jj in ii.split()]) + virial = np.array(virial) + np.testing.assert_almost_equal(self.system_ch4.data['virials'][0], virial, decimal = 3) + # fp = open('qe.scf/h2o_virial') # virial = [] @@ -121,7 +114,7 @@ class TestABACUSLabeledOutput(unittest.TestCase, TestABACUSSinglePointEnergy): def setUp(self): self.system_ch4 = dpdata.LabeledSystem('abacus.scf',fmt='abacus/scf') # self.system_h2o = dpdata.LabeledSystem('qe.scf/02.out',fmt='qe/pw/scf') - + self.system_ch4_unlabeled = dpdata.System('abacus.scf/STRU.ch4', fmt='abacus/stru') if __name__ == '__main__': unittest.main() diff --git a/tests/test_abacus_stru_dump.py b/tests/test_abacus_stru_dump.py new file mode 100644 index 000000000..20922cbf7 --- /dev/null +++ b/tests/test_abacus_stru_dump.py @@ -0,0 +1,22 @@ +import os +import numpy as np +import unittest +from context import dpdata +from test_vasp_poscar_dump import myfilecmp + + +class TestStruDump(unittest.TestCase): + def setUp(self): + self.system_ch4 = dpdata.System("abacus.scf/STRU.ch4", fmt="stru") + + def test_dump_stru(self): + self.system_ch4.to("stru", "STRU_tmp", mass = [12, 1], pp_file = ["C.upf", "H.upf"], numerical_orbital = ["C.orb", "H.orb"], numerical_descriptor = "jle.orb") + myfilecmp(self, "abacus.scf/stru_test", "STRU_tmp") + + def tearDown(self): + if os.path.isfile('STRU_tmp'): + os.remove('STRU_tmp') + +if __name__ == '__main__': + unittest.main() + \ No newline at end of file From c1ab7d05fad4c4d62436fb4033e0736e099ea857 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 14 Jun 2022 02:11:51 -0400 Subject: [PATCH 17/18] support reading xyz files (#306) --- dpdata/plugins/xyz.py | 18 ++++++++++++++++-- dpdata/xyz/xyz.py | 31 +++++++++++++++++++++++++++++++ tests/test_xyz.py | 21 ++++++++++++++++++++- 3 files changed, 67 insertions(+), 3 deletions(-) diff --git a/dpdata/plugins/xyz.py b/dpdata/plugins/xyz.py index 5e2534a87..7ec9d2665 100644 --- a/dpdata/plugins/xyz.py +++ b/dpdata/plugins/xyz.py @@ -1,7 +1,7 @@ import numpy as np from dpdata.xyz.quip_gap_xyz import QuipGapxyzSystems -from dpdata.xyz.xyz import coord_to_xyz +from dpdata.xyz.xyz import coord_to_xyz, xyz_to_coord from dpdata.format import Format @Format.register("xyz") @@ -20,6 +20,20 @@ def to_system(self, data, file_name, **kwargs): with open(file_name, 'w') as fp: fp.write("\n".join(buff)) + def from_system(self, file_name, **kwargs): + with open(file_name, 'r') as fp: + coords, types = xyz_to_coord(fp.read()) + atom_names, atom_types, atom_numbs = np.unique(types, return_inverse=True, return_counts=True) + return { + 'atom_names': list(atom_names), + 'atom_numbs': list(atom_numbs), + 'atom_types': atom_types, + 'coords': coords.reshape((1, *coords.shape)), + 'cells': np.eye(3).reshape((1, 3, 3)) * 100, + 'nopbc': True, + 'orig': np.zeros(3), + } + @Format.register("quip/gap/xyz") @Format.register("quip/gap/xyz_file") @@ -29,4 +43,4 @@ def from_labeled_system(self, data, **kwargs): def from_multi_systems(self, file_name, **kwargs): # here directory is the file_name - return QuipGapxyzSystems(file_name) \ No newline at end of file + return QuipGapxyzSystems(file_name) diff --git a/dpdata/xyz/xyz.py b/dpdata/xyz/xyz.py index 0bf1b6141..0ca5ac311 100644 --- a/dpdata/xyz/xyz.py +++ b/dpdata/xyz/xyz.py @@ -1,3 +1,5 @@ +from typing import Tuple + import numpy as np def coord_to_xyz(coord: np.ndarray, types: list)->str: @@ -26,3 +28,32 @@ def coord_to_xyz(coord: np.ndarray, types: list)->str: for at, cc in zip(types, coord): buff.append("{} {:.6f} {:.6f} {:.6f}".format(at, *cc)) return "\n".join(buff) + + +def xyz_to_coord(xyz: str) -> Tuple[np.ndarray, list]: + """Convert xyz format to coordinates and types. + + Parameters + ---------- + xyz : str + xyz format string + + Returns + ------- + coords : np.ndarray + coordinates, Nx3 array + types : list + list of types + """ + symbols = [] + coords = [] + for ii, line in enumerate(xyz.split('\n')): + if ii == 0: + natoms = int(line.strip()) + elif 2 <= ii <= 1 + natoms: + # symbol x y z + symbol, x, y, z = line.split() + coords.append((float(x), float(y), float(z))) + symbols.append(symbol) + return np.array(coords), symbols + diff --git a/tests/test_xyz.py b/tests/test_xyz.py index 23bb3a81d..7d9649f94 100644 --- a/tests/test_xyz.py +++ b/tests/test_xyz.py @@ -2,8 +2,9 @@ import numpy as np import tempfile from context import dpdata +from comp_sys import CompSys, IsNoPBC -class TestXYZ(unittest.TestCase): +class TestToXYZ(unittest.TestCase): def test_to_xyz(self): with tempfile.NamedTemporaryFile('r') as f_xyz: dpdata.System(data={ @@ -17,3 +18,21 @@ def test_to_xyz(self): xyz0 = f_xyz.read().strip() xyz1 = "2\n\nC 0.000000 1.000000 2.000000\nO 3.000000 4.000000 5.000000" self.assertEqual(xyz0, xyz1) + + +class TestFromXYZ(unittest.TestCase, CompSys, IsNoPBC): + def setUp(self): + self.places = 6 + # considering to_xyz has been tested.. + self.system_1 = dpdata.System(data={ + "atom_names": ["C", "O"], + "atom_numbs": [1, 1], + "atom_types": np.array([0, 1]), + "coords": np.arange(6).reshape((1,2,3)), + "cells": np.zeros((1,3,3)), + "orig": np.zeros(3), + "nopbc": True, + }) + with tempfile.NamedTemporaryFile('r') as f_xyz: + self.system_1.to("xyz", f_xyz.name) + self.system_2 = dpdata.System(f_xyz.name, fmt="xyz") From 0c67440d695e08b1ad39f107a2d8780827a87fc8 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 14 Jun 2022 02:16:36 -0400 Subject: [PATCH 18/18] fix docs in #286 (#308) fix a small typo in docs --- dpdata/plugins/amber.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dpdata/plugins/amber.py b/dpdata/plugins/amber.py index d2a13c5bf..f9580f2fd 100644 --- a/dpdata/plugins/amber.py +++ b/dpdata/plugins/amber.py @@ -68,7 +68,7 @@ def to_system(self, data, fname=None, frame_idx=0, **kwargs): ---------------- **kwargs : dict valid parameters are: - theory : str, default=dftb3 + qm_theory : str, default=dftb3 level of theory. Options includes AM1, RM1, MNDO, PM3-PDDG, MNDO-PDDG, PM3-CARB1, MNDO/d, AM1/d, PM6, DFTB2, DFTB3 charge : int, default=0 @@ -96,6 +96,7 @@ class SQMDriver(Driver): Examples -------- Use DFTB3 method to calculate potential energy: + >>> labeled_system = system.predict(theory="DFTB3", driver="sqm") >>> labeled_system['energies'][0] -15.41111246