From 50f5b144a8b388aa288e46eb2fe25b0b8efbf86c Mon Sep 17 00:00:00 2001 From: Romumrn Date: Tue, 30 May 2023 14:37:56 +0200 Subject: [PATCH] Rain an issue if a link is not applied correctly --- polyply/src/gen_itp.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/polyply/src/gen_itp.py b/polyply/src/gen_itp.py index 2bfc3173..20dcc8ce 100644 --- a/polyply/src/gen_itp.py +++ b/polyply/src/gen_itp.py @@ -102,6 +102,12 @@ def gen_params(name="polymer", outpath=Path("polymer.itp"), inpath=[], lib=None, LOGGER.info("applying links between residues", type="step") meta_molecule = ApplyLinks().run_molecule(meta_molecule) + #Check missing edges and raise issues if links between amino acids are not applied. + #Bug if the backbone is correct links between amino acids in a chain are not applied correctly + for missing in find_missing_edges(meta_molecule, meta_molecule.molecule): + msg = "Link between residue {idxA} {resA} and residue {idxB} {resB} was not applied." + LOGGER.warning(msg, **missing) + # Raise warning if molecule is disconnected if not nx.is_connected(meta_molecule.molecule): LOGGER.warning("Your molecule consists of disjoint parts."