def test_random(): '''Testing random made box''' from chemlab.db import ChemlabDB cdb = ChemlabDB() na = Molecule([Atom('Na', [0.0, 0.0, 0.0])]) cl = Molecule([Atom('Cl', [0.0, 0.0, 0.0])]) wat = cdb.get("molecule", 'gromacs.spce') s = random_lattice_box([na, cl, wat], [160, 160, 160], [4, 4, 4])
def test_random_lattice(): '''Testing random made box''' na = Molecule([Atom('Na', [0.0, 0.0, 0.0])]) cl = Molecule([Atom('Cl', [0.0, 0.0, 0.0])]) wat = Molecule.from_arrays(type_array=['O', 'H', 'H']) s = random_lattice_box([na, cl, wat], [160, 160, 160], [4, 4, 4]) eq_(s.dimensions['molecule'], 160 * 3) eq_(s.dimensions['atom'], 160 * 5)