Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 4, 2024
1 parent 34d720c commit c265112
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
13 changes: 11 additions & 2 deletions dpti/equi.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@
# def gen_equi_header(nsteps, prt_freq, dump_freq, temp, pres, tau_t, tau_p, mass_map, conf_file):
# def gen_equi_header(nsteps, prt_freq, dump_freq, temp, pres, tau_t, tau_p, mass_map, conf_file):
def gen_equi_header(
nsteps, thermo_freq, dump_freq, mass_map, temp, tau_t, tau_p, equi_conf, pres=None, custom_variables=None
nsteps,
thermo_freq,
dump_freq,
mass_map,
temp,
tau_t,
tau_p,
equi_conf,
pres=None,
custom_variables=None,
):
ret = ""
ret += "clear\n"
Expand Down Expand Up @@ -87,7 +96,7 @@ def gen_equi_force_field(model, if_meam=False, meam_model=None, append=None):
if not if_meam:
ret += "pair_style deepmd %s" % model
if append is not None:
ret += " "+append
ret += " " + append
ret += "\n"
ret += "pair_coeff * *\n"
else:
Expand Down
12 changes: 9 additions & 3 deletions dpti/hti.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,25 @@ def _ff_spring(lamb, m_spring_k, var_spring):
return ret


def _ff_soft_lj(lamb, model, m_spring_k, step, sparam, if_meam=False, meam_model=None, append=None):
def _ff_soft_lj(
lamb, model, m_spring_k, step, sparam, if_meam=False, meam_model=None, append=None
):
ret = ""
ret += "# --------------------- FORCE FIELDS ---------------------\n"
if step == "lj_on":
ret += _ff_lj_on(lamb, model, sparam)
var_spring = False
elif step == "deep_on":
# ret += _ff_meam_on(lamb, model, sparam)
ret += _ff_deep_on(lamb, model, sparam, if_meam=if_meam, meam_model=meam_model, append=append)
ret += _ff_deep_on(
lamb, model, sparam, if_meam=if_meam, meam_model=meam_model, append=append
)
var_spring = False
elif step == "spring_off":
# ret += _ff_meam_lj_off(lamb, model, sparam)
ret += _ff_lj_off(lamb, model, sparam, if_meam=if_meam, meam_model=meam_model, append=append)
ret += _ff_lj_off(
lamb, model, sparam, if_meam=if_meam, meam_model=meam_model, append=append
)
var_spring = True
else:
raise RuntimeError("unkown step", step)
Expand Down

0 comments on commit c265112

Please sign in to comment.