Пример #1
0
def test_map():
    coords = [np.random.rand(10, 3) for i in range(10)]
    t = np.arange(0, 10, 0.1)
    traj = Trajectory(coords, t)
    
    summed_coords = traj.map(np.sum, attributes="coords")
    print np.array(list(summed_coords))
Пример #2
0
def test_attributes():
    coords = [np.random.rand(10, 3) for i in range(10)]
    t = np.arange(0, 10, 0.1)
    traj = Trajectory(coords, t)
    system = System.from_arrays(r_array=coords[0])

    system.update(traj.at(1))
    npeq_(system.r_array, coords[1])
Пример #3
0
def test_attributes():
    coords = [np.random.rand(10, 3) for i in range(10)]
    t = np.arange(0, 10, 0.1)
    traj = Trajectory(coords, t)
    system = System.from_arrays(r_array=coords[0])
    
    system.update(traj.at(1))    
    npeq_(system.r_array, coords[1])
Пример #4
0
def test_init():
    coords = [np.random.rand(10, 3) for i in range(10)]
    t = np.arange(0, 10, 0.1)

    traj = Trajectory(coords, t)
    npeq_(traj.at(1)["coords"], coords[1])
Пример #5
0
def test_init():    
    coords = [np.random.rand(10, 3) for i in range(10)]
    t = np.arange(0, 10, 0.1)
    
    traj = Trajectory(coords, t)
    npeq_(traj.at(1)["coords"], coords[1])