Exemplo n.º 1
0
    def save(self, output):
        """
        save the results to file

        Parameters:
        -----------
        output : str
            output filename (.h5)
        """

        # Serialize metric used to calculate tICA input.
        metric_string = cPickle.dumps(self.prep_metric)

        io.saveh(output, timelag_corr_mat=self.timelag_corr_mat,
                 cov_mat=self.cov_mat, lag=np.array([self.lag]), vals=self.vals,
                 vecs=self.vecs, metric_string=np.array([metric_string]))
Exemplo n.º 2
0
    def save(self, output):
        """
        save the results to file

        Parameters:
        -----------
        output : str
            output filename (.h5)
        """

        # Serialize metric used to calculate tICA input.
        metric_string = cPickle.dumps(self.prep_metric)

        io.saveh(output, timelag_corr_mat=self.timelag_corr_mat,
                 cov_mat=self.cov_mat, lag=np.array([self.lag]), vals=self.vals,
                 vecs=self.vecs, metric_string=np.array([metric_string]))
Exemplo n.º 3
0
def test_pickle():
    # test pickling of topology (bug #391)
    cPickle.loads(cPickle.dumps(md.load(get_fn('bpti.pdb')).topology))