Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
choglass committed May 2, 2024
1 parent c568bb0 commit 0a6298c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cell2mol/c2m_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
# Loads the reference molecules and checks_missing_H
# TODO : reconstruct the unit cell without using reference molecules
# TODO : reconstruct the unit cell using (only reconstruction of) reference molecules and Space group
newcell.get_reference_molecules(ref_labels, ref_fracs, cov_factor=1.4, debug=debug)
newcell.get_reference_molecules(ref_labels, ref_fracs, debug=debug)
ref_pos = frac2cart_fromparam(ref_fracs, cellparam)
writexyz(current_dir, "Ref_All_{}.xyz".format(name), ref_labels, ref_pos)
if not newcell.has_isolated_H: newcell.check_missing_H(debug=debug)
Expand Down
5 changes: 3 additions & 2 deletions cell2mol/missingH.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def check_missingH(refmoleclist: list, debug: int=0):
if ismissingH:
if debug >= 2: print("")
if debug >= 2: print(f"WARNING in Missing H function for: {ref.type}, {idx}, {ref.labels}")
if debug >= 2: print(f"C Atom {kdx} has missing H atoms")
if debug >= 2: print(f"C Atom {kdx} {a.get_parent_index('molecule')} has missing H atoms")
if debug >= 2: print(report)
Missing_H_in_C = True
else:
Expand All @@ -147,11 +147,12 @@ def check_missingH(refmoleclist: list, debug: int=0):
print("Adjacency",a.adjacency)
for adj in a.adjacency:
bonded_atom_coord.append(lig.get_parent("molecule").coord[adj])

ismissingH, report = get_missingH_from_adjacency(a.atnum, a.coord, bonded_atom_coord)
if ismissingH:
if debug >= 2: print("")
if debug >= 2: print(f"WARNING in Missing H function for: {ref.type}, {idx}, {jdx}, {lig.labels}")
if debug >= 2: print(f"C Atom {kdx} has missing H atoms")
if debug >= 2: print(f"C Atom {kdx} {a.get_parent_index('molecule')} has missing H atoms")
if debug >= 2: print(report)
Missing_H_in_C = True

Expand Down

0 comments on commit 0a6298c

Please sign in to comment.