Skip to content

Commit

Permalink
Merge pull request #26 from marjanAlbouye/main
Browse files Browse the repository at this point in the history
Change hoomd_polymers to hoomd_organics
  • Loading branch information
marjanalbooyeh authored Aug 24, 2023
2 parents f17dc5c + f4f4d31 commit d888a16
Show file tree
Hide file tree
Showing 52 changed files with 76 additions and 76 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
# Action will run when any changes to these paths are pushed or pr'ed to master
branches: [ main ]
paths:
- hoomd_polymers/**
- hoomd_organics/**
- environment-cpu.yml
- .github/workflows/pytest.yml
pull_request:
branches: [ main ]
paths:
- hoomd_polymers/**
- hoomd_organics/**
- environment-cpu.yml
- .github/workflows/pytest.yml
# Allows workflow to be manually triggered
Expand Down
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: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: 'hoomd_polymers/tests/assets/.* | hoomd_polymers/assets/.*'
exclude: 'hoomd_organics/tests/assets/.* | hoomd_organics/assets/.*'
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
Expand Down
6 changes: 3 additions & 3 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ comment:
branches: # branch names that can post comment
- "main"
ignore:
- "hoomd-polymers/tests"
- "hoomd-polymers/assets"
- "hoomd-polymers/__version__.py"
- "hoomd_organics/tests"
- "hoomd_organics/assets"
- "hoomd_organics/__version__.py"
- "tutorials"
- "setup.py"
2 changes: 1 addition & 1 deletion environment-cpu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hoomd-polymers
name: hoomd-organics
channels:
- conda-forge
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hoomd-polymers-dev
name: hoomd-organics-dev
channels:
- conda-forge
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion environment-gpu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hoomd-polymers
name: hoomd-organics
channels:
- conda-forge
dependencies:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
from grits import CG_Compound
from mbuild.lib.recipes import Polymer as mbPolymer

from hoomd_polymers.utils import check_return_iterable
from hoomd_polymers.utils.base_types import FF_Types
from hoomd_polymers.utils.exceptions import MoleculeLoadError
from hoomd_polymers.utils.ff_utils import (
from hoomd_organics.utils import check_return_iterable
from hoomd_organics.utils.base_types import FF_Types
from hoomd_organics.utils.exceptions import MoleculeLoadError
from hoomd_organics.utils.ff_utils import (
_validate_hoomd_ff,
apply_xml_ff,
find_xml_ff,
Expand Down Expand Up @@ -318,9 +318,9 @@ class CoPolymer(Molecule):
Parameters
----------
monomer_A : hoomd_polymers.molecules.Polymer; required
monomer_A : hoomd_organics.molecules.Polymer; required
Class of the A-type monomer
monomer_B : hoomd_polymers.molecules.Polymer: required
monomer_B : hoomd_organics.molecules.Polymer: required
Class of the B-type monomer
length : int; required
The total number of monomers in the molecule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import numpy as np
import unyt as u

from hoomd_polymers.utils import StdOutLogger, UpdateWalls
from hoomd_polymers.utils.exceptions import ReferenceUnitError
from hoomd_organics.utils import StdOutLogger, UpdateWalls
from hoomd_organics.utils.exceptions import ReferenceUnitError


class Simulation(hoomd.simulation.Simulation):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
)
from gmso.parameterization import apply

from hoomd_polymers.base.molecule import Molecule
from hoomd_polymers.utils import FF_Types, check_return_iterable, xml_to_gmso_ff
from hoomd_polymers.utils.exceptions import (
from hoomd_organics.base.molecule import Molecule
from hoomd_organics.utils import FF_Types, check_return_iterable, xml_to_gmso_ff
from hoomd_organics.utils.exceptions import (
ForceFieldError,
MoleculeLoadError,
ReferenceUnitError,
Expand All @@ -29,7 +29,7 @@ class System(ABC):
Parameters
----------
molecule : hoomd_polymers.molecule; required
molecule : hoomd_organics.molecule; required
n_mols : int; required
The number of times to replicate molecule in the system
density : float; optional; default None
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import foyer
import hoomd

from hoomd_polymers.assets import FF_DIR
from hoomd_organics.assets import FF_DIR


class GAFF(foyer.Forcefield):
Expand All @@ -29,7 +29,7 @@ class OPLS_AA_PPS(foyer.Forcefield):
def __init__(self, forcefield_files=f"{FF_DIR}/pps_opls.xml"):
super(OPLS_AA_PPS, self).__init__(forcefield_files=forcefield_files)
self.description = (
"Based on hoomd_polymers.forcefields.OPLS_AA. "
"Based on hoomd_organics.forcefields.OPLS_AA. "
"Trimmed down to include only PPS parameters. "
"One missing parameter was added manually: "
"<Angle class1=CA class2=S class3=CA angle=1.805 k=627.6/> "
Expand All @@ -44,7 +44,7 @@ class OPLS_AA_BENZENE(foyer.Forcefield):
def __init__(self, forcefield_files=f"{FF_DIR}/benzene_opls.xml"):
super(OPLS_AA_BENZENE, self).__init__(forcefield_files=forcefield_files)
self.description = (
"Based on hoomd_polymers.forcefields.OPLS_AA. "
"Based on hoomd_organics.forcefields.OPLS_AA. "
"Trimmed down to include only benzene parameters."
)
self.gmso_ff = ffutils.FoyerFFs().load(forcefield_files).to_gmso_ff()
Expand All @@ -56,7 +56,7 @@ def __init__(self, forcefield_files=f"{FF_DIR}/dimethylether_opls.xml"):
forcefield_files=forcefield_files
)
self.description = (
"Based on hoomd_polymers.forcefields.OPLS_AA. "
"Based on hoomd_organics.forcefields.OPLS_AA. "
"Trimmed down to include only dimethyl ether parameters."
)
self.gmso_ff = ffutils.FoyerFFs().load(forcefield_files).to_gmso_ff()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import mbuild as mb
from mbuild.coordinate_transform import z_axis_transform

from hoomd_polymers import CoPolymer, Polymer
from hoomd_polymers.assets import MON_DIR
from hoomd_organics import CoPolymer, Polymer
from hoomd_organics.assets import MON_DIR


class PolyEthylene(Polymer):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import hoomd
import numpy as np

from hoomd_polymers.base.simulation import Simulation
from hoomd_polymers.utils.actions import PullParticles
from hoomd_organics.base.simulation import Simulation
from hoomd_organics.utils.actions import PullParticles


class Tensile(Simulation):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import hoomd
import numpy as np

from hoomd_polymers.base.simulation import Simulation
from hoomd_organics.base.simulation import Simulation


class Interface:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pytest

from hoomd_polymers import CoPolymer, Molecule, Polymer
from hoomd_polymers.tests import BaseTest
from hoomd_polymers.utils import FF_Types, exceptions
from hoomd_organics import CoPolymer, Molecule, Polymer
from hoomd_organics.tests import BaseTest
from hoomd_organics.utils import FF_Types, exceptions


class TestMolecule(BaseTest):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import hoomd
import numpy as np

from hoomd_polymers import Simulation
from hoomd_polymers.tests import BaseTest
from hoomd_organics import Simulation
from hoomd_organics.tests import BaseTest


class TestSimulate(BaseTest):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import numpy as np
import unyt as u

from hoomd_polymers import Lattice, Pack
from hoomd_polymers.library import (
from hoomd_organics import Lattice, Pack
from hoomd_organics.library import (
GAFF,
OPLS_AA,
OPLS_AA_DIMETHYLETHER,
OPLS_AA_PPS,
)
from hoomd_polymers.tests import BaseTest
from hoomd_organics.tests import BaseTest


class TestSystem(BaseTest):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import pytest
from gmso.external.convert_mbuild import from_mbuild

from hoomd_polymers import Molecule, Pack, Polymer
from hoomd_polymers.library import OPLS_AA
from hoomd_organics import Molecule, Pack, Polymer
from hoomd_organics.library import OPLS_AA

ASSETS_DIR = os.path.join(os.path.dirname(__file__), "assets")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import hoomd

from hoomd_polymers.library import (
from hoomd_organics.library import (
GAFF,
OPLS_AA,
OPLS_AA_BENZENE,
Expand All @@ -11,7 +11,7 @@
BeadSpring,
FF_from_file,
)
from hoomd_polymers.tests.base_test import ASSETS_DIR
from hoomd_organics.tests.base_test import ASSETS_DIR


class TestForceFields:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import mbuild as mb
import pytest

from hoomd_polymers.library import (
from hoomd_organics.library import (
PEEK,
PPS,
LJChain,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from hoomd_polymers.tests import BaseTest
from hoomd_organics.tests import BaseTest


class TestTensileSimulation(BaseTest):
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

import gsd.hoomd

from hoomd_polymers import Simulation
from hoomd_polymers.modules.welding import Interface, SlabSimulation
from hoomd_polymers.tests.base_test import BaseTest
from hoomd_organics import Simulation
from hoomd_organics.modules.welding import Interface, SlabSimulation
from hoomd_organics.tests.base_test import BaseTest


class TestWelding(BaseTest):
def test_interface(self, polyethylene_system):
sim = Simulation(
initial_state=polyethylene_system.hoomd_snapshot,
forcefield=polyethylene_system.hoomd_forcefield,
log_write_freq=2000
log_write_freq=2000,
)
sim.add_walls(wall_axis=(1, 0, 0), sigma=1, epsilon=1, r_cut=2)
sim.run_update_volume(
Expand Down Expand Up @@ -47,7 +47,7 @@ def test_slab_sim_xaxis(self, polyethylene_system):
sim = SlabSimulation(
initial_state=polyethylene_system.hoomd_snapshot,
forcefield=polyethylene_system.hoomd_forcefield,
log_write_freq=2000
log_write_freq=2000,
)
assert sim._axis_array == (1, 0, 0)
assert sim._axis_index == 0
Expand All @@ -58,7 +58,7 @@ def test_slab_sim_yaxis(self, polyethylene_system):
initial_state=polyethylene_system.hoomd_snapshot,
forcefield=polyethylene_system.hoomd_forcefield,
interface_axis="y",
log_write_freq=2000
log_write_freq=2000,
)
assert sim._axis_array == (0, 1, 0)
assert sim._axis_index == 1
Expand All @@ -69,7 +69,7 @@ def test_slab_sim_zaxis(self, polyethylene_system):
initial_state=polyethylene_system.hoomd_snapshot,
forcefield=polyethylene_system.hoomd_forcefield,
interface_axis="z",
log_write_freq=2000
log_write_freq=2000,
)
assert sim._axis_array == (0, 0, 1)
assert sim._axis_index == 2
Expand All @@ -79,7 +79,7 @@ def test_weld_sim(self, polyethylene_system):
sim = SlabSimulation(
initial_state=polyethylene_system.hoomd_snapshot,
forcefield=polyethylene_system.hoomd_forcefield,
log_write_freq=2000
log_write_freq=2000,
)
sim.run_NVT(kT=1.0, tau_kt=0.01, n_steps=500)
sim.save_restart_gsd()
Expand All @@ -88,8 +88,8 @@ def test_weld_sim(self, polyethylene_system):
gsd_file="restart.gsd", interface_axis="x", gap=0.1
)
sim = SlabSimulation(
initial_state=interface.hoomd_snapshot,
forcefield=polyethylene_system.hoomd_forcefield,
initial_state=interface.hoomd_snapshot,
forcefield=polyethylene_system.hoomd_forcefield,
)
if os.path.isfile("restart.gsd"):
os.remove("restart.gsd")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import hoomd
from gmso.parameterization import apply

from hoomd_polymers.assets import FF_DIR
from hoomd_organics.assets import FF_DIR

from .base_types import FF_Types
from .exceptions import (
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
from setuptools import Command, find_packages, setup

# Package meta-data.
NAME = "hoomd_polymers"
NAME = "hoomd_organics"
DESCRIPTION = (
"Package making it easier to build and simulate polymers in Hoomd-Blue"
)
URL = "https://github.com/chrisjonesBSU/hoomd-polymers"
URL = "https://github.com/cmelab/hoomd-organics"
EMAIL = "[email protected]"
AUTHOR = "Chris Jones"
AUTHOR = "CME Lab"
REQUIRES_PYTHON = ">=3.9.0"
VERSION = None

Expand Down Expand Up @@ -102,7 +102,7 @@ def run(self):
# 'console_scripts': ['mycli=mymodule:cli'],
# },
package_data={
"hoomd_polymers": [
"hoomd_organics": [
"modules/*",
"sim/*",
"library/*",
Expand Down
Loading

0 comments on commit d888a16

Please sign in to comment.