diff --git a/polyconf/polyconf/PDB.py b/polyconf/polyconf/PDB.py index 2a00895..25553f8 100644 --- a/polyconf/polyconf/PDB.py +++ b/polyconf/polyconf/PDB.py @@ -1,5 +1,5 @@ #!/usr/bin/env python - +import warnings import MDAnalysis as mda class PDB: @@ -53,6 +53,10 @@ def save(self, dummies="X*", fname="polymer", selectionString = None, gmx = Fals defaults to False :type gmx: bool, optional """ + # ignore MDAnalysis "UserWarning: Found no information for attr: 'formalcharges' Using default value of '0'" + warnings.simplefilter('ignore', category=UserWarning, lineno=1154) + # ignore MDAnalysis "UserWarning: Found missing chainIDs. Corresponding atoms will use value of 'X'" + warnings.simplefilter('ignore', category=UserWarning, lineno=1201) if selectionString: if gmx: self.select_atoms(f"{selectionString} and not name {dummies}").atoms._write(f"{fname}.gro") diff --git a/polyconf/polyconf/Polymer.py b/polyconf/polyconf/Polymer.py index 5c6d925..f123f79 100644 --- a/polyconf/polyconf/Polymer.py +++ b/polyconf/polyconf/Polymer.py @@ -446,6 +446,7 @@ def dihedral_solver(self,pairlist,dummies='X*',cutoff=0.7,backwards_only=True): if i==0: # yes, and this is the first monomer failed=True done=True + i=-1 # force exit from while loops upon failure else: # yes, and this is not the first monomer #print(i,tries[i]) retry=True