Beispiel #1
0
def mapper_from_yaml(yamlfilename):
    import yaml
    ydict = yaml.load(open(yamlfilename, 'rt'))
    ybins = ydict['bins']
    from westpa._rc import bins_from_yaml_dict
    #return mapper_from_dict(ybins)
    return bins_from_yaml_dict(ybins)
Beispiel #2
0
def mapper_from_yaml(yamlfilename):
    import yaml
    ydict = yaml.load(open(yamlfilename, 'rt'))
    ybins = ydict['bins']
    from westpa._rc import bins_from_yaml_dict
    #return mapper_from_dict(ybins)
    return bins_from_yaml_dict(ybins)
Beispiel #3
0
    def load_config_from_west(self, scheme):
        try:
            config = westpa.rc.config['west']['analysis']
        except:
            raise ValueError('There is no configuration file specified.')
        ystates = config['analysis_schemes'][scheme]['states']
        self.states_from_dict(ystates)
        try:
            self.subsample = config['subsample']
        except:
            pass
        from westpa._rc import bins_from_yaml_dict
        self.binning.mapper = bins_from_yaml_dict(
            config['analysis_schemes'][scheme]['bins'][0])
        import os
        path = os.path.join(os.getcwd(), config['directory'], scheme)
        try:
            os.mkdir(config['directory'])
            os.mkdir(path)
        except:
            pass

        self.output_filename = os.path.join(path, 'assign.h5')