Ejemplo n.º 1
0
    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
Ejemplo n.º 2
0
	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
Ejemplo n.º 3
0
	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
Ejemplo n.º 4
0
    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
Ejemplo n.º 5
0
	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
Ejemplo n.º 6
0
 def __init__(self, id='FCHLmodel', x=[], y=[], params={}, model_args={}):
     genericmodel.__init__(self, id, x, y, params, model_args)
     self.check_params()
Ejemplo n.º 7
0
 def __init__(self, id='NNmodel', x=[], y=[], params={}, model_args={}):
     genericmodel.__init__(self, id, x, y, params, model_args)
Ejemplo n.º 8
0
 def __init__(self, id='KRRmodel', x=[], y=[], params={}, model_args={}):
     genericmodel.__init__(self, id, x, y, params, model_args)
     self.alpha = []