Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 7, 2023
1 parent 4421d40 commit 47d5244
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion docs/sphinxext/notebook_sphinxext.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class NotebookDirective(Directive):
final_argument_whitespace = True

def run(self):

# check if raw html is supported
if not self.state.document.settings.raw_enabled:
raise self.warning('"%s" directive disabled.' % self.name)
Expand Down
1 change: 0 additions & 1 deletion mbuild/compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,6 @@ def _energy_minimize_openbabel(
# if an individual entry is a list, validate the input
if isinstance(fixed_temp, list):
if len(fixed_temp) == 2:

msg1 = (
"Expected tuple or list of length 3 to set"
"which dimensions to fix motion."
Expand Down
1 change: 0 additions & 1 deletion mbuild/formats/cassandramcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def write_mcf(

# Now we write the MCF file
with open(filename, "w") as mcf_file:

header = (
"!***************************************"
"****************************************\n"
Expand Down
2 changes: 0 additions & 2 deletions mbuild/formats/lammpsdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ def write_lammpsdata(

# Write lammps data file https://docs.lammps.org/2001/data_format.html
with open(filename, "w") as data:

data.write(f"{filename} - created by mBuild; units = {unit_style}\n")
if unit_style == "lj":
data.write("#Normalization factors: ")
Expand Down Expand Up @@ -938,7 +937,6 @@ def _get_dihedral_types(
for dihedral in structure.rb_torsions
]
elif use_dihedrals:

dihedral_types = [
unique_dihedral_types[dihedral_info]
for dihedral_info in charmm_dihedrals
Expand Down
1 change: 0 additions & 1 deletion mbuild/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ def _from_lattice_vectors(self):
return np.asarray([alpha, beta, gamma], dtype=np.float64)

def _sanitize_populate_args(self, x, y, z):

error_dict = {0: "X", 1: "Y", 2: "Z"}

# Make sure neither x, y, z input is None
Expand Down
1 change: 0 additions & 1 deletion mbuild/lib/recipes/monolayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def __init__(
# Attach chains of each type to binding sites based on
# respective fractions.
for chain, fraction in zip(chains[:-1], fractions[:-1]):

# Create sub-pattern for this chain type
subpattern = deepcopy(pattern)
n_points = int(round(fraction * n_chains))
Expand Down
6 changes: 4 additions & 2 deletions mbuild/lib/recipes/tiled_compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def __init__(self, tile, n_tiles, name=None, **kwargs):
# Bonds that were periodic in the original tile.
periodic_bonds = set()
for particle1, particle2 in tile.bonds():

if np.linalg.norm(particle1.pos - particle2.pos) > dist_thresh:
periodic_bonds.add((particle1.index, particle2.index))

Expand All @@ -98,7 +97,10 @@ def __init__(self, tile, n_tiles, name=None, **kwargs):
bonds_to_remove = set()
bonds_to_add = set()
for particle1, particle2 in self.bonds():
if (particle1.index, particle2.index,) not in periodic_bonds and (
if (
particle1.index,
particle2.index,
) not in periodic_bonds and (
particle2.index,
particle1.index,
) not in periodic_bonds:
Expand Down
4 changes: 1 addition & 3 deletions mbuild/packing.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,7 @@ def solvate(
overlap, solvated_xyz.name, seed, sidemax * 10
) + PACKMOL_SOLUTE.format(solute_xyz.name, *center_solute.tolist())

for (solv, m_solvent, rotate) in zip(
solvent, n_solvent, fix_orientation
):
for solv, m_solvent, rotate in zip(solvent, n_solvent, fix_orientation):
m_solvent = int(m_solvent)
solvent_xyz = _new_xyz_file()
solvent_xyz_list.append(solvent_xyz)
Expand Down
1 change: 0 additions & 1 deletion mbuild/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ class Grid2DPattern(Pattern):
"""

def __init__(self, n, m, **kwargs):

points = np.zeros(shape=(n * m, 3), dtype=float)
for i, j in product(range(n), range(m)):
points[i * m + j, 0] = i / n
Expand Down
1 change: 0 additions & 1 deletion mbuild/tests/test_compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,6 @@ def test_energy_minimize_fix_compounds(self, octane):
octane.energy_minimize(fixed_compounds=[methyl_end0, (True)])

with pytest.raises(Exception):

octane.energy_minimize(
fixed_compounds=[methyl_end0, ("True", True, True)]
)
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def compile_proto(protoc):


if __name__ == "__main__":

proto_procedure()

setup(
Expand Down

0 comments on commit 47d5244

Please sign in to comment.