Exemple #1
0
    def make_default(cls):
        """Used to make the default value of the outputs class for use when no
        output is specified.

        Needed since this is a fairly complicated default, with many mutable
        objects, and the default has to be generated by a function that does not
        use any mutable objects as arguments.
        """

        return [
            eoutputs.PropertyOutput(filename="i-pi.md",
                                    stride=10,
                                    outlist=[
                                        "time", "step", "conserved",
                                        "temperature", "potential",
                                        "kinetic_cv"
                                    ]),
            eoutputs.TrajectoryOutput(filename="i-pi.pos",
                                      stride=100,
                                      what="positions",
                                      format="xyz"),
            eoutputs.CheckpointOutput(filename="i-pi.checkpoint",
                                      stride=1000,
                                      overwrite=True)
        ]
Exemple #2
0
    def fetch(self):
        """Returns a TrajectoryOutput object."""

        return eoutputs.TrajectoryOutput(filename=self.filename.fetch(),
                                         stride=self.stride.fetch(),
                                         flush=self.flush.fetch(),
                                         what=super(InputTrajectory,
                                                    self).fetch(),
                                         format=self.format.fetch(),
                                         cell_units=self.cell_units.fetch(),
                                         ibead=self.bead.fetch())