Skip to content

Commit

Permalink
auto
Browse files Browse the repository at this point in the history
  • Loading branch information
dimonaks committed Mar 30, 2018
1 parent a28f5cc commit 267e42b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1778,12 +1778,13 @@ def write_geometry(self, geotype = "init", description = "", override = False):

f.write("version "+str(self.version)+"\n")

try: st.magmom
try:
st.magmom
except AttributeError:
st.magmom = [None]
# print st.magmom
# sys.exit()
if any(st.magmom):
if not None in st.magmom:
f.write("magmom "+' '.join(np.array(st.magmom).astype(str)) +"\n")


Expand Down Expand Up @@ -2388,7 +2389,11 @@ def actualize_set(self, curset = None):



if hasattr(self.init, 'magmom') and hasattr(self.init.magmom, '__iter__') and any(self.init.magmom):
# print(hasattr(self.init, 'magmom') and hasattr(self.init.magmom, '__iter__') and not None in self.init.magmom)
# print(self.init.magmom)
# print(None in self.init.magmom)
# sys.exit()
if hasattr(self.init, 'magmom') and hasattr(self.init.magmom, '__iter__') and not None in self.init.magmom:

print_and_log('actualize_set(): Magnetic moments are determined from self.init.magmom:',self.init.magmom, imp = 'y')

Expand Down

0 comments on commit 267e42b

Please sign in to comment.