-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e68e4a9
commit c7cd328
Showing
2 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import os | ||
|
||
import gmso | ||
import hoomd | ||
import numpy as np | ||
import pytest | ||
|
||
from flowermd import SingleChainSystem | ||
from flowermd.internal.exceptions import ForceFieldError, ReferenceUnitError | ||
from flowermd.library import ( | ||
OPLS_AA, | ||
LJChain, | ||
) | ||
from flowermd.tests import BaseTest | ||
|
||
|
||
Class TestSystems(BaseTest): | ||
''' | ||
#test long chain,short chain,AA | ||
def test_single_chain(self, polyethylene): | ||
polyethylene_short = polyethylene(lengths=3, num_mols=1) | ||
short_system = SingleChainSystem( | ||
molecules=[polyethylene] | ||
) | ||
short_system.apply_forcefield( | ||
r_cut=2.5, force_field=[OPLS_AA()], auto_scale=True | ||
) | ||
polyethylene_long = polyethylene(lengths=150, num_mols=1) | ||
long_system = SingleChainSystem( | ||
molecules=[polyethylene] | ||
) | ||
long_system.apply_forcefield( | ||
r_cut=2.5, force_field=[OPLS_AA()], auto_scale=True | ||
) | ||
#add assert for success in system being built | ||
#test CG chain | ||
def test_single_chain_cg(self, polyethylene): | ||
cg_chain = LJChain(lengths=15, num_mols=1) | ||
system = SingleChainSystem( | ||
molecules=[cg_chain] | ||
) | ||
system.apply_forcefield( | ||
r_cut=2.5, force_field=[OPLS_AA()], auto_scale=True | ||
) | ||
assert system.n_mol_types == 1 | ||
assert len(system.all_molecules) == len(polyethylene.molecules) | ||
assert len(system.hoomd_forcefield) > 0 | ||
assert system.n_particles == system.hoomd_snapshot.particles.N | ||
#test buffer <= 1.0 breaks | ||
def test_single_chain_buffer(self): | ||
cg_chain = LJChain(lengths=15, num_mols=1) | ||
system = SingleChainSystem( | ||
molecules=[cg_chain], buffer=0.8 | ||
) | ||
#add assert for break | ||
#test num_mols > 1 breaks | ||
def test_single_chain_mols(self): | ||
cg_chain = LJChain(lengths=15, num_mols=3) | ||
system = SingleChainSystem( | ||
molecules=[cg_chain] | ||
) | ||
#add assert for break | ||
''' |