diff --git a/aiida_quantumespresso/calculations/__init__.py b/aiida_quantumespresso/calculations/__init__.py index afde0813a..af05bc1dc 100644 --- a/aiida_quantumespresso/calculations/__init__.py +++ b/aiida_quantumespresso/calculations/__init__.py @@ -238,6 +238,11 @@ def prepare_for_submission(self, folder): if environ_namelist is not None: if not isinstance(environ_namelist, dict): raise exceptions.InputValidationError('ENVIRON namelist should be specified as a dictionary') + + ## Check for BOUNDARY and ELECTROSTATIC Keys as well + boundary_namelist = settings.pop('BOUNDARY', None) + electrostatic_namelist = settings.pop('ELECTROSTATIC', None) + # We first add the environ flag to the command-line options (if not already present) try: if '-environ' not in settings['CMDLINE']: @@ -255,6 +260,18 @@ def prepare_for_submission(self, folder): handle.write(convert_input_to_namelist_entry(key, value, mapping=mapping_species)) handle.write('/\n') + if boundary_namelist is not None: + handle.write('&BOUNDARY\n') + for key, value in sorted(boundary_namelist.items()): + handle.write(convert_input_to_namelist_entry(key, value, mapping=mapping_species)) + handle.write('/\n') + + if electrostatic_namelist is not None: + handle.write('&ELECTROSTATIC\n') + for key, value in sorted(electrostatic_namelist.items()): + handle.write(convert_input_to_namelist_entry(key, value, mapping=mapping_species)) + handle.write('/\n') + # Check for the deprecated 'ALSO_BANDS' setting and if present fire a deprecation log message also_bands = settings.pop('ALSO_BANDS', None) if also_bands: diff --git a/aiida_quantumespresso/parsers/parse_raw/pw.py b/aiida_quantumespresso/parsers/parse_raw/pw.py index ecce12743..f36abfa4f 100644 --- a/aiida_quantumespresso/parsers/parse_raw/pw.py +++ b/aiida_quantumespresso/parsers/parse_raw/pw.py @@ -267,7 +267,7 @@ def detect_important_message(logs, line): logs.warning.append(message) -def parse_stdout(stdout, input_parameters, parser_options=None, parsed_xml=None): +def parse_stdout(stdout, input_parameters, parser_options=None, parsed_xml=None, settings={}): """Parses the stdout content of a Quantum ESPRESSO `pw.x` calculation. :param stdout: the stdout content as a string @@ -306,6 +306,9 @@ def parse_stdout(stdout, input_parameters, parser_options=None, parsed_xml=None) # Determine whether the input switched on an electric field lelfield = input_parameters.get('CONTROL', {}).get('lelfield', False) + # Determine if an ENVIRON calculation run + is_environ = 'ENVIRON' in settings + # Find some useful quantities. if not parsed_xml.get('number_of_bands', None): try: @@ -743,6 +746,15 @@ def parse_stdout(stdout, input_parameters, parser_options=None, parsed_xml=None) parsed_data['fermi_energy' + units_suffix] = default_energy_units except Exception: logs.warning.append('Error while parsing Fermi energy from the output file.') + elif is_environ and 'Gaussian-smeared nuclei' in line: + try: + value_potential_shift = float(line.split()[-2]) + unit_potential_shift = line.split()[-1] + parsed_data['environ_potential_shift'] = value_potential_shift + parsed_data['environ_unit_potential_shift'] = unit_potential_shift + except Exception: + logs.warning.append('Not an Environ calculation with an open boundary condition.') + pass elif 'Forces acting on atoms' in line: try: diff --git a/aiida_quantumespresso/parsers/pw.py b/aiida_quantumespresso/parsers/pw.py index bf31a91f5..f5a0c103f 100644 --- a/aiida_quantumespresso/parsers/pw.py +++ b/aiida_quantumespresso/parsers/pw.py @@ -44,7 +44,7 @@ def parse(self, **kwargs): parameters = self.node.inputs.parameters.get_dict() parsed_xml, logs_xml = self.parse_xml(dir_with_bands, parser_options) - parsed_stdout, logs_stdout = self.parse_stdout(parameters, parser_options, parsed_xml) + parsed_stdout, logs_stdout = self.parse_stdout(parameters, parser_options, parsed_xml, settings) parsed_bands = parsed_stdout.pop('bands', {}) parsed_structure = parsed_stdout.pop('structure', {}) @@ -295,7 +295,7 @@ def parse_xml(self, dir_with_bands=None, parser_options=None): return parsed_data, logs - def parse_stdout(self, parameters, parser_options=None, parsed_xml=None): + def parse_stdout(self, parameters, parser_options=None, parsed_xml=None, settings={}): """Parse the stdout output file. :param parameters: the input parameters dictionary @@ -321,7 +321,7 @@ def parse_stdout(self, parameters, parser_options=None, parsed_xml=None): return parsed_data, logs try: - parsed_data, logs = parse_stdout(stdout, parameters, parser_options, parsed_xml) + parsed_data, logs = parse_stdout(stdout, parameters, parser_options, parsed_xml, settings) except Exception: logs.critical.append(traceback.format_exc()) self.exit_code_stdout = self.exit_codes.ERROR_UNEXPECTED_PARSER_EXCEPTION diff --git a/docs/source/user_guide/get_started/examples/environ_calculation.py b/docs/source/user_guide/get_started/examples/environ_calculation.py new file mode 100644 index 000000000..741eb80cf --- /dev/null +++ b/docs/source/user_guide/get_started/examples/environ_calculation.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- + +from aiida import orm +from aiida.engine import run, submit +import numpy as np +from ase import Atoms +from ase import units +""" +Calculation that recreates the environ calculation of +CO on Pt(111) with a unit charge + +More details about the solvation models and potential corrections +can be found here: + +O. Andreussi, I. Dabo and N. Marzari, J. Chem. Phys. 136,064102 (2012). +I. Dabo et al. Phys.Rev. B 77, 115139 (2008) + +This system is taken directly from Example04 in the +examples folder from Environ +""" + + +def runner(code, structure): + + ## Base calculation for testing + PwBaseWorkChain = WorkflowFactory('quantumespresso.pw.base') + builder = PwBaseWorkChain.get_builder() + builder.pw.structure = structure + + builder.metadata.label = 'Single point environ' + builder.metadata.description = 'Testing calculation with environ for Pt(111) + CO' + + KpointsData = DataFactory('array.kpoints') + kpoints = KpointsData() + kpoints.set_kpoints_mesh([1, 1, 1]) # Not physical just a test + builder.kpoints = kpoints + + family = load_group('SSSP/1.1/PBE/efficiency') + builder.pw.pseudos = family.get_pseudos(structure=structure) + + calculation = { + 'CONTROL': { + 'calculation': 'scf', + 'tprnfor': True, + }, + 'SYSTEM': { + 'ecutwfc': 35, + 'ecutrho': 280, + 'occupations': 'smearing', + 'smearing': 'cold', + 'degauss': 0.03, + 'tot_charge': 1, + }, + 'ELECTRONS': { + 'conv_thr': 5e-9, + 'electron_maxstep': 200, + 'mixing_beta': 0.2, + 'mixing_ndim': 15, + 'diagonalization': 'david', + }, + } + + environ_calculation = { + 'ENVIRON': { + 'verbose': 0, + 'environ_thr': 1.0, + 'environ_type': 'input', + 'env_static_permittivity': 1, + 'env_surface_tension': 0.0, + 'env_pressure': 0.0, + 'env_electrostatic': True, + }, + 'BOUNDARY': { + 'solvent_mode': 'full', + }, + 'ELECTROSTATIC': { + 'pbc_correction': 'parabolic', + 'pbc_dim': 2, + 'pbc_axis': 3, + 'tol': 5e-13, + } + } + # these are the main cube files that could potentially be parsed + # if the verbosity is set to 2 or higher + # environ_calculation['additional_retrieve_list'] = ['epsilon.cube', \ + # 'vreference.cube', 'velectrostatic.cube', 'vsoftcavity.cube', \ + # 'electrons.cube', 'charges.cube', 'smeared_ions.cube'] + + builder.pw.parameters = orm.Dict(dict=calculation) + builder.pw.settings = orm.Dict(dict=environ_calculation) + builder.pw.metadata.options.resources = {'num_machines': 1} + builder.pw.metadata.options.max_wallclock_seconds = 5 * 60 + builder.pw.code = code + + calculation = submit(builder) + + +if __name__ == '__main__': + code = load_code('insert-code-here') + + StructureData = DataFactory('structure') + # these are the original coordinates for the Pt-CO system + positions = [ + [5.335084148, 4.646723426, 12.901029877], + [5.335009643, 4.619623254, 15.079854269], + [8.061327071, 0.098057998, 8.992142901], + [2.608989366, 0.098058283, 8.992140585], + [0.000036609, 4.720846294, 8.968756935], + [5.335159557, 4.721612729, 9.380196435], + [0.000041121, 7.802951963, 4.604626508], + [5.335161233, 7.697749113, 4.753489408], + [2.697860636, 3.152173889, 4.688412329], + [7.972463687, 3.152174491, 4.688415209], + ] + + ## setting up the system with ASE + ## notice the units that are being used + atoms = Atoms('COPt8') + atoms.set_positions(np.array(positions) * units.Bohr) + atoms.set_pbc([True, True, True]) + a = 10.6881 * units.Bohr + b = 0.866025 * a * units.Bohr + c = 3.95422 * a * units.Bohr + atoms.set_cell([a, b, c]) + structure = StructureData(ase=atoms) + + runner(code=code, structure=structure) diff --git a/docs/source/user_guide/get_started/examples/pw_tutorial.rst b/docs/source/user_guide/get_started/examples/pw_tutorial.rst index 0568deff3..5f5fe9ec0 100644 --- a/docs/source/user_guide/get_started/examples/pw_tutorial.rst +++ b/docs/source/user_guide/get_started/examples/pw_tutorial.rst @@ -623,6 +623,32 @@ More options are available, and can be explored by expanding ``builder.metadata.options.`` + ``TAB``. +Environ calculations +-------------------- + +Environ calculations can be run by supplying the required namelists to ``builder.settings``. For example, to run a calculation with a continuum dielectric of water above a 2D slab with the surface normal in the z-direction create the following dictionary. + +:: + + environ_param_dict = { + 'ENVIRON':{ + 'environ_type': 'input', + 'env_static_permittivity': 78.36, + 'env_electrostatic': True, + }, + 'BOUNDARY':{ + 'solvent_mode':'full', + }, + 'ELECTROSTATIC':{ + 'pbc_correction':'parabolic', + 'pbc_dim': 2, + 'pbc_axis': 3, + } + } + +This dictionary can be passed on to the builder as :: + + builder.settings = orm.Dict(dict=environ_param_dict) Launching the calculation diff --git a/tests/calculations/test_pw.py b/tests/calculations/test_pw.py index de2a65f98..a607dd109 100644 --- a/tests/calculations/test_pw.py +++ b/tests/calculations/test_pw.py @@ -73,7 +73,7 @@ def test_pw_ibrav( calc_info = generate_calc_job(fixture_sandbox, entry_point_name, inputs) cmdline_params = ['-in', 'aiida.in'] - local_copy_list = [(upf.uuid, upf.filename, u'./pseudo/Si.upf')] + local_copy_list = [(upf.uuid, upf.filename, './pseudo/Si.upf')] retrieve_list = ['aiida.out', './out/aiida.save/data-file-schema.xml', './out/aiida.save/data-file.xml'] retrieve_temporary_list = [['./out/aiida.save/K*[0-9]/eigenval*.xml', '.', 2]] @@ -250,3 +250,36 @@ def test_pw_parallelization_duplicate_cmdline_flag(fixture_sandbox, generate_cal with pytest.raises(InputValidationError) as exc: generate_calc_job(fixture_sandbox, entry_point_name, inputs) assert 'Conflicting' in str(exc.value) + + +def test_environ_namelists(fixture_sandbox, generate_calc_job, generate_inputs_pw, file_regression): + """Test that Environ does not change the contents of the pw file created.""" + entry_point_name = 'quantumespresso.pw' + + inputs = generate_inputs_pw() + inputs['settings'] = orm.Dict( + dict={ + 'ENVIRON': { + 'electrolyte_linearized': True, + 'environ_type': 'input', + }, + 'BOUNDARY': { + 'solvent_mode': 'electronic', + 'electrolyte_mode': 'electronic', + }, + 'ELECTROSTATIC': { + 'pbc_correction': 'parabolic', + } + }, + ) + generate_calc_job(fixture_sandbox, entry_point_name, inputs) + + with fixture_sandbox.open('aiida.in') as handle: + input_written = handle.read() + with fixture_sandbox.open('environ.in') as handle: + environ_written = handle.read() + + # Checks on the files written to the sandbox folder as raw input + assert sorted(fixture_sandbox.get_content_list()) == sorted(['aiida.in', 'pseudo', 'out', 'environ.in']) + file_regression.check(input_written, encoding='utf-8', extension='.aiida.in') + file_regression.check(environ_written, encoding='utf-8', extension='.environ.in') diff --git a/tests/calculations/test_pw/test_environ_namelists.aiida.in b/tests/calculations/test_pw/test_environ_namelists.aiida.in new file mode 100644 index 000000000..ef7e9dd07 --- /dev/null +++ b/tests/calculations/test_pw/test_environ_namelists.aiida.in @@ -0,0 +1,27 @@ +&CONTROL + calculation = 'scf' + outdir = './out/' + prefix = 'aiida' + pseudo_dir = './pseudo/' + verbosity = 'high' +/ +&SYSTEM + ecutrho = 2.4000000000d+02 + ecutwfc = 3.0000000000d+01 + ibrav = 0 + nat = 2 + ntyp = 1 +/ +&ELECTRONS +/ +ATOMIC_SPECIES +Si 28.0855 Si.upf +ATOMIC_POSITIONS angstrom +Si 0.0000000000 0.0000000000 0.0000000000 +Si 1.3575000000 1.3575000000 1.3575000000 +K_POINTS automatic +2 2 2 0 0 0 +CELL_PARAMETERS angstrom + 2.7150000000 2.7150000000 0.0000000000 + 2.7150000000 0.0000000000 2.7150000000 + 0.0000000000 2.7150000000 2.7150000000 diff --git a/tests/calculations/test_pw/test_environ_namelists.environ.in b/tests/calculations/test_pw/test_environ_namelists.environ.in new file mode 100644 index 000000000..be3423489 --- /dev/null +++ b/tests/calculations/test_pw/test_environ_namelists.environ.in @@ -0,0 +1,11 @@ +&ENVIRON + electrolyte_linearized = .true. + environ_type = 'input' +/ +&BOUNDARY + electrolyte_mode = 'electronic' + solvent_mode = 'electronic' +/ +&ELECTROSTATIC + pbc_correction = 'parabolic' +/ diff --git a/tests/conftest.py b/tests/conftest.py index 9c5c6923c..88a59203c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -234,7 +234,7 @@ def _generate_calc_job_node( from qe_tools.exceptions import ParsingError from aiida_quantumespresso.tools.pwinputparser import PwInputFile try: - with open(filepath_input, 'r') as input_file: + with open(filepath_input, 'r', encoding='utf-8') as input_file: parsed_input = PwInputFile(input_file.read()) except (ParsingError, FileNotFoundError): pass @@ -315,7 +315,7 @@ def _generate_structure(structure_id='silicon'): structure.append_atom(position=[-29.3865565, 9.51707929, -4.02515904], symbols='H', name='H') structure.append_atom(position=[1.04074437, -1.64320127, -1.27035021], symbols='O', name='O') else: - raise KeyError('Unknown structure_id=\'{}\''.format(structure_id)) + raise KeyError(f"Unknown structure_id=\'{structure_id}\'") return structure return _generate_structure diff --git a/tests/parsers/fixtures/pw/default_environ/aiida.out b/tests/parsers/fixtures/pw/default_environ/aiida.out new file mode 100644 index 000000000..a4d881ea4 --- /dev/null +++ b/tests/parsers/fixtures/pw/default_environ/aiida.out @@ -0,0 +1,766 @@ + + Program PWSCF v.6.7+ starts on 19Nov2021 at 13:55:46 + + This program is part of the open-source Quantum ESPRESSO suite + for quantum simulation of materials; please cite + "P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009); + "P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017); + URL http://www.quantum-espresso.org", + in publications or presentations arising from this work. More details at + http://www.quantum-espresso.org/quote + + Parallel version (MPI), running on 4 processors + + MPI processes distributed on 1 nodes + R & G space division: proc/nbgrp/npool/nimage = 4 + Waiting for input... + Reading input from standard input + + Current dimensions of program PWSCF are: + Max number of different atomic species (ntypx) = 10 + Max number of k-points (npk) = 40000 + Max angular momentum in pseudopotentials (lmaxx) = 3 + file C.pbe-rrkjus.UPF: wavefunction(s) 2S 2P renormalized + file O.pbe-rrkjus.UPF: wavefunction(s) 2S renormalized + + Subspace diagonalization in iterative solution of the eigenvalue problem: + one sub-group per band group will be used + scalapack distributed-memory algorithm (size of sub-group: 2* 2 procs) + + + Parallelization info + -------------------- + sticks: dense smooth PW G-vecs: dense smooth PW + Min 551 274 67 82723 29232 3641 + Max 552 275 68 82731 29247 3646 + Sum 2205 1099 269 330909 116965 14571 + + + + bravais-lattice index = 8 + lattice parameter (alat) = 10.6881 a.u. + unit-cell volume = 4181.1215 (a.u.)^3 + number of atoms/cell = 10 + number of atomic types = 3 + number of electrons = 89.00 + number of Kohn-Sham states= 80 + kinetic-energy cutoff = 35.0000 Ry + charge density cutoff = 280.0000 Ry + scf convergence threshold = 5.0E-09 + mixing beta = 0.2000 + number of iterations used = 8 plain mixing + Exchange-correlation= SLA PW PBE PBE + ( 1 4 3 4 0 0 0) + + + Environ Module + ============== + + Plese cite + O. Andreussi, I. Dabo and N. Marzari, J. Chem. Phys. 136, 064102 (2012) + in publications or presentations arising from this work. + + compensation onset threshold = 0.1000E+01 + + Electrostatic Setup + ------------------- + electrostatic problem to solve = poisson + numerical solver adopted = direct + type of auxiliary density adopted = none + type of core tool for poisson = fft + type of core tool for s(r) deriv = analytic + + + + celldm(1)= 10.688100 celldm(2)= 0.866025 celldm(3)= 3.954220 + celldm(4)= 0.000000 celldm(5)= 0.000000 celldm(6)= 0.000000 + + crystal axes: (cart. coord. in units of alat) + a(1) = ( 1.000000 0.000000 0.000000 ) + a(2) = ( 0.000000 0.866025 0.000000 ) + a(3) = ( 0.000000 0.000000 3.954220 ) + + reciprocal axes: (cart. coord. in units 2 pi/alat) + b(1) = ( 1.000000 0.000000 0.000000 ) + b(2) = ( 0.000000 1.154701 0.000000 ) + b(3) = ( 0.000000 0.000000 0.252894 ) + + + PseudoPot. # 1 for C read from file: + /p/project/pra121/vijay1/bin/qe/q-e_6-7/pseudo/C.pbe-rrkjus.UPF + MD5 check sum: c9ac5a99bc85b198593446162950cd17 + Pseudo is Ultrasoft, Zval = 4.0 + Generated by new atomic code, or converted to UPF format + Using radial grid of 627 points, 4 beta functions with: + l(1) = 0 + l(2) = 0 + l(3) = 1 + l(4) = 1 + Q(r) pseudized with 0 coefficients + + + PseudoPot. # 2 for O read from file: + /p/project/pra121/vijay1/bin/qe/q-e_6-7/pseudo/O.pbe-rrkjus.UPF + MD5 check sum: fadcf19ee70a498d3030e2e79cf929a4 + Pseudo is Ultrasoft, Zval = 6.0 + Generated by new atomic code, or converted to UPF format + Using radial grid of 1269 points, 4 beta functions with: + l(1) = 0 + l(2) = 0 + l(3) = 1 + l(4) = 1 + Q(r) pseudized with 0 coefficients + + + PseudoPot. # 3 for Pt read from file: + /p/project/pra121/vijay1/bin/qe/q-e_6-7/pseudo/Pt.pbe-nd-rrkjus.UPF + MD5 check sum: b34016df742983190e94d0e746921a01 + Pseudo is Ultrasoft + core correction, Zval = 10.0 + Generated by new atomic code, or converted to UPF format + Using radial grid of 1547 points, 3 beta functions with: + l(1) = 1 + l(2) = 2 + l(3) = 2 + Q(r) pseudized with 0 coefficients + + + atomic species valence mass pseudopotential + C 4.00 1.00000 C ( 1.00) + O 6.00 1.00000 O ( 1.00) + Pt 10.00 1.00000 Pt( 1.00) + + No symmetry found + + + s frac. trans. + + isym = 1 identity + + cryst. s( 1) = ( 1 0 0 ) + ( 0 1 0 ) + ( 0 0 1 ) + + cart. s( 1) = ( 1.0000000 0.0000000 0.0000000 ) + ( 0.0000000 1.0000000 0.0000000 ) + ( 0.0000000 0.0000000 1.0000000 ) + + + point group C_1 (1) + there are 1 classes + the character table: + + E +A 1.00 + + the symmetry operations in each class and the name of the first element: + + E 1 + identity + + Cartesian axes + + site n. atom positions (alat units) + 1 C tau( 1) = ( 0.4991611 0.4347567 1.2070461 ) + 2 O tau( 2) = ( 0.4991542 0.4322212 1.4109013 ) + 3 Pt tau( 3) = ( 0.7542339 0.0091745 0.8413229 ) + 4 Pt tau( 4) = ( 0.2441023 0.0091745 0.8413226 ) + 5 Pt tau( 5) = ( 0.0000034 0.4416918 0.8391348 ) + 6 Pt tau( 6) = ( 0.4991682 0.4417635 0.8776299 ) + 7 Pt tau( 7) = ( 0.0000038 0.7300598 0.4308181 ) + 8 Pt tau( 8) = ( 0.4991683 0.7202168 0.4447460 ) + 9 Pt tau( 9) = ( 0.2524172 0.2949237 0.4386572 ) + 10 Pt tau( 10) = ( 0.7459196 0.2949237 0.4386575 ) + + Crystallographic axes + + site n. atom positions (cryst. coord.) + 1 C tau( 1) = ( 0.4991611 0.5020141 0.3052552 ) + 2 O tau( 2) = ( 0.4991542 0.4990863 0.3568090 ) + 3 Pt tau( 3) = ( 0.7542339 0.0105938 0.2127658 ) + 4 Pt tau( 4) = ( 0.2441023 0.0105938 0.2127658 ) + 5 Pt tau( 5) = ( 0.0000034 0.5100220 0.2122125 ) + 6 Pt tau( 6) = ( 0.4991682 0.5101048 0.2219477 ) + 7 Pt tau( 7) = ( 0.0000038 0.8430008 0.1089515 ) + 8 Pt tau( 8) = ( 0.4991683 0.8316351 0.1124738 ) + 9 Pt tau( 9) = ( 0.2524172 0.3405487 0.1109339 ) + 10 Pt tau( 10) = ( 0.7459196 0.3405488 0.1109340 ) + + number of k points= 1 Marzari-Vanderbilt smearing, width (Ry)= 0.0300 + cart. coord. in units 2pi/alat + k( 1) = ( 0.0000000 0.0000000 0.0000000), wk = 2.0000000 + + cryst. coord. + k( 1) = ( 0.0000000 0.0000000 0.0000000), wk = 2.0000000 + + Dense grid: 330909 G-vectors FFT dimensions: ( 60, 50, 225) + + Smooth grid: 116965 G-vectors FFT dimensions: ( 45, 36, 160) + + Dynamical RAM for wfc: 4.46 MB + + Dynamical RAM for wfc (w. buffer): 4.46 MB + + Dynamical RAM for str. fact: 3.79 MB + + Dynamical RAM for local pot: 0.00 MB + + Dynamical RAM for nlocal pot: 6.69 MB + + Dynamical RAM for qrad: 1.92 MB + + Dynamical RAM for rho,v,vnew: 7.70 MB + + Dynamical RAM for rhoin: 2.57 MB + + Dynamical RAM for rho*nmix: 20.20 MB + + Dynamical RAM for G-vectors: 4.96 MB + + Dynamical RAM for h,s,v(r/c): 0.29 MB + + Dynamical RAM for : 0.15 MB + + Dynamical RAM for psi: 8.92 MB + + Dynamical RAM for hpsi: 8.92 MB + + Dynamical RAM for spsi: 8.92 MB + + Dynamical RAM for wfcinit/wfcrot: 9.07 MB + + Dynamical RAM for addusdens: 143.91 MB + + Dynamical RAM for addusforce: 162.23 MB + + Estimated static dynamical RAM per process > 63.86 MB + + Estimated max dynamical RAM per process > 226.09 MB + + Estimated total dynamical RAM > 904.34 MB + + Check: negative core charge= -0.000038 + + Initial potential from superposition of free atoms + + starting charge 89.99875, renormalised to 89.00000 + + negative rho (up, down): 7.106E-05 0.000E+00 + Starting wfcs are 56 randomized atomic wfcs + 24 random wfcs + + total cpu time spent up to now is 2.1 secs + + Self-consistent Calculation + + iteration # 1 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 1.00E-02, avg # of iterations = 8.0 + + negative rho (up, down): 7.321E-05 0.000E+00 + + total cpu time spent up to now is 3.3 secs + + total energy = -735.17457460 Ry + estimated scf accuracy < 2.30957957 Ry + electrostatic embedding = 0.03381190 Ry + correction to one-el term = 0.00000000 Ry + + iteration # 2 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 2.60E-03, avg # of iterations = 2.0 + + negative rho (up, down): 1.332E-04 0.000E+00 + + total cpu time spent up to now is 4.3 secs + + total energy = -734.89105303 Ry + estimated scf accuracy < 17.11345999 Ry + electrostatic embedding = 0.03381190 Ry + correction to one-el term = 0.00000000 Ry + + iteration # 3 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 2.60E-03, avg # of iterations = 2.0 + + negative rho (up, down): 1.047E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 5.2 secs + + total energy = -735.53314749 Ry + estimated scf accuracy < 0.51786543 Ry + electrostatic embedding = 0.03381190 Ry + correction to one-el term = 0.00000000 Ry + + iteration # 4 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 5.82E-04, avg # of iterations = 9.0 + + negative rho (up, down): 1.368E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 6.2 secs + + total energy = -735.34043053 Ry + estimated scf accuracy < 0.42369192 Ry + electrostatic embedding = 0.26936088 Ry + correction to one-el term = 15.81413361 Ry + + iteration # 5 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 4.76E-04, avg # of iterations = 1.0 + + negative rho (up, down): 1.327E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 7.1 secs + + total energy = -735.31100079 Ry + estimated scf accuracy < 0.15046751 Ry + electrostatic embedding = 0.25772327 Ry + correction to one-el term = 14.80142720 Ry + + iteration # 6 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 1.69E-04, avg # of iterations = 3.0 + + negative rho (up, down): 1.444E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 8.1 secs + + total energy = -735.31951073 Ry + estimated scf accuracy < 0.02306781 Ry + electrostatic embedding = 0.23949071 Ry + correction to one-el term = 13.20086717 Ry + + iteration # 7 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 2.59E-05, avg # of iterations = 10.0 + + negative rho (up, down): 1.813E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 9.1 secs + + total energy = -735.31853820 Ry + estimated scf accuracy < 0.02699134 Ry + electrostatic embedding = 0.23324270 Ry + correction to one-el term = 12.65057673 Ry + + iteration # 8 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 2.59E-05, avg # of iterations = 2.0 + + negative rho (up, down): 1.767E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 10.1 secs + + total energy = -735.31851263 Ry + estimated scf accuracy < 0.00617057 Ry + electrostatic embedding = 0.22919236 Ry + correction to one-el term = 12.29194402 Ry + + iteration # 9 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 6.93E-06, avg # of iterations = 2.0 + + negative rho (up, down): 1.763E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 11.0 secs + + total energy = -735.31864049 Ry + estimated scf accuracy < 0.00140888 Ry + electrostatic embedding = 0.23036237 Ry + correction to one-el term = 12.39618991 Ry + + iteration # 10 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 1.58E-06, avg # of iterations = 7.0 + + negative rho (up, down): 1.799E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 12.0 secs + + total energy = -735.31883610 Ry + estimated scf accuracy < 0.00050921 Ry + electrostatic embedding = 0.23119619 Ry + correction to one-el term = 12.47027091 Ry + + iteration # 11 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 5.72E-07, avg # of iterations = 1.0 + + negative rho (up, down): 1.761E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 12.9 secs + + total energy = -735.31875186 Ry + estimated scf accuracy < 0.00070565 Ry + electrostatic embedding = 0.23090627 Ry + correction to one-el term = 12.44491954 Ry + + iteration # 12 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 5.72E-07, avg # of iterations = 1.0 + + negative rho (up, down): 1.776E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 13.7 secs + + total energy = -735.31877949 Ry + estimated scf accuracy < 0.00025042 Ry + electrostatic embedding = 0.23034041 Ry + correction to one-el term = 12.39506439 Ry + + iteration # 13 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 2.81E-07, avg # of iterations = 1.0 + + negative rho (up, down): 1.765E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 14.7 secs + + total energy = -735.31878788 Ry + estimated scf accuracy < 0.00001598 Ry + electrostatic embedding = 0.23021177 Ry + correction to one-el term = 12.38374531 Ry + + iteration # 14 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 1.80E-08, avg # of iterations = 1.0 + + negative rho (up, down): 1.767E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 15.6 secs + + total energy = -735.31878920 Ry + estimated scf accuracy < 0.00001098 Ry + electrostatic embedding = 0.23026331 Ry + correction to one-el term = 12.38830577 Ry + + iteration # 15 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 1.23E-08, avg # of iterations = 1.0 + + negative rho (up, down): 1.769E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 16.4 secs + + total energy = -735.31878967 Ry + estimated scf accuracy < 0.00000197 Ry + electrostatic embedding = 0.23024244 Ry + correction to one-el term = 12.38649872 Ry + + iteration # 16 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 2.21E-09, avg # of iterations = 2.0 + + negative rho (up, down): 1.768E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 17.3 secs + + total energy = -735.31878978 Ry + estimated scf accuracy < 0.00000028 Ry + electrostatic embedding = 0.23026626 Ry + correction to one-el term = 12.38860342 Ry + + iteration # 17 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 3.16E-10, avg # of iterations = 1.0 + + negative rho (up, down): 1.768E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 18.2 secs + + total energy = -735.31878980 Ry + estimated scf accuracy < 0.00000016 Ry + electrostatic embedding = 0.23026549 Ry + correction to one-el term = 12.38853299 Ry + + iteration # 18 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 1.82E-10, avg # of iterations = 1.0 + + negative rho (up, down): 1.770E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 19.2 secs + + total energy = -735.31878981 Ry + estimated scf accuracy < 0.00000005 Ry + electrostatic embedding = 0.23026438 Ry + correction to one-el term = 12.38843439 Ry + + iteration # 19 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 5.11E-11, avg # of iterations = 1.0 + + negative rho (up, down): 1.772E-04 0.000E+00 + + add environment contribution to local potential + + total cpu time spent up to now is 20.2 secs + + total energy = -735.31878981 Ry + estimated scf accuracy < 0.00000005 Ry + electrostatic embedding = 0.23025998 Ry + correction to one-el term = 12.38804341 Ry + + iteration # 20 ecut= 35.00 Ry beta= 0.20 + Davidson diagonalization with overlap + ethr = 5.11E-11, avg # of iterations = 1.0 + + negative rho (up, down): 1.782E-04 0.000E+00 + + the potential shift due to the Gaussian-smeared nuclei is -0.4600 ev + + total cpu time spent up to now is 21.0 secs + + End of self-consistent calculation + + k = 0.0000 0.0000 0.0000 ( 14571 PWs) bands (ev): + + -29.0472 -16.0141 -14.6764 -13.3400 -12.6293 -12.5222 -12.2193 -12.1834 + -12.0346 -11.3971 -11.3878 -11.1572 -11.0753 -11.0624 -10.9529 -10.8330 + -10.1051 -10.0581 -9.9928 -9.8548 -9.8048 -9.7903 -9.7387 -9.7114 + -9.6948 -9.5063 -9.4802 -9.3374 -9.2259 -9.0104 -8.9435 -8.1283 + -8.0393 -7.8086 -7.5519 -7.5028 -7.4413 -7.2832 -7.1128 -7.0164 + -6.8437 -6.8341 -6.6181 -6.6160 -6.5805 -6.4175 -6.2442 -5.0883 + -4.8498 -4.8180 -4.1026 -3.5370 -3.1856 -2.0089 -1.8634 -1.7156 + -0.6942 -0.2593 0.7644 1.0764 1.1990 1.7782 2.1853 2.4530 + 2.4839 3.2885 4.1503 4.8897 5.0012 5.1752 5.4182 5.6783 + 5.9949 6.0767 6.5357 6.9515 7.0514 7.3140 7.6961 7.7514 + + occupation numbers + 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 + 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 + 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 + 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 + 1.0000 1.0004 1.0067 1.0101 1.0164 1.0439 1.0793 1.0808 + 0.9891 0.9794 0.6507 0.6467 0.5814 0.3033 0.1118 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + + the Fermi energy is -6.4792 ev + +! total energy = -735.31878981 Ry + estimated scf accuracy < 4.0E-09 Ry + smearing contrib. (-TS) = -0.00037594 Ry + internal energy E=F+TS = -735.31841387 Ry + + The total energy is F=E-TS. E is the sum of the following terms: + one-electron contribution = -3948.25478681 Ry + hartree contribution = 2005.74783181 Ry + xc contribution = -378.63394858 Ry + ewald contribution = 1573.20467954 Ry + electrostatic embedding = 0.23025445 Ry + correction to one-el term = 12.38755571 Ry + + WARNING: you are using the parabolic pbc correction; + the potential shift above must be added to + band and Fermi energies. + + convergence has been achieved in 20 iterations + + negative rho (up, down): 1.782E-04 0.000E+00 + The global environment contribution to forces + atom 1 type 1 force = 0.00000000 0.00000000 0.12402091 + atom 2 type 2 force = 0.00000000 0.00000000 0.26461290 + atom 3 type 3 force = 0.00000000 0.00000000 0.07508888 + atom 4 type 3 force = 0.00000000 0.00000000 0.07508874 + atom 5 type 3 force = 0.00000000 0.00000000 0.07368315 + atom 6 type 3 force = 0.00000000 0.00000000 0.09841480 + atom 7 type 3 force = 0.00000000 0.00000000 -0.18864494 + atom 8 type 3 force = 0.00000000 0.00000000 -0.17969679 + atom 9 type 3 force = 0.00000000 0.00000000 -0.18360857 + atom 10 type 3 force = 0.00000000 0.00000000 -0.18360840 + + + Forces acting on atoms (cartesian axes, Ry/au): + + atom 1 type 1 force = -0.00000597 -0.00412706 0.12262772 + atom 2 type 2 force = 0.00010002 0.00152735 -0.06327741 + atom 3 type 3 force = -0.00085511 0.01330049 0.03624488 + atom 4 type 3 force = 0.00191003 0.01359464 0.03691979 + atom 5 type 3 force = -0.00183769 0.01272029 0.00147843 + atom 6 type 3 force = 0.00075383 0.00796968 0.03101607 + atom 7 type 3 force = -0.00158849 -0.01416871 -0.04728632 + atom 8 type 3 force = 0.00045925 -0.01790455 -0.02825849 + atom 9 type 3 force = 0.01621600 -0.00664256 -0.04496901 + atom 10 type 3 force = -0.01515186 -0.00626958 -0.04449567 + The non-local contrib. to forces + atom 1 type 1 force = -0.00007581 -0.00617064 0.51248596 + atom 2 type 2 force = 0.00024240 0.04107682 -3.25335441 + atom 3 type 3 force = -0.02646523 -0.00138140 -0.10315705 + atom 4 type 3 force = 0.02659325 -0.00121589 -0.10358600 + atom 5 type 3 force = 0.00096835 0.00390143 -0.15509800 + atom 6 type 3 force = -0.00082222 -0.01655289 0.48094020 + atom 7 type 3 force = 0.00059684 0.02312679 0.07601989 + atom 8 type 3 force = -0.00091374 -0.01739500 0.10097065 + atom 9 type 3 force = 0.01722046 -0.00295588 0.06287184 + atom 10 type 3 force = -0.01711171 -0.00262682 0.06172297 + The ionic contribution to forces + atom 1 type 1 force = 0.00636806 0.05296760 19.96835427 + atom 2 type 2 force = 0.00226724 -0.13041391 48.33963012 + atom 3 type 3 force = 0.50324609 -0.09020628 30.03736972 + atom 4 type 3 force = -0.49292694 -0.08303178 30.06216876 + atom 5 type 3 force = -0.07802400 0.12039865 29.68099553 + atom 6 type 3 force = 0.05586768 0.10046245 29.12582959 + atom 7 type 3 force = -0.06942211 -0.08855591 -48.10896481 + atom 8 type 3 force = 0.05843526 0.13450123 -45.70999247 + atom 9 type 3 force = 0.08482129 -0.01166389 -46.71013044 + atom 10 type 3 force = -0.07063256 -0.00445817 -46.68526027 + The local contribution to forces + atom 1 type 1 force = -0.00630379 -0.05091005 -20.48210954 + atom 2 type 2 force = -0.00241557 0.09088257 -45.41407195 + atom 3 type 3 force = -0.48024211 0.10834304 -29.96524391 + atom 4 type 3 force = 0.47102736 0.10122239 -29.98907824 + atom 5 type 3 force = 0.07477045 -0.10786803 -29.59491228 + atom 6 type 3 force = -0.05402263 -0.07212225 -29.74414341 + atom 7 type 3 force = 0.06674398 0.04334596 48.15898069 + atom 8 type 3 force = -0.05670020 -0.13067251 45.74297402 + atom 9 type 3 force = -0.09289859 0.00375634 46.76863106 + atom 10 type 3 force = 0.07985116 -0.00343694 46.74524926 + The core correction contribution to forces + atom 1 type 1 force = 0.00000000 0.00000000 0.00000000 + atom 2 type 2 force = 0.00000000 0.00000000 0.00000000 + atom 3 type 3 force = 0.00260818 -0.00343994 -0.00771715 + atom 4 type 3 force = -0.00279928 -0.00336671 -0.00757291 + atom 5 type 3 force = 0.00043355 -0.00369719 -0.00310040 + atom 6 type 3 force = -0.00026838 -0.00381031 0.07006078 + atom 7 type 3 force = 0.00047487 0.00793943 0.01544369 + atom 8 type 3 force = -0.00035734 -0.00432001 0.01763334 + atom 9 type 3 force = 0.00707016 0.00422734 0.01739905 + atom 10 type 3 force = -0.00726799 0.00425850 0.01752986 + The Hubbard contrib. to forces + atom 1 type 1 force = 0.00000000 0.00000000 0.00000000 + atom 2 type 2 force = 0.00000000 0.00000000 0.00000000 + atom 3 type 3 force = 0.00000000 0.00000000 0.00000000 + atom 4 type 3 force = 0.00000000 0.00000000 0.00000000 + atom 5 type 3 force = 0.00000000 0.00000000 0.00000000 + atom 6 type 3 force = 0.00000000 0.00000000 0.00000000 + atom 7 type 3 force = 0.00000000 0.00000000 0.00000000 + atom 8 type 3 force = 0.00000000 0.00000000 0.00000000 + atom 9 type 3 force = 0.00000000 0.00000000 0.00000000 + atom 10 type 3 force = 0.00000000 0.00000000 0.00000000 + The SCF correction term to forces + atom 1 type 1 force = -0.00000085 -0.00000063 0.00000309 + atom 2 type 2 force = -0.00000049 -0.00000480 0.00003288 + atom 3 type 3 force = -0.00000848 -0.00000159 0.00003135 + atom 4 type 3 force = 0.00000921 -0.00000002 0.00002639 + atom 5 type 3 force = 0.00000754 -0.00000124 0.00003739 + atom 6 type 3 force = -0.00000705 0.00000602 0.00004108 + atom 7 type 3 force = 0.00001150 -0.00001165 0.00000612 + atom 8 type 3 force = -0.00001115 -0.00000492 -0.00002028 + atom 9 type 3 force = -0.00000375 0.00000686 -0.00000498 + atom 10 type 3 force = 0.00000282 0.00000718 -0.00000214 + + Total force = 0.177296 Total SCF correction = 0.000085 + + Writing output data file /p/project/pra121/vijay1/projects/misc_project/test_aiida_qe/PtCO_vacuum.save/ + + init_run : 1.88s CPU 2.01s WALL ( 1 calls) + electrons : 16.77s CPU 18.93s WALL ( 1 calls) + forces : 1.20s CPU 1.26s WALL ( 1 calls) + + Called by init_run: + wfcinit : 0.12s CPU 0.13s WALL ( 1 calls) + wfcinit:atom : 0.00s CPU 0.00s WALL ( 1 calls) + wfcinit:wfcr : 0.12s CPU 0.13s WALL ( 1 calls) + potinit : 0.59s CPU 0.62s WALL ( 1 calls) + hinit0 : 0.96s CPU 0.98s WALL ( 1 calls) + + Called by electrons: + c_bands : 5.81s CPU 6.05s WALL ( 20 calls) + sum_band : 5.37s CPU 6.21s WALL ( 20 calls) + v_of_rho : 1.44s CPU 1.59s WALL ( 21 calls) + v_h : 0.25s CPU 0.25s WALL ( 55 calls) + v_xc : 1.39s CPU 1.54s WALL ( 22 calls) + newd : 3.48s CPU 4.39s WALL ( 21 calls) + mix_rho : 0.26s CPU 0.28s WALL ( 20 calls) + + Called by c_bands: + init_us_2 : 0.07s CPU 0.07s WALL ( 41 calls) + cegterg : 5.48s CPU 5.71s WALL ( 20 calls) + + Called by sum_band: + sum_band:wei : 0.00s CPU 0.00s WALL ( 20 calls) + sum_band:loo : 0.96s CPU 0.98s WALL ( 20 calls) + sum_band:buf : 0.00s CPU 0.00s WALL ( 20 calls) + sum_band:ini : 0.03s CPU 0.03s WALL ( 20 calls) + sum_band:cal : 0.09s CPU 0.09s WALL ( 20 calls) + sum_band:bec : 0.00s CPU 0.00s WALL ( 20 calls) + addusdens : 4.26s CPU 5.08s WALL ( 20 calls) + addusd:skk : 0.05s CPU 0.05s WALL ( 60 calls) + addusd:dgemm : 0.98s CPU 1.75s WALL ( 60 calls) + addusd:qvan2 : 2.95s CPU 2.97s WALL ( 60 calls) + + Called by *egterg: + cdiaghg : 0.33s CPU 0.35s WALL ( 77 calls) + cegterg:over : 0.32s CPU 0.32s WALL ( 57 calls) + cegterg:upda : 0.29s CPU 0.31s WALL ( 57 calls) + cegterg:last : 0.40s CPU 0.42s WALL ( 32 calls) + cdiaghg:chol : 0.02s CPU 0.02s WALL ( 77 calls) + cdiaghg:inve : 0.00s CPU 0.00s WALL ( 77 calls) + cdiaghg:para : 0.04s CPU 0.04s WALL ( 154 calls) + h_psi : 3.82s CPU 3.95s WALL ( 78 calls) + s_psi : 0.22s CPU 0.23s WALL ( 78 calls) + g_psi : 0.02s CPU 0.02s WALL ( 57 calls) + + Called by h_psi: + h_psi:calbec : 0.21s CPU 0.22s WALL ( 78 calls) + vloc_psi : 3.34s CPU 3.42s WALL ( 78 calls) + add_vuspsi : 0.24s CPU 0.25s WALL ( 78 calls) + + General routines + calbec : 0.31s CPU 0.32s WALL ( 102 calls) + fft : 1.15s CPU 1.20s WALL ( 351 calls) + ffts : 0.04s CPU 0.04s WALL ( 41 calls) + fftw : 3.57s CPU 3.64s WALL ( 8678 calls) + interpolate : 0.10s CPU 0.11s WALL ( 21 calls) + + Parallel routines + fft_scatt_xy : 0.74s CPU 0.76s WALL ( 9070 calls) + fft_scatt_yz : 1.29s CPU 1.32s WALL ( 9070 calls) + + Environ routines + calc_eelect : 0.01s CPU 0.01s WALL ( 40 calls) + calc_velect : 0.43s CPU 0.43s WALL ( 34 calls) + calc_felect : 0.02s CPU 0.02s WALL ( 1 calls) + + PWSCF : 19.94s CPU 22.41s WALL + + + This run was terminated on: 13:56: 8 19Nov2021 + +=------------------------------------------------------------------------------= + JOB DONE. +=------------------------------------------------------------------------------= diff --git a/tests/parsers/fixtures/pw/default_environ/data-file.xml b/tests/parsers/fixtures/pw/default_environ/data-file.xml new file mode 100644 index 000000000..96a3fcd20 --- /dev/null +++ b/tests/parsers/fixtures/pw/default_environ/data-file.xml @@ -0,0 +1,370 @@ + + + + + QEXSD_20.04.20 + XML file generated by PWSCF + This run was terminated on: 13:56: 8 19 Nov 2021 + + + + 4 + 1 + 1 + 1 + 1 + 4 + + + + + scf + from_scratch + PtCO_vacuum + /p/project/pra121/vijay1/bin/qe/q-e_6-7/pseudo/ + /p/project/pra121/vijay1/projects/misc_project/test_aiida_qe + false + true + true + low + 10000000 + 1 + 5.000000000000000e-5 + 5.000000000000000e-4 + 5.000000000000000e-1 + high + 100000 + + + + 1.000000000000000e0 + C.pbe-rrkjus.UPF + + + 1.000000000000000e0 + O.pbe-rrkjus.UPF + + + 1.000000000000000e0 + Pt.pbe-nd-rrkjus.UPF + + + + + 5.335084148000000e0 4.646723426000000e0 1.290102987700000e1 + 5.335009643000000e0 4.619623254000000e0 1.507985426900000e1 + 8.061327070999999e0 9.805799799999999e-2 8.992142900999999e0 + 2.608989366000000e0 9.805828299999998e-2 8.992140585000000e0 + 3.660900000000000e-5 4.720846294000000e0 8.968756935000000e0 + 5.335159557000000e0 4.721612729000000e0 9.380196435000000e0 + 4.112100000000000e-5 7.802951963000001e0 4.604626508000000e0 + 5.335161233000000e0 7.697749113000000e0 4.753489408000000e0 + 2.697860636000000e0 3.152173889000000e0 4.688412329000000e0 + 7.972463687000000e0 3.152174491000000e0 4.688415209000000e0 + + + 1.068810000000000e1 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 9.256161802500001e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 4.226309878200000e1 + + + + PBE + + + false + false + false + + + 80 + mv + 1.000000000000000e0 + smearing + + + false + 1.750000000000000e1 + 1.400000000000000e2 + + + davidson + plain + 2.000000000000000e-1 + 2.500000000000000e-9 + 8 + 200 + false + false + false + false + 0.000000000000000e0 + false + 20 + 20 + + + Monkhorst-Pack + + + none + 1.000000000000000e2 + false + false + + + none + 0.000000000000000e0 + 1.000000000000000e1 + 0.000000000000000e0 + false + false + false + + + false + false + false + false + false + false + + + + + + true + 20 + 1.985042579823666e-9 + + + + false + false + true + false + + + + 1.000000000000000e0 + C.pbe-rrkjus.UPF + + + 1.000000000000000e0 + O.pbe-rrkjus.UPF + + + 1.000000000000000e0 + Pt.pbe-nd-rrkjus.UPF + + + + + 5.335084148000000e0 4.646723426000000e0 1.290102987700000e1 + 5.335009643000000e0 4.619623254000000e0 1.507985426900000e1 + 8.061327070999999e0 9.805799799999999e-2 8.992142900999999e0 + 2.608989366000000e0 9.805828299999998e-2 8.992140585000000e0 + 3.660900000000000e-5 4.720846294000000e0 8.968756935000000e0 + 5.335159557000000e0 4.721612729000000e0 9.380196435000000e0 + 4.112100000000000e-5 7.802951963000001e0 4.604626508000000e0 + 5.335161233000000e0 7.697749113000000e0 4.753489408000000e0 + 2.697860636000000e0 3.152173889000000e0 4.688412329000000e0 + 7.972463687000000e0 3.152174491000000e0 4.688415209000000e0 + + + 1.068810000000000e1 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 9.256161802500001e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 4.226309878200000e1 + + + + 1 + 8 + 0 + + crystal_symmetry + + 1.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 1.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 1.000000000000000e0 + + 0.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + + 1 2 3 4 5 6 7 8 + 9 10 + + + + lattice_symmetry + + -1.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 -1.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 1.000000000000000e0 + + + + lattice_symmetry + + -1.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 1.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 -1.000000000000000e0 + + + + lattice_symmetry + + 1.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 -1.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 -1.000000000000000e0 + + + + lattice_symmetry + + -1.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 -1.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 -1.000000000000000e0 + + + + lattice_symmetry + + 1.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 1.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 -1.000000000000000e0 + + + + lattice_symmetry + + 1.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 -1.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 1.000000000000000e0 + + + + lattice_symmetry + + -1.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 1.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 1.000000000000000e0 + + + + + false + 1.750000000000000e1 + 1.400000000000000e2 + + + + 330909 + 116965 + 14571 + + 1.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + 0.000000000000000e0 1.154701076758754e0 0.000000000000000e0 + 0.000000000000000e0 0.000000000000000e0 2.528943761348635e-1 + + + + PBE + + + false + false + false + 0.000000000000000e0 + 0.000000000000000e0 + + + -3.676593949040917e2 + -3.343390169336549e1 + 1.002873915907443e3 + -6.505432810778142e1 + -1.893169742882895e2 + 7.866023397692216e2 + -1.879705511825105e-4 + + + false + false + false + 80 + 8.900000000000000e1 + 56 + true + -2.381069667679759e-1 + + Monkhorst-Pack + + 1 + smearing + mv + + 0.000000000000000e0 0.000000000000000e0 0.000000000000000e0 + 14571 + + -1.067464594063002e0 -5.885070732111128e-1 -5.393463558553082e-1 -4.902376737762842e-1 -4.641165085553014e-1 + -4.601836813133435e-1 -4.490510423333040e-1 -4.477325081301026e-1 -4.422642958856379e-1 -4.188352183509719e-1 + -4.184927694572388e-1 -4.100208940096466e-1 -4.070102745618581e-1 -4.065352775000210e-1 -4.025124984539808e-1 + -3.981054938279309e-1 -3.713546644526216e-1 -3.696280861607226e-1 -3.672285787189138e-1 -3.621584868060399e-1 + -3.603199659662146e-1 -3.597861316868357e-1 -3.578898949899045e-1 -3.568870650423006e-1 -3.562767971626072e-1 + -3.493489312155456e-1 -3.483922243940035e-1 -3.431415043058983e-1 -3.390450257008541e-1 -3.311258428571588e-1 + -3.286689545331973e-1 -2.987082493732158e-1 -2.954374528804969e-1 -2.869599850743989e-1 -2.775280542985563e-1 + -2.757228222869837e-1 -2.734634837358574e-1 -2.676537642078499e-1 -2.613906993502064e-1 -2.578462116455557e-1 + -2.515024975447040e-1 -2.511488612749126e-1 -2.432115622091901e-1 -2.431317096961222e-1 -2.418307254079953e-1 + -2.358373401160026e-1 -2.294707320786934e-1 -1.869927415318118e-1 -1.782262816576789e-1 -1.770578390397197e-1 + -1.507684252800801e-1 -1.299811412202452e-1 -1.170696565467400e-1 -7.382714056176294e-2 -6.847844853173522e-2 + -6.304733546829556e-2 -2.551262580752673e-2 -9.529171814846126e-3 2.809202912287946e-2 3.955525557584614e-2 + 4.406256181225553e-2 6.534616852595923e-2 8.030816683948311e-2 9.014566923704821e-2 9.128008315949064e-2 + 1.208512951427298e-1 1.525224888330089e-1 1.796948112914687e-1 1.837888955967613e-1 1.901846506444771e-1 + 1.991143507182352e-1 2.086739362346167e-1 2.203076074516392e-1 2.233141672259558e-1 2.401842173146283e-1 + 2.554631439341897e-1 2.591335632926505e-1 2.687840259742070e-1 2.828275748000944e-1 2.848589488230236e-1 + + + 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 + 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 + 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 + 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 + 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 + 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000000e0 1.000000000000027e0 + 1.000000000000159e0 1.000004759211270e0 1.000019096105895e0 1.000443484784763e0 1.006664040897451e0 + 1.010148333431787e0 1.016402678068945e0 1.043926588141051e0 1.079300661858690e0 1.080763453835980e0 + 9.890893693952185e-1 9.793634778380817e-1 6.506947856641130e-1 6.467054957579432e-1 5.813936644309062e-1 + 3.033135474287928e-1 1.117665423500423e-1 2.065529012437686e-8 1.176177654954405e-10 5.610746021885152e-11 + 1.213497611311572e-19 2.455623215339004e-28 1.413686837702461e-34 3.675415846976934e-60 7.925376265026232e-64 + 1.156728384567004e-67 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 + 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 + 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 + 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 + 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 5.520948362159762e-88 + + + + + -2.983518528634247e-6 -2.063527511620131e-3 6.131386176200202e-2 + 5.000821121814134e-5 7.636753757726904e-4 -3.163870393962319e-2 + -4.275556738067149e-4 6.650246106635399e-3 1.812244005761285e-2 + 9.550155937955415e-4 6.797322154342354e-3 1.845989467142151e-2 + -9.188440614198552e-4 6.360145329525803e-3 7.392143443848054e-4 + 3.769143553454710e-4 3.984842118227166e-3 1.550803672435897e-2 + -7.942450963155859e-4 -7.084353831997569e-3 -2.364315810100968e-2 + 2.296245147303735e-4 -8.952277258288035e-3 -1.412924508265964e-2 + 8.107998020904235e-3 -3.321280754627558e-3 -2.248450641048075e-2 + -7.575932345922971e-3 -3.134791727970122e-3 -2.224783402600693e-2 + + + 0 + + + 1.992942800000000e1 + 2.229417395591736e1 + + + 1.676814600000000e1 + 1.892729496955872e1 + + + + diff --git a/tests/parsers/test_pw.py b/tests/parsers/test_pw.py index e1dec3229..61e2f7e27 100644 --- a/tests/parsers/test_pw.py +++ b/tests/parsers/test_pw.py @@ -11,8 +11,8 @@ def generate_inputs(generate_structure): """Return only those inputs that the parser will expect to be there.""" - def _generate_inputs(calculation_type='scf', parameters=None, settings=None, metadata=None): - structure = generate_structure() + def _generate_inputs(calculation_type='scf', parameters=None, settings=None, metadata=None, structure_id='silicon'): + structure = generate_structure(structure_id=structure_id) parameters = {'CONTROL': {'calculation': calculation_type}, **(parameters or {})} kpoints = orm.KpointsData() kpoints.set_cell_from_structure(structure) @@ -907,3 +907,33 @@ def test_pw_vcrelax_failed_not_converged_nstep( assert 'output_parameters' in results assert 'output_structure' in results assert 'output_trajectory' in results + + +def test_environ( + fixture_localhost, + generate_calc_job_node, + generate_parser, + generate_inputs, + data_regression, +): + """Test a simple Environ calculation.""" + name = 'default_environ' + entry_point_calc_job = 'quantumespresso.pw' + entry_point_parser = 'quantumespresso.pw' + environ_settings = {'ENVIRON': {'environ_type': 'water'}} + node = generate_calc_job_node( + entry_point_calc_job, fixture_localhost, name, generate_inputs(settings=environ_settings) + ) + parser = generate_parser(entry_point_parser) + results, calcfunction = parser.parse_from_node(node, store_provenance=False) + + assert calcfunction.is_finished, calcfunction.exception + assert calcfunction.is_finished_ok, calcfunction.exit_message + assert not orm.Log.objects.get_logs_for(node), [log.message for log in orm.Log.objects.get_logs_for(node)] + assert 'output_parameters' in results + assert 'output_trajectory' in results + + data_regression.check({ + 'output_parameters': results['output_parameters'].get_dict(), + 'output_trajectory': results['output_trajectory'].attributes, + }) diff --git a/tests/parsers/test_pw/test_environ.yml b/tests/parsers/test_pw/test_environ.yml new file mode 100644 index 000000000..9c5729545 --- /dev/null +++ b/tests/parsers/test_pw/test_environ.yml @@ -0,0 +1,170 @@ +output_parameters: + beta_real_space: false + charge_density: ./charge-density.dat + constraint_mag: 0 + convergence_info: + scf_conv: + convergence_achieved: true + n_scf_steps: 20 + scf_error: 1.985042579823666e-09 + creator_name: pwscf + creator_version: 6.7+ + degauss: 0.408170751759 + dft_exchange_correlation: PBE + do_magnetization: false + do_not_use_time_reversal: false + energy: -10004.520773975526 + energy_accuracy: 5.4422766901200005e-08 + energy_accuracy_units: eV + energy_ewald: 21404.537890620613 + energy_ewald_units: eV + energy_hartree: 27289.58667829573 + energy_hartree_units: eV + energy_one_electron: -53718.737482276934 + energy_one_electron_units: eV + energy_smearing: -0.005114923747209282 + energy_smearing_units: eV + energy_threshold: 5.11e-11 + energy_units: eV + energy_xc: -5151.576781112572 + energy_xc_units: eV + environ_potential_shift: -0.46 + environ_unit_potential_shift: ev + estimated_ram_per_process: 226.09 + estimated_ram_per_process_units: MB + estimated_ram_total: 904.34 + estimated_ram_total_units: MB + exit_status: 0 + fermi_energy: -6.4792 + fermi_energy_units: eV + fft_grid: + - 60 + - 50 + - 225 + forces_units: ev / angstrom + format_name: QEXSD + format_version: 20.04.20 + has_dipole_correction: false + has_electric_field: false + init_wall_time_seconds: 2.1 + inversion_symmetry: false + lattice_symmetries: + - symmetry_number: 1 + t_rev: '0' + - symmetry_number: 2 + t_rev: '0' + - symmetry_number: 3 + t_rev: '0' + - symmetry_number: 32 + t_rev: '0' + - symmetry_number: 33 + t_rev: '0' + - symmetry_number: 34 + t_rev: '0' + - symmetry_number: 35 + t_rev: '0' + lda_plus_u_calculation: false + lkpoint_dir: false + lsda: false + magnetization_angle1: + - 0.0 + - 0.0 + - 0.0 + magnetization_angle2: + - 0.0 + - 0.0 + - 0.0 + monkhorst_pack_grid: + - 1 + - 1 + - 1 + monkhorst_pack_offset: + - 0 + - 0 + - 0 + no_time_rev_operations: false + non_colinear_calculation: false + number_of_atomic_wfc: 56 + number_of_atoms: 10 + number_of_bands: 80 + number_of_bravais_symmetries: 8 + number_of_electrons: 89.0 + number_of_k_points: 1 + number_of_species: 3 + number_of_spin_components: 1 + number_of_symmetries: 1 + occupations: smearing + pointgroup_international: '1' + pointgroup_schoenflies: C_1 + q_real_space: false + rho_cutoff: 3809.593683084 + rho_cutoff_units: eV + scf_iterations: 20 + smearing_type: mv + smooth_fft_grid: + - 45 + - 36 + - 160 + spin_orbit_calculation: false + spin_orbit_domag: false + starting_magnetization: + - 0.0 + - 0.0 + - 0.0 + symmetries: + - symmetry_number: 0 + t_rev: '0' + symmetries_units: crystal + time_reversal_flag: true + total_force: 4.558462989281458 + total_force_units: ev / angstrom + total_number_of_scf_iterations: 20 + volume: 619.5782679997972 + wall_time: ' 22.41s ' + wall_time_seconds: 22.41 + wfc_cutoff: 476.1992103855 + wfc_cutoff_units: eV +output_trajectory: + array|atomic_species_name: + - 10 + array|cells: + - 1 + - 3 + - 3 + array|energy: + - 1 + array|energy_accuracy: + - 1 + array|energy_ewald: + - 1 + array|energy_hartree: + - 1 + array|energy_one_electron: + - 1 + array|energy_smearing: + - 1 + array|energy_threshold: + - 1 + array|energy_xc: + - 1 + array|fermi_energy: + - 1 + array|forces: + - 1 + - 10 + - 3 + array|positions: + - 1 + - 2 + - 3 + array|scf_accuracy: + - 20 + array|scf_iterations: + - 1 + array|steps: + - 1 + array|total_force: + - 1 + symbols: + - Si + - Si