Skip to content

Commit

Permalink
feat: add method to get all rep as dict
Browse files Browse the repository at this point in the history
  • Loading branch information
n0w0f committed Feb 13, 2024
1 parent 7bcc5f4 commit 4a49a69
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/xtal2txt/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,18 @@ def get_robocrys_rep(self):
def get_wycryst():
pass

def get_all_text_reps():
pass
def get_all_text_reps(self, decimal_places: int = 2):
"""
Returns all the Text representations of the crystal structure in a dictionary.
"""

return {
"cif_p1": self.get_cif_string(format="p1", decimal_places=decimal_places),
"cif_symmetrized": self.get_cif_string(format="symmetrized", decimal_places=decimal_places),
"cif_bonding": None,
"slice": self.get_slice(),
"composition": self.get_composition(),
"crystal_llm_rep": self.get_crystal_llm_rep(),
"robocrys_rep": self.get_robocrys_rep(),
"wycoff_rep": None,
}

0 comments on commit 4a49a69

Please sign in to comment.