Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
umesh-timalsina committed Jun 15, 2022
2 parents 4436e35 + bc01f9d commit d0efd62
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion gmso/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
from .core.subtopology import SubTopology
from .core.topology import Topology

__version__ = "0.8.0"
__version__ = "0.8.1"
26 changes: 0 additions & 26 deletions gmso/core/angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
18 changes: 0 additions & 18 deletions gmso/core/bond.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
32 changes: 0 additions & 32 deletions gmso/core/dihedral.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
27 changes: 0 additions & 27 deletions gmso/core/improper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion gmso/core/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import find_packages, setup

#####################################
VERSION = "0.8.0"
VERSION = "0.8.1"
ISRELEASED = False
if ISRELEASED:
__version__ = VERSION
Expand Down

0 comments on commit d0efd62

Please sign in to comment.