diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bc0f4aef3..4e9605677 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v4.3.0 hooks: - id: check-yaml - id: end-of-file-fixer diff --git a/docs/conf.py b/docs/conf.py index f89de8436..6e355b4ef 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,8 +23,8 @@ author = "Matt Thompson, Alex Yang, Ray Matsumoto, Parashara Shamaprasad, Umesh Timalsina, Co Quach, Ryan S. DeFever, Justin Gilmer" # The full version, including alpha/beta/rc tags -version = "0.8.0" -release = "0.8.0" +version = "0.8.1" +release = "0.8.1" # -- General configuration --------------------------------------------------- diff --git a/gmso/__init__.py b/gmso/__init__.py index 9a5985491..30f13ccdd 100644 --- a/gmso/__init__.py +++ b/gmso/__init__.py @@ -16,4 +16,4 @@ from .core.subtopology import SubTopology from .core.topology import Topology -__version__ = "0.8.0" +__version__ = "0.8.1" diff --git a/gmso/core/angle.py b/gmso/core/angle.py index 18697e1c4..12a7979b5 100644 --- a/gmso/core/angle.py +++ b/gmso/core/angle.py @@ -61,32 +61,6 @@ def equivalent_members(self): [self.connection_members, tuple(reversed(self.connection_members))] ) - def _equivalent_members_hash(self): - """Return a unique hash representing the connection. - - Returns - ------- - int - A unique hash to represent the connection members - - Notes - ----- - For an angle: - i, j, k == k, j, i - where i, j, and k are the connection members. - Here, j is fixed and i and k are replaceable. - """ - return hash( - tuple( - [ - self.connection_members[1], - frozenset( - [self.connection_members[0], self.connection_members[2]] - ), - ] - ) - ) - def __setattr__(self, key, value): """Set the attributes of the angle.""" if key == "connection_type": diff --git a/gmso/core/bond.py b/gmso/core/bond.py index dae94b3c7..67c5f082a 100644 --- a/gmso/core/bond.py +++ b/gmso/core/bond.py @@ -62,24 +62,6 @@ def equivalent_members(self): [self.connection_members, tuple(reversed(self.connection_members))] ) - def _equivalent_members_hash(self): - """Return a unique hash representing the connection. - - Returns - ------- - int - A unique hash to represent the connection members - Notes - ----- - For a bond: - i, j == j, i - where i and j are the connection members. - Here, i and j are interchangeable. - """ - return hash( - frozenset([self.connection_members[0], self.connection_members[1]]) - ) - def __setattr__(self, key, value): """Handle attribute assignment.""" if key == "connection_type": diff --git a/gmso/core/dihedral.py b/gmso/core/dihedral.py index 6d0910652..430d90460 100644 --- a/gmso/core/dihedral.py +++ b/gmso/core/dihedral.py @@ -64,38 +64,6 @@ def equivalent_members(self): [self.connection_members, tuple(reversed(self.connection_members))] ) - def _equivalent_members_hash(self): - """Returns a unique hash representing the connection - Returns - _______ - int - A unique hash to represent the connection members - Notes - _____ - For a dihedral: - i, j, k, l == l, k, j, i - where i, j, k, and l are the connection members. - Here i and j are interchangeable, j and k are interchangeable, - and k and l are interchangeble, as long as each are adjacent to - one another. - """ - - return hash( - frozenset( - [ - frozenset( - [self.connection_members[0], self.connection_members[1]] - ), - frozenset( - [self.connection_members[1], self.connection_members[2]] - ), - frozenset( - [self.connection_members[2], self.connection_members[3]] - ), - ] - ) - ) - def __setattr__(self, key, value): if key == "connection_type": super(Dihedral, self).__setattr__("dihedral_type", value) diff --git a/gmso/core/improper.py b/gmso/core/improper.py index d27d77617..129c3da37 100644 --- a/gmso/core/improper.py +++ b/gmso/core/improper.py @@ -79,33 +79,6 @@ def equivalent_members(self): return frozenset([self.connection_members, tuple(equiv_members)]) - def _equivalent_members_hash(self): - """Return a unique hash representing the connection. - - Returns - ------- - int - A unique hash to represent the connection members - - Notes - ----- - For an improper: - i, j, k, l == i, k, j, l - where i, j, k, and l are the connection members. - Here j and k are interchangeable and i and l are fixed. - """ - return hash( - tuple( - [ - self.connection_members[0], - self.connection_members[3], - frozenset( - [self.connection_members[1], self.connection_members[2]] - ), - ] - ) - ) - def __setattr__(self, key, value): """Set attribute override to support connection_type key.""" if key == "connection_type": diff --git a/gmso/core/topology.py b/gmso/core/topology.py index 6684da345..3c22d3898 100644 --- a/gmso/core/topology.py +++ b/gmso/core/topology.py @@ -714,7 +714,7 @@ def add_connection(self, connection, update_types=False): is in the topology """ # Check if an equivalent connection is in the topology - equivalent_members = connection._equivalent_members_hash() + equivalent_members = connection.equivalent_members() if equivalent_members in self._unique_connections: warnings.warn( "An equivalent connection already exists. " diff --git a/setup.cfg b/setup.cfg index 7e22d5eec..e8026712f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.0 +current_version = 0.8.1 commit = True tag = True message = Bump to version {new_version} diff --git a/setup.py b/setup.py index 0705ad8a3..3588694c2 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import find_packages, setup ##################################### -VERSION = "0.8.0" +VERSION = "0.8.1" ISRELEASED = False if ISRELEASED: __version__ = VERSION