Skip to content

Commit

Permalink
Format black
Browse files Browse the repository at this point in the history
  • Loading branch information
pyiron-runner committed Dec 31, 2023
1 parent 8b8ee1d commit 70328d1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pyiron_atomistics/sphinx/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
SphinxLogParser,
)
from pyiron_atomistics.sphinx.input_writer import (
write_spin_constraints, copy_potentials, Group
write_spin_constraints,
copy_potentials,
Group,
)
from pyiron_atomistics.sphinx.util import sxversions
from pyiron_atomistics.sphinx.volumetric_data import SphinxVolumetricData
Expand Down Expand Up @@ -1423,13 +1425,17 @@ def write_input(self):
self.input.sphinx.main,
]

if self._generic_input["fix_spin_constraint"] and self.structure.has("initial_magmoms"):
if self._generic_input["fix_spin_constraint"] and self.structure.has(
"initial_magmoms"
):
self.input.sphinx.spinConstraint = Group()
all_groups.append(self.input.sphinx.spinConstraint)
write_spin_constraints(
cwd=self.working_directory,
magmoms=self.structure.get_initial_magnetic_moments()[self.id_pyi_to_spx],
constraints=self.structure.spin_constraint[self.id_pyi_to_spx]
magmoms=self.structure.get_initial_magnetic_moments()[
self.id_pyi_to_spx
],
constraints=self.structure.spin_constraint[self.id_pyi_to_spx],
)
self.input.sphinx.spinConstraint.setdefault("file", '"spins.in"')

Expand Down

0 comments on commit 70328d1

Please sign in to comment.