Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.6.3
current_version = 1.6.4
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion calphy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from calphy.alchemy import Alchemy
from calphy.routines import MeltingTemp

__version__ = "1.6.3"
__version__ = "1.6.4"

def addtest(a,b):
return a+b
66 changes: 46 additions & 20 deletions calphy/alchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,17 +327,30 @@ def run_integration(self, iteration=1):

for idx, (type1, type2) in enumerate(swap_combos):
swap_str = f"{type1} {type2}"
lmp.command(
"fix swap%d all atom/swap %d %d %d %f ke no types %s"
% (
idx,
self.calc.monte_carlo.n_steps,
self.calc.monte_carlo.n_swaps,
np.random.randint(1, 10000),
self.calc._temperature,
swap_str,
if self.calc.use_custom_lammps:
lmp.command(
"fix swap%d all atom/swap %d %d %d %f ke no types %s noforce yes localE yes"
% (
idx,
self.calc.monte_carlo.n_steps,
self.calc.monte_carlo.n_swaps,
np.random.randint(1, 10000),
self.calc._temperature,
swap_str,
)
)
else:
lmp.command(
"fix swap%d all atom/swap %d %d %d %f ke no types %s"
% (
idx,
self.calc.monte_carlo.n_steps,
self.calc.monte_carlo.n_swaps,
np.random.randint(1, 10000),
self.calc._temperature,
swap_str,
)
)
)

# Use the first swap fix for output tracking
# lmp.command("variable a equal f_swap0[1]")
Expand Down Expand Up @@ -433,17 +446,30 @@ def run_integration(self, iteration=1):

for idx, (type1, type2) in enumerate(swap_combos):
swap_str = f"{type1} {type2}"
lmp.command(
"fix swap%d all atom/swap %d %d %d %f ke no types %s"
% (
idx,
self.calc.monte_carlo.n_steps,
self.calc.monte_carlo.n_swaps,
np.random.randint(1, 10000),
self.calc._temperature,
swap_str,
if self.calc.use_custom_lammps:
lmp.command(
"fix swap%d all atom/swap %d %d %d %f ke no types %s noforce yes localE yes"
% (
idx,
self.calc.monte_carlo.n_steps,
self.calc.monte_carlo.n_swaps,
np.random.randint(1, 10000),
self.calc._temperature,
swap_str,
)
)
else:
lmp.command(
"fix swap%d all atom/swap %d %d %d %f ke no types %s"
% (
idx,
self.calc.monte_carlo.n_steps,
self.calc.monte_carlo.n_swaps,
np.random.randint(1, 10000),
self.calc._temperature,
swap_str,
)
)
)

# Use the first swap fix for output tracking
# lmp.command("variable a equal f_swap0[1]")
Expand Down
9 changes: 8 additions & 1 deletion calphy/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from ase.io import read, write
import shutil

__version__ = "1.6.3"
__version__ = "1.6.4"


def _check_equal(val):
Expand Down Expand Up @@ -164,6 +164,13 @@ class MonteCarlo(
description="allow swapping between all atom types including fictitious ones",
),
]
use_custom_lammps: Annotated[
bool,
Field(
default=False,
description="Whether to use the custom modified LAMMPS version",
),
]]


class CompositionScaling(BaseModel, title="Composition scaling input options"):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "calphy"
version = "1.6.3"
version = "1.6.4"
description = "free energy calculation for python"
readme = "README.md"
license = "GPL-3.0-only"
Expand Down
Loading