Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into cli_flags_output_d…
Browse files Browse the repository at this point in the history
…esign
  • Loading branch information
diogomart committed Oct 14, 2024
2 parents b60ae0b + 89ba874 commit f3fa133
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions meeko/linked_rdkit_chorizo.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ def find_inter_mols_bonds(mols_dict):
for a2 in mols_dict[keys[j]][0].GetAtoms():
vec = p1[a1.GetIdx()] - p2[a2.GetIdx()]
distsqr = np.dot(vec, vec)

# check if atom has implemented covalent radius
for atom in [a1, a2]:
if atom.GetAtomicNum() not in covalent_radius:
raise RuntimeError(f"Element {periodic_table.GetElementSymbol(atom.GetAtomicNum())} doesn't have an implemented covalent radius, which was required for the perception of intermolecular bonds. ")

cov_dist = (
covalent_radius[a1.GetAtomicNum()]
+ covalent_radius[a2.GetAtomicNum()]
Expand Down Expand Up @@ -1130,6 +1136,8 @@ def _get_residues(
elif len(ambiguous[input_resname]) == 1:
template_key = ambiguous[input_resname][0]
template = residue_templates[template_key]
candidate_template_keys = [template_key]
candidate_templates = [template]
else:
candidate_template_keys = []
candidate_templates = []
Expand Down
6 changes: 3 additions & 3 deletions meeko/utils/rdkitutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ def _aux_altloc_mol_build(atom_field_list, requested_altloc, default_altloc):
elif requested_altloc and requested_altloc not in mols_dict:
pdbmol = None
missed_altloc = True
needed_altoc = False
needed_altloc = False
elif default_altloc and default_altloc in mols_dict:
pdbmol, idx_to_rdkit = mols_dict[default_altloc]
elif has_altloc and default_altloc not in mols_dict:
pdbmol = None
needed_altloc = True
missed_altloc = False
missed_altloc = True
needed_altloc = False
elif not has_altloc and requested_altloc is None:
pdbmol, idx_to_rdkit = mols_dict[None]
else:
Expand Down
2 changes: 1 addition & 1 deletion scripts/mk_prepare_receptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ def get_args():
if input_resname in reactive_atom:
reactive_flexres_name[res_id] = reactive_atom[input_resname]
else:
print("no default reactive name for %s, " % resname)
print("no default reactive name for %s, " % input_resname)
print("use --reactive_name or --reactive_name_specific" + os_linesep)
sys.exit(2)

Expand Down

0 comments on commit f3fa133

Please sign in to comment.