Skip to content

Commit

Permalink
del redundant enumerate
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhu committed Nov 29, 2024
1 parent 644c150 commit cc8017e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/molearn/analysis/analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def scan_ca_chirality(self):
indices[resname + str(resid)] = (N_id, CA_id, C_id, CB_id)

results = []
for i, j in enumerate(decoded):
for j in decoded:
s = (j.view(1, 3, -1).permute(0, 2, 1) * self.stdval).numpy()
inversions = {}
for k, v in indices.items():
Expand Down Expand Up @@ -726,8 +726,8 @@ def _relax(self, pdb_file: Union[str, Path], out_path: Union[str, Path], maxIter
mdl = complete_pdb(env, str(pdb_file))
mdl.write(str(modelled_file))
pdb_file = modelled_file
except:
print(f'Failed to model {pdb_file}')
except Exception as e:
print(f'Failed to model {pdb_file}\n{e}')
try:
relaxed_file = out_path/(pdb_file.stem + "_relaxed.pdb")
# Read pdb
Expand All @@ -746,8 +746,8 @@ def _relax(self, pdb_file: Union[str, Path], out_path: Union[str, Path], maxIter
positions = simulation.context.getState(getPositions=True).getPositions()
# Write energy minimized file
PDBFile.writeFile(simulation.topology, positions, open(relaxed_file, "w+"))
except:
print(f'Failed to relax {pdb_file}')
except Exception as e:
print(f'Failed to relax {pdb_file}\n{e}')

def _pdb_file(
self,
Expand Down

0 comments on commit cc8017e

Please sign in to comment.