Skip to content

Commit

Permalink
black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Nov 28, 2023
1 parent 034f754 commit d6a0644
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 9 additions & 5 deletions atomistics/calculators/lammps/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
from atomistics.calculators.interface import TaskName


def calc_energy_with_lammps(structure: Atoms, potential_dataframe: DataFrame, lmp=None, **kwargs):
def calc_energy_with_lammps(
structure: Atoms, potential_dataframe: DataFrame, lmp=None, **kwargs
):
template_str = LAMMPS_THERMO_STYLE + "\n" + LAMMPS_THERMO + "\n" + LAMMPS_RUN
lmp_instance = lammps_run(
structure=structure,
Expand All @@ -49,7 +51,9 @@ def calc_energy_with_lammps(structure: Atoms, potential_dataframe: DataFrame, lm
return energy_pot


def calc_forces_with_lammps(structure: Atoms, potential_dataframe: DataFrame, lmp=None, **kwargs):
def calc_forces_with_lammps(
structure: Atoms, potential_dataframe: DataFrame, lmp=None, **kwargs
):
template_str = LAMMPS_THERMO_STYLE + "\n" + LAMMPS_THERMO + "\n" + LAMMPS_RUN
lmp_instance = lammps_run(
structure=structure,
Expand Down Expand Up @@ -98,7 +102,7 @@ def optimize_positions_and_volume_with_lammps(
maxeval=10000000,
thermo=10,
lmp=None,
**kwargs
**kwargs,
):
template_str = (
LAMMPS_MINIMIZE_VOLUME
Expand Down Expand Up @@ -141,7 +145,7 @@ def optimize_positions_with_lammps(
maxeval=10000000,
thermo=10,
lmp=None,
**kwargs
**kwargs,
):
template_str = LAMMPS_THERMO_STYLE + "\n" + LAMMPS_THERMO + "\n" + LAMMPS_MINIMIZE
lmp_instance = lammps_run(
Expand Down Expand Up @@ -181,7 +185,7 @@ def calc_molecular_dynamics_thermal_expansion_with_lammps(
seed=4928459,
dist="gaussian",
lmp=None,
**kwargs
**kwargs,
):
init_str = (
LAMMPS_THERMO_STYLE
Expand Down
4 changes: 1 addition & 3 deletions atomistics/calculators/lammps/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ def lammps_run(structure, potential_dataframe, input_template, lmp=None, **kwarg
potential_dataframe=potential_dataframe
)
if lmp is None:
lmp = LammpsASELibrary(
**kwargs
)
lmp = LammpsASELibrary(**kwargs)

# write structure to LAMMPS
lmp.interactive_structure_setter(
Expand Down

0 comments on commit d6a0644

Please sign in to comment.