Skip to content

Commit

Permalink
fix repr format
Browse files Browse the repository at this point in the history
  • Loading branch information
newville committed Oct 15, 2024
1 parent 779876e commit e6aacd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions larch/xrd/amcsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def __init__(self, ams_id=None, ams_db=None, publication=None, mineral=None,
def __repr__(self):
if self.ams_id is None or self.formula is None:
return '<CifStructure empty>'
return f'<CifStructure, ams_id={self.ams_id:d}, formula={self.formula:s}>'
return f'<CifStructure, ams_id={self.ams_id}, formula={self.formula:s}>'

def get_mineralname(self):
minname = self.mineral.name
Expand Down Expand Up @@ -310,7 +310,7 @@ def ciftext(self):
out.append(';')
out.append(f"{self.pub_title:s}")
out.append(';')
out.append(f"_database_code_amcsd {self.ams_id:07d}")
out.append(f"_database_code_amcsd {self.ams_id}")
if self.compound != '<missing>':
out.append(f"_chemical_compound_source '{self.compound}'")
out.append(f"_chemical_formula_sum '{self.formula}'")
Expand Down Expand Up @@ -564,7 +564,7 @@ def get_pmg_struct(self):
).get_conventional_standard_structure()
except:
print(f"{err} could not analyze spacegroup for CIF {self.ams_id}")

def get_unitcell(self):
"unitcell as dict, from PMG structure"
self.get_pmg_struct()
Expand Down

0 comments on commit e6aacd6

Please sign in to comment.