Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SL diag library specification in cp2k parameters settings #99

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/run_BindingSiteWorkChain_MOF74_CO2.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def main(raspa_code, cp2k_code):
'MAX_ITER': 5
}
},
'GLOBAL': { # Add if you are using version > 7.1
'PREFERRED_DIAG_LIBRARY': 'SL'
},
})

run(builder)
Expand Down
3 changes: 3 additions & 0 deletions examples/run_BindingSiteWorkChain_MOF74_O2.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def main(raspa_code, cp2k_code):
'MAX_ITER': 5
}
},
'GLOBAL': { # Add if you are using version > 7.1
'PREFERRED_DIAG_LIBRARY': 'SL'
},
})
builder.starting_settings_idx = int(1)

Expand Down
20 changes: 13 additions & 7 deletions examples/run_Cp2kMultistageWorkChain_2_H2O.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,19 @@ def run_multistage_h2om(cp2k_code):
structure = StructureData(ase=atoms)

protocol_mod = Dict(dict={'settings_0': {'FORCE_EVAL': {'DFT': {'MGRID': {'CUTOFF': 300,}}}}})
parameters = Dict(dict={'FORCE_EVAL': {
'DFT': {
'UKS': True,
'MULTIPLICITY': 3,
'CHARGE': -2,
}
}})
parameters = Dict(
dict={
'FORCE_EVAL': {
'DFT': {
'UKS': True,
'MULTIPLICITY': 3,
'CHARGE': -2,
},
},
'GLOBAL': { # Add if you are using version > 7.1
'PREFERRED_DIAG_LIBRARY': 'SL'
},
})

# Construct process builder
builder = Cp2kMultistageWorkChain.get_builder()
Expand Down
14 changes: 13 additions & 1 deletion examples/run_Cp2kMultistageWorkChain_Cu_HKUST-1.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@ def run_multistage_cu_hkust1(cp2k_code, cu_hkust1_structuredata): # pylint: dis
"""Run Cp2kMultistageWorkChain on Cu-HKUST-1."""

# testing user change of parameters and protocol
parameters = Dict(dict={'FORCE_EVAL': {'DFT': {'MGRID': {'CUTOFF': 250,}}}})
parameters = Dict(
dict={
'FORCE_EVAL': {
'DFT': {
'MGRID': {
'CUTOFF': 250,
},
},
},
'GLOBAL': { # Add if you are using version > 7.1
'PREFERRED_DIAG_LIBRARY': 'SL'
},
})

# Construct process builder
builder = Cp2kMultistageWorkChain.get_builder()
Expand Down
7 changes: 6 additions & 1 deletion examples/run_Cp2kMultistageWorkChain_H2O.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import ase.build

from aiida.engine import run
from aiida.orm import StructureData, Str
from aiida.orm import Dict, StructureData, Str
from aiida.plugins import WorkflowFactory
from aiida import cmdline

Expand All @@ -32,6 +32,11 @@ def run_multistage_h2o(cp2k_code):
'num_mpiprocs_per_machine': 1,
}
builder.cp2k_base.cp2k.metadata.options.max_wallclock_seconds = 1 * 3 * 60
builder.cp2k_base.cp2k.parameters = Dict(dict={
'GLOBAL': {
'PREFERRED_DIAG_LIBRARY': 'SL'
},
}) # add if you are using version > 7.1

run(builder)

Expand Down
18 changes: 12 additions & 6 deletions examples/run_Cp2kMultistageWorkChain_H2O_fail.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ def run_multistage_h2o_fail(cp2k_code):
atoms.center(vacuum=2.0)
structure = StructureData(ase=atoms)

parameters = Dict(dict={'FORCE_EVAL': {
'DFT': {
'UKS': True,
'MULTIPLICITY': 666,
}
}})
parameters = Dict(
dict={
'FORCE_EVAL': {
'DFT': {
'UKS': True,
'MULTIPLICITY': 666,
},
'GLOBAL': { # Add if you are using version > 7.1
'PREFERRED_DIAG_LIBRARY': 'SL'
},
},
})

# Construct process builder
builder = Cp2kMultistageWorkChain.get_builder()
Expand Down
7 changes: 6 additions & 1 deletion examples/run_Cp2kMultistageWorkChain_H2O_single_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import ase.build

from aiida.engine import run
from aiida.orm import StructureData, Str
from aiida.orm import Dict, StructureData, Str
from aiida.plugins import WorkflowFactory
from aiida import cmdline

Expand All @@ -32,6 +32,11 @@ def run_multistage_h2o_singlepoint(cp2k_code):
'num_mpiprocs_per_machine': 1,
}
builder.cp2k_base.cp2k.metadata.options.max_wallclock_seconds = 1 * 3 * 60
builder.cp2k_base.cp2k.parameters = Dict(dict={
'GLOBAL': {
'PREFERRED_DIAG_LIBRARY': 'SL'
},
}) # add if you are using version > 7.1

run(builder)

Expand Down
7 changes: 6 additions & 1 deletion examples/run_Cp2kMultistageWorkChain_H2O_test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import ase.build

from aiida.engine import run
from aiida.orm import StructureData, SinglefileData
from aiida.orm import Dict, StructureData, SinglefileData
from aiida.plugins import WorkflowFactory
from aiida import cmdline

Expand Down Expand Up @@ -36,6 +36,11 @@ def run_multistage_h2o_testfile(cp2k_code):
'num_mpiprocs_per_machine': 1,
}
builder.cp2k_base.cp2k.metadata.options.max_wallclock_seconds = 1 * 3 * 60
builder.cp2k_base.cp2k.parameters = Dict(dict={
'GLOBAL': {
'PREFERRED_DIAG_LIBRARY': 'SL'
},
}) # add if you are using version > 7.1

run(builder)

Expand Down
7 changes: 6 additions & 1 deletion examples/run_Cp2kPhonopyWorkChain.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import click

from aiida.engine import run
from aiida.orm import load_node
from aiida.orm import Dict, load_node
from aiida.plugins import WorkflowFactory, DataFactory
from aiida import cmdline

Expand All @@ -27,6 +27,11 @@ def run_cp2k_phonopy(cp2k_code, structure_pk):
'num_mpiprocs_per_machine': 1,
}
builder.cp2k_base.cp2k.metadata.options.max_wallclock_seconds = 1 * 3 * 60
builder.cp2k_base.cp2k.parameters = Dict(dict={
'GLOBAL': {
'PREFERRED_DIAG_LIBRARY': 'SL'
},
}) # add if you are using version > 7.1

run(builder)

Expand Down
3 changes: 3 additions & 0 deletions examples/test_Cp2kBindingEnergy_CO2_MOF74.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def run_binding_energy_co2_mof74(cp2k_code, zn_mof74, co2_in_mof74): # pylint:
'MAX_ITER': 5
}
},
'GLOBAL': { # Add if you are using version > 7.1
'PREFERRED_DIAG_LIBRARY': 'SL'
},
})
builder.cp2k_base.cp2k.code = cp2k_code
builder.cp2k_base.cp2k.metadata.options.resources = {
Expand Down
5 changes: 5 additions & 0 deletions examples/test_Cp2kMultistageDdecWorkChain_H2O.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ def run_cp2k_multistage_ddec_h2o(cp2k_code, ddec_code): # pylint: disable=redef
'pseudo': SinglefileData(file=str(cp2k_dir / 'GTH_POTENTIALS')),
'dftd3': SinglefileData(file=str(cp2k_dir / 'dftd3.dat')),
}
builder.cp2k_base.cp2k.parameters = Dict(dict={
'GLOBAL': {
'PREFERRED_DIAG_LIBRARY': 'SL'
},
}) # add if you are using version > 7.1

builder.ddec.code = ddec_code
builder.ddec.parameters = Dict(
Expand Down
14 changes: 13 additions & 1 deletion examples/test_Cp2kMultistageWorkChain_Al.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,19 @@ def run_multistage_al(cp2k_code, al_structuredata): # pylint: disable=redefined
print('EXPECTED: the OT (settings_0) will converge to a negative bandgap, then use SMEARING (settings_1)')

# testing user change of parameters and protocol
parameters = Dict(dict={'FORCE_EVAL': {'DFT': {'MGRID': {'CUTOFF': 250,}}}})
parameters = Dict(
dict={
'FORCE_EVAL': {
'DFT': {
'MGRID': {
'CUTOFF': 250,
},
},
},
'GLOBAL': {
'PREFERRED_DIAG_LIBRARY': 'SL'
}, # add if you are using version > 7.1})
})
protocol_mod = Dict(dict={
'initial_magnetization': {
'Al': 0
Expand Down