コード例 #1
0
ファイル: outputs.py プロジェクト: robinzyb/i-pi
    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.OutputList(
            "i-pi",
            [
                eoutputs.PropertyOutput(
                    filename="md",
                    stride=10,
                    outlist=[
                        "time",
                        "step",
                        "conserved",
                        "temperature",
                        "potential",
                        "kinetic_cv",
                    ],
                ),
                eoutputs.TrajectoryOutput(
                    filename="pos", stride=100, what="positions",
                    format="xyz"),
                eoutputs.CheckpointOutput(
                    filename="checkpoint", stride=1000, overwrite=True),
            ],
        )
コード例 #2
0
    def fetch(self):
        """Returns a list of the output objects included in this dynamic
        container.

        Returns:
           A list of tuples, with each tuple being of the form ('type', 'object')
           where 'type' is the type of output object and 'object' is a particular
           object of that type.
        """

        super(InputOutputs, self).fetch()
        outlist = eoutputs.OutputList(self.prefix.fetch(),  [p.fetch() for (n, p) in self.extra])

        return outlist