def to_sql(self, sess: Session): source_id = add_dataset(sess, self.origin) add_props(sess, self.properties) mols = Molecules(sess) df = self.to_df() row_count, _ = df.shape for _, row in tqdm(df.iterrows(), total=row_count, unit=' row'): mols.add(source_id, row.smiles, row.to_dict()) mols.commit()
def to_sql(self, sess: Session): source_id = add_dataset(sess, self.origin) add_props(sess, self.properties) mols = Molecules(sess) for row in tqdm(self._generate(), total=len(new_client.molecule), unit=' row'): smiles, props = row mols.add(source_id, smiles, props)
def to_sql(self, sess: Session): source_id = add_dataset(sess, self.origin) add_props(sess, self.props) mols = Molecules(sess) mols.add(source_id, 'CN1CCC[C@H]1c2cccnc2', {'Tag': 'Test'}, PartitionCategory.Unspecific) mols.add(source_id, 'O1C=C[C@H]([C@H]1O2)c3c2cc(OC)c4c3OC(=O)C5=C4CCC(=O)5', { 'Tag': ['Test1', 'Test2'], 'NR-AR': 1.0 }, PartitionCategory.Verify) mols.commit()
def to_sql(self, sess: Session): source_id = add_dataset(sess, self.origin) add_props(sess, self.properties) mols = Molecules(sess) df = self.to_df() row_count, _ = df.shape for _, row in tqdm(df.iterrows(), total=row_count, unit=' row'): if row.SPLIT == 'train': partition = PartitionCategory.Train elif row.SPLIT == 'test': partition = PartitionCategory.Test else: partition = PartitionCategory.Unspecific mols.add(source_id, row.SMILES, {'Tag': 'MOSES'}, partition) mols.commit()