Skip to content

Commit

Permalink
Fix errors/typos (#773)
Browse files Browse the repository at this point in the history
* ignore sonarqube artifacts

* bump python version to one that we are testing

* fix issue with string formatting by using f-string

* fix a typo in logging

* removed useless self-assignment

* fix typo in assert

* fixed issue with README file extension
  • Loading branch information
mikemhenry committed Mar 15, 2021
1 parent a3366c7 commit 959ed2b
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 115 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -142,3 +142,6 @@ cython_debug/
# IDEs
.idea/
.vscode/

# SonarQube
.scannerwork/
36 changes: 0 additions & 36 deletions devtools/travis-ci/after_success.sh

This file was deleted.

1 change: 0 additions & 1 deletion devtools/travis-ci/index.html

This file was deleted.

33 changes: 0 additions & 33 deletions devtools/travis-ci/install.sh

This file was deleted.

Binary file removed devtools/travis-ci/oe_license.txt.enc
Binary file not shown.
40 changes: 0 additions & 40 deletions devtools/travis-ci/push-docs-to-s3.py

This file was deleted.

2 changes: 1 addition & 1 deletion environment.yml
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- openeye
dependencies:
- python >=3.6
- python >=3.8
- setuptools
- fire
- joblib
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion perses/annihilation/relative.py
Expand Up @@ -2186,7 +2186,7 @@ def __init__(self,
force_names = getattr(self, '_{}_system_forces'.format(system_name)).keys()
unknown_forces = set(force_names) - set(self._known_forces)
if len(unknown_forces) > 0:
raise ValueError("Unkown forces {} encountered in {} system" % (unknown_forces, system_name))
raise ValueError(f"Unkown forces {unknown_forces} encountered in {system_name} system")
_logger.info("No unknown forces.")

# Get and store the nonbonded method from the system:
Expand Down
3 changes: 1 addition & 2 deletions perses/dispersed/smc.py
Expand Up @@ -515,7 +515,7 @@ def sMC(self,
_logger.debug(f"sMC_timers: {sMC_timers}")

sMC_incremental_works = {_direction: None for _direction in directions}
_logger.debug(f"\tsMC_incremental_works: {sMC_cumulative_works}")
_logger.debug(f"\tsMC_incremental_works: {sMC_incremental_works}")


sMC_cumulative_works = {_direction : [np.zeros(num_particles)] for _direction in directions}
Expand Down Expand Up @@ -978,7 +978,6 @@ def _resample(self,
_logger.debug(f"\t\tnormalized observable value ({normalized_observable_value}) > {resample_observable_threshold}. Skipping resampling.")
resampled_works = total_works
resampled_indices = np.arange(num_particles)
normalized_observable_value = normalized_observable_value

_logger.debug(f"\t\tfinal resampled normalized observable_value: {normalized_observable_value}")
return normalized_observable_value, resampled_works, resampled_indices, resample_bool
Expand Down
2 changes: 1 addition & 1 deletion perses/rjmc/topology_proposal.py
Expand Up @@ -1710,7 +1710,7 @@ def _find_adjacent_residue_atoms(self, old_topology, new_topology, mutated_resid
old_prev_res = [res for res in old_chain.residues() if res.index == prev_res_index][0]

assert new_prev_res.name == old_prev_res.name, f"the new residue left adjacent to mutation res (name {new_prev_res.name}) is not the name of the old residue left adjacent to mutation res (name {old_prev_res.name})"
assert new_next_res.name == new_next_res.name, f"the new residue right adjacent to mutation res (name {new_next_res.name}) is not the name of the old residue right adjacent to mutation res (name {old_next_res.name})"
assert new_next_res.name == old_next_res.name, f"the new residue right adjacent to mutation res (name {new_next_res.name}) is not the name of the old residue right adjacent to mutation res (name {old_next_res.name})"

new_next_res_to_old_next_res_map = {new_atom.index : old_atom.index for new_atom, old_atom in zip(new_next_res.atoms(), old_next_res.atoms())}
new_prev_res_to_old_prev_res_map = {new_atom.index : old_atom.index for new_atom, old_atom in zip(new_prev_res.atoms(), old_prev_res.atoms())}
Expand Down

0 comments on commit 959ed2b

Please sign in to comment.