Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
choglass committed Jan 8, 2025
1 parent e035d31 commit 3fab7ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions cell2mol/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1972,6 +1972,7 @@ def create_bonds(self, debug: int=0):
mol.smiles_with_H = [lig.smiles for lig in mol.ligands]
mol.smiles = []
for lig in mol.ligands:
print(f"CELL.CREATE_BONDS: Correcting Smiles for ligand {lig.formula}")
result = correct_smiles_ligand(lig, debug=debug)
if result == False:
if debug >= 1: print(f"CELL.CREATE_BONDS: error correcting smiles for ligand {lig.formula}")
Expand Down
4 changes: 4 additions & 0 deletions cell2mol/new_charge_assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ def prepare_mol (mol):
tmp_smiles = []

for lig in mol.ligands:
if hasattr(lig, "smiles"):
print(f"prepare_mol: {lig.formula=} {lig.smiles=}")
else:
print(f"prepare_mol: {lig.formula=}")
tmp_smiles.append(lig.smiles)
parent_indices = lig.get_parent_indices("molecule")
for kdx, a in enumerate(parent_indices):
Expand Down
3 changes: 2 additions & 1 deletion cell2mol/refcell.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ def process_refcell(input_path, name, current_dir, debug=0):
# Finalize and save the reference cell object if no errors
if refcell.error_case == 0:
get_unique_species_in_reference(refcell, debug)
print_refmoleclist(refcell)
else:
print(f"Error occurred in processing reference cell: error case {refcell.error_case}")
print_refmoleclist(refcell)

if hasattr(refcell, "unique_species"):
print_unique_species(refcell)
refcell.save(ref_cell_fname)
Expand Down

0 comments on commit 3fab7ca

Please sign in to comment.