def test_iterload_and_load_remd(): # iterload_remd traj = pt.iterload_remd(fn("Test_RemdTraj/rem.nc.000"), fn("Test_RemdTraj/ala2.99sb.mbondi2.parm7"), T=300.0) for frame in traj: assert frame.temperature == 300.0, 'frame temperature must be 300.0 K' dist = pt.distance(traj, '@10 @20') trajin_text = ''' parm {} trajin {} remdtraj remdtrajtemp 300. distance @10 @20 '''.format(fn('Test_RemdTraj/ala2.99sb.mbondi2.parm7'), fn('Test_RemdTraj/rem.nc.000 ')) state = pt.load_cpptraj_state(trajin_text) state.run() aa_eq(dist, state.data[-1].values) # load_remd traj2 = pt.load_remd(fn("Test_RemdTraj/rem.nc.000"), fn("Test_RemdTraj/ala2.99sb.mbondi2.parm7"), T=300.0) aa_eq(traj.xyz, traj2.xyz) # with Topology traj2 = pt.iterload_remd(fn("Test_RemdTraj/rem.nc.000"), top=traj.top, T=300.0) aa_eq(traj.xyz, traj2.xyz)
def test_iterload_and_load_remd(self): # iterload_remd traj = pt.iterload_remd("data/Test_RemdTraj/rem.nc.000", "data/Test_RemdTraj/ala2.99sb.mbondi2.parm7", T=300.0) for frame in traj: assert frame.temperature == 300.0, 'frame temperature must be 300.0 K' dist = pt.distance(traj, '@10 @20') state = pt.load_cpptraj_state(self.trajin_text) state.run() aa_eq(dist, state.data[-1]) # load_remd traj2 = pt.load_remd("data/Test_RemdTraj/rem.nc.000", "data/Test_RemdTraj/ala2.99sb.mbondi2.parm7", T=300.0) aa_eq(traj.xyz, traj2.xyz) # with Topology traj2 = pt.iterload_remd("data/Test_RemdTraj/rem.nc.000", top=traj.top, T=300.0) aa_eq(traj.xyz, traj2.xyz)