Example #1
0
 def __init__(self, engine):
     descriptor = SnapshotDescriptor.construct(
         snapshot_class=engine.InternalizedSnapshotClass,
         snapshot_dimensions=engine.descriptor._dimensions)
     self.engine = engine
     super(_InternalizedEngineProxy, self).__init__(options={},
                                                    descriptor=descriptor)
 def setup(self):
     self.descriptor = SnapshotDescriptor.construct(
         snapshot_class=ToySnapshot,
         snapshot_dimensions={
             'n_spatial': 1,
             'n_atoms': 1
         })
     slow_options = {
         'n_frames_max': 10000,
         'engine_sleep': 100,
         'name_prefix': "test",
         'engine_directory': engine_dir
     }
     fast_options = {
         'n_frames_max': 10000,
         'engine_sleep': 0,
         'name_prefix': "test",
         'engine_directory': engine_dir
     }
     self.template = peng.toy.Snapshot(coordinates=np.array([[0.0]]),
                                       velocities=np.array([[1.0]]))
     self.slow_engine = ExampleExternalEngine(slow_options, self.descriptor,
                                              self.template)
     self.fast_engine = ExampleExternalEngine(fast_options, self.descriptor,
                                              self.template)
     self.ensemble = paths.LengthEnsemble(5)
Example #3
0
 def __init__(self, sequences, sleep_ms=0):
     self.sequences = sequences
     self.sleep_ms = sleep_ms
     self.descriptor = SnapshotDescriptor.construct(
         snapshot_class=ExternalMDSnapshot,
         snapshot_dimensions={
             'n_spatial': 2,
             'n_atoms': 1
         })
     self.internalized_engine = _InternalizedEngineProxy(self)
Example #4
0
 def __init__(self, gro):
     traj = md.load(gro)
     self.topology = MDTrajTopology(traj.topology)
     n_atoms = self.topology.n_atoms
     n_spatial = self.topology.n_spatial
     descriptor = SnapshotDescriptor.construct(
         snapshot_class=ExternalMDSnapshot,
         snapshot_dimensions={
             'n_spatial': n_spatial,
             'n_atoms': n_atoms
         })
     super(GroFileEngine, self).__init__(options={},
                                         descriptor=descriptor,
                                         template=None)