Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
choglass committed Jun 2, 2024
1 parent 1946ae3 commit 5439ec1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cell2mol/new_c2m_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

newcell = cell2mol(newcell, refcell, sym_ops, reconstruction, charge_assignment, spin_assignment, debug=debug)
newcell.assess_errors(mode="reconstruction")
"""

if newcell.error_case == 0 and reconstruction :
reconstruction = False
charge_assignment = True
Expand All @@ -145,7 +145,7 @@

# Update reference cell object
refcell.save(ref_cell_fname)
"""

# Save unit cell object
newcell.save(cell_fname)

Expand Down
5 changes: 2 additions & 3 deletions cell2mol/new_c2m_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def cell2mol(newcell: object, refcell: object, sym_ops, reconstruction: bool=Tru
# Cell Reconstruction
all_molecules, reconstructed_molecules = reconstuct(refcell, newcell, sym_ops, debug=debug)
all_molecules.extend(reconstructed_molecules)
# Get moleclist for the unit cell
newcell = get_moleclist(newcell, refcell, all_molecules, debug=debug)

if newcell.error_get_fragments: return newcell
elif newcell.error_reconstruction: return newcell
Expand All @@ -30,9 +32,6 @@ def cell2mol(newcell: object, refcell: object, sym_ops, reconstruction: bool=Tru
tini = time.time()

if not newcell.error_reconstruction:
# Get moleclist for the unit cell
newcell = get_moleclist(newcell, refcell, all_molecules, debug=debug)

# Get unique species for the reference cell
refcell.get_unique_species(debug=debug)
print("refcell.unique_species", [specie.formula for specie in refcell.unique_species], refcell.unique_indices)
Expand Down

0 comments on commit 5439ec1

Please sign in to comment.