diff --git a/calphy/helpers.py b/calphy/helpers.py index 76efca4..a45b823 100644 --- a/calphy/helpers.py +++ b/calphy/helpers.py @@ -74,6 +74,8 @@ def create_object( else: if cmdargs == "": cmdargs = None + elif isinstance(cmdargs, str): + cmdargs = cmdargs.split() lmp = LammpsLibrary(cores=cores, working_directory=directory, cmdargs=cmdargs) commands = [ @@ -129,7 +131,7 @@ def set_mass(lmp, options): else: for i in range(options.n_elements): - lmp.command(f"mass {i+1} {options.mass[i]}") + lmp.command(f"mass {i + 1} {options.mass[i]}") return lmp diff --git a/calphy/input.py b/calphy/input.py index a72e250..34676e2 100644 --- a/calphy/input.py +++ b/calphy/input.py @@ -350,7 +350,6 @@ class Calculation(BaseModel, title="Main input class"): @model_validator(mode="after") def _validate_all(self) -> "Input": - if not (len(self.element) == len(self.mass)): raise ValueError("mass and elements should have same length")