Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#558)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.1 → 24.2.0](psf/black@23.12.1...24.2.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Feb 13, 2024
1 parent f77990d commit 28b7c53
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: trailing-whitespace
exclude: 'setup.cfg'
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.2.0
hooks:
- id: black
args: [--line-length=80]
Expand Down
1 change: 1 addition & 0 deletions examples/ethane.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Example script for a parametrized ethane molecule."""

import parmed as pmd

from foyer import Forcefield
Expand Down
1 change: 1 addition & 0 deletions foyer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Foyer: A pacakage for atom-typing, applying and disseminating forcefields."""

from foyer.forcefield import Forcefield
from foyer.forcefields import forcefields

Expand Down
1 change: 1 addition & 0 deletions foyer/atomtyper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Determine proper atom types for chemical systems."""

from warnings import warn

import ele
Expand Down
1 change: 1 addition & 0 deletions foyer/element.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Element support in foyer."""

import openmm.app.element as elem


Expand Down
1 change: 1 addition & 0 deletions foyer/examples/files/modify_oplsa_silica.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility to modify a silica/oplsaa xml."""

from lxml import etree

root = etree.fromstring(open("oplsaa_with_silica.xml", "r").read())
Expand Down
1 change: 1 addition & 0 deletions foyer/examples/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility methods for foyer examples."""

import glob
from os.path import abspath, join, split

Expand Down
1 change: 1 addition & 0 deletions foyer/forcefield.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Foyer ForceField class and utility methods."""

import collections
import glob
import itertools
Expand Down
1 change: 1 addition & 0 deletions foyer/forcefields/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Plugin support for forcefields."""

from pkg_resources import iter_entry_points


Expand Down
1 change: 1 addition & 0 deletions foyer/forcefields/forcefields.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support user-created forcefield XML files."""

import glob
import os
import warnings
Expand Down
1 change: 1 addition & 0 deletions foyer/smarts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility methods/classes for SMARTS grammar."""

import lark

from foyer.exceptions import FoyerError
Expand Down
1 change: 1 addition & 0 deletions foyer/smarts_graph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for SMARTSGraph and SMARTS matching logic."""

import itertools
from collections import OrderedDict, defaultdict

Expand Down
1 change: 1 addition & 0 deletions foyer/topology_graph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module to represent chemical systems as graph structures."""

from typing import TYPE_CHECKING, Optional

import networkx as nx
Expand Down
1 change: 1 addition & 0 deletions foyer/utils/external.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Methods that require external access to function."""

import requests


Expand Down
1 change: 1 addition & 0 deletions foyer/utils/io.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""File I/O support module."""

from __future__ import division, print_function

import importlib
Expand Down
1 change: 1 addition & 0 deletions foyer/utils/nbfixes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support non-bonded fixes for various interactions."""

from parmed import Structure


Expand Down
1 change: 1 addition & 0 deletions foyer/validator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Validaton of force field XML files."""

import os
from collections import Counter
from os.path import abspath, join, split
Expand Down
19 changes: 10 additions & 9 deletions foyer/xml_writer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Write foyer XMLs from a parametrized structure."""

from __future__ import division

import collections
Expand Down Expand Up @@ -313,15 +314,15 @@ def _write_periodic_torsions(root, dihedrals, unique):
n = 1
while "periodicity{}".format(n) in last_dihedral_force.attrib:
n += 1
last_dihedral_force.attrib[
"periodicity{}".format(n)
] = dihedral_force.attrib["periodicity1"]
last_dihedral_force.attrib[
"phase{}".format(n)
] = dihedral_force.attrib["phase1"]
last_dihedral_force.attrib[
"k{}".format(n)
] = dihedral_force.attrib["k1"]
last_dihedral_force.attrib["periodicity{}".format(n)] = (
dihedral_force.attrib["periodicity1"]
)
last_dihedral_force.attrib["phase{}".format(n)] = (
dihedral_force.attrib["phase1"]
)
last_dihedral_force.attrib["k{}".format(n)] = (
dihedral_force.attrib["k1"]
)
periodic_torsion_forces.remove(dihedral_force)
else:
last_dihedral_force = dihedral_force
Expand Down

0 comments on commit 28b7c53

Please sign in to comment.