def reset(self): genericmodel.__init__(self, self.id, [], [], {}, {}) self.alpha = [] if 'sigma' not in self.params.keys(): self.params['sigma'] = 0.1 if 'lamda' not in self.params.keys(): self.params['lamda'] = 0.0001 if not 'two_body_scaling' in self.params: self.params['two_body_scaling'] = np.sqrt(8) if not 'three_body_scaling' in self.params: self.params['three_body_scaling'] = 1.6 if not 'two_body_width' in self.params: self.params['two_body_width'] = 0.2 if not 'three_body_width' in self.params: self.params['three_body_width'] = np.pi if not 'two_body_power' in self.params: self.params['two_body_power'] = 4.0 if not 'three_body_power' in self.params: self.params['three_body_power'] = 2.0 if not 'cut_start' in self.params: self.params['cut_start'] = 1.0 if not 'alchemy_period_width' in self.params: self.params['alchemy_period_width'] = 1.6 if not 'alchemy_group_width' in self.params: self.params['alchemy_group_width'] = 1.6
def reset(self): genericmodel.__init__(self, self.id, [], [], {}, {}) self.alpha = [] if 'sigma' not in self.params.keys(): self.params['sigma'] = 0.1 if 'lamda' not in self.params.keys(): self.params['lamda'] = 0.0001
def __init__(self, id='KRRmodel', x=[], y=[], params={}, model_args={}): genericmodel.__init__(self, id, x, y, params, model_args) self.alpha = [] if 'sigma' not in self.params.keys(): self.params['sigma'] = 0.1 if 'lamda' not in self.params.keys(): self.params['lamda'] = 0.0001
def __init__(self, mol_order, id='TFMmodel', x=[], y=[], r=[], files=[], params={}, model_args={}): torch.cuda.empty_cache() genericmodel.__init__(self, id, x, y, params, model_args) self.r = r self.molfiles = files self.mol_order = mol_order self.N_atypes = [5, 10, 15] self.N_btypes = [30, 33, 33] self.N_ttypes = [23, 79] self.N_qtypes = [40] if len(x) > 0: with gzip.open(self.train_x[0], "rb") as f: train_dataset = TensorDataset(*pickle.load(f)) self.N_atypes = [ int(train_dataset.tensors[1][:, :, i].max()) for i in range(3) ] # Atom hierarchy has 3 levels self.N_btypes = [ int(train_dataset.tensors[3][:, :, i].max()) for i in range(3) ] # Bond hierarchy has 3 levels self.N_ttypes = [ int(train_dataset.tensors[5][:, :, i].max()) for i in range(2) ] # Triplet hierarchy has 2 levels self.N_qtypes = [ int(train_dataset.tensors[7][:, :, i].max()) for i in range(1) ] # Quad hierarchy has only 1 level
def __init__(self, id='FCHLmodel', x=[], y=[], params={}, model_args={}): genericmodel.__init__(self, id, x, y, params, model_args) if not 'cutoff' in self.params: self.params['cutoff'] = 5.0 if not 'two_body_scaling' in self.params: self.params['two_body_scaling'] = np.sqrt(8) if not 'three_body_scaling' in self.params: self.params['three_body_scaling'] = 1.6 if not 'two_body_width' in self.params: self.params['two_body_width'] = 0.2 if not 'three_body_width' in self.params: self.params['three_body_width'] = np.pi if not 'two_body_power' in self.params: self.params['two_body_power'] = 4.0 if not 'three_body_power' in self.params: self.params['three_body_power'] = 2.0 if not 'cut_start' in self.params: self.params['cut_start'] = 1.0 if not 'alchemy_period_width' in self.params: self.params['alchemy_period_width'] = 1.6 if not 'alchemy_group_width' in self.params: self.params['alchemy_group_width'] =1.6
def __init__(self, id='FCHLmodel', x=[], y=[], params={}, model_args={}): genericmodel.__init__(self, id, x, y, params, model_args) self.check_params()
def __init__(self, id='NNmodel', x=[], y=[], params={}, model_args={}): genericmodel.__init__(self, id, x, y, params, model_args)
def __init__(self, id='KRRmodel', x=[], y=[], params={}, model_args={}): genericmodel.__init__(self, id, x, y, params, model_args) self.alpha = []