Skip to content

Commit

Permalink
Update interaction_gathering.py
Browse files Browse the repository at this point in the history
fixed numbering error during metal interactions
  • Loading branch information
talagayev authored Jan 4, 2024
1 parent c069aaa commit 72b590c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions openmmdl/openmmdl_analysis/interaction_gathering.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ def process_frame(frame, pdb_md, lig_name, special=None, peptide=None):
ligand_special_int_nr_atom = combi_lig_special.select_atoms(f"id {ligand_special_int_nr}")
for atom in ligand_special_int_nr_atom:
atom_name = atom.name
# Adjust atom_name based on the specified conditions
if atom_name in ['N', 'C', 'O', 'S']:
atom_name = f'{atom_name}1'
else:
# Assuming the format is a single letter followed by a number
base_name, atom_number = atom_name[:-1], int(atom_name[-1])
new_atom_number = atom_number + 1
atom_name = f'{base_name}{new_atom_number}'
for complex_atom in complex_all:
complex_atom_name = complex_atom.name
if atom_name == complex_atom_name:
Expand Down

0 comments on commit 72b590c

Please sign in to comment.