Standard Pretrained Models
LSTM LM
Models based on LSTM_LM
class
vocab = CharacterVocab(SMILES_CHAR_VOCAB)
model = lstm_lm_small(vocab)
assert isinstance(model, nn.Module)
model = lstm_lm_large(vocab)
assert isinstance(model, nn.Module)
agent = LSTM_LM_Small_ZINC()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent.reload_weights()
agent = LSTM_LM_Large_ZINC()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent.reload_weights()
agent = LSTM_LM_Small_Chembl()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = LSTM_LM_Small_ZINC_NC()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = LSTM_LM_Small_Chembl_NC()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = LSTM_LM_Small_ZINC_Selfies()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = LSTM_LM_Small_Chembl_Selfies()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = LSTM_LM_Small_Rgroup()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = LSTM_LM_Small_Linkers()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = LSTM_LM_Small_Linkers_Mapped()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = LSTM_LM_Small_Swissprot()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
proteins = to_protein(smiles)
proteins = [i for i in proteins if i is not None]
assert len(proteins)>80
agent = LSTM_LM_Small_PI1M()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = LSTM_LM_Small_HGenome()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_dnas(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = LSTM_LM_Small_HGenome_3Mer()
preds, _ = agent.model.sample_no_grad(100, 33)
smiles = agent.reconstruct(preds)
mols = to_dnas(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
Conditional LSTM LM
Models based on Conditional_LSTM_LM
vocab = CharacterVocab(SMILES_CHAR_VOCAB)
model = mlp_cond_lstm_small(vocab)
assert isinstance(model, nn.Module)
model = mlp_cond_lstm_large(vocab)
assert isinstance(model, nn.Module)
agent = FP_Cond_LSTM_LM_Small_ZINC()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = FP_Cond_LSTM_LM_Small_ZINC_Selfies()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = FP_Cond_LSTM_LM_Small_Chembl()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
VAE
Models based on VAE
vocab = CharacterVocab(SMILES_CHAR_VOCAB)
model = mlp_vae(vocab)
assert isinstance(model, nn.Module)
model = conv_vae(vocab)
assert isinstance(model, nn.Module)
model = lstm_vae(vocab)
assert isinstance(model, nn.Module)
agent = FP_VAE_ZINC()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = FP_VAE_Chembl()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80
agent = FP_VAE_ZINC_Selfies()
preds, _ = agent.model.sample_no_grad(100, 100)
smiles = agent.reconstruct(preds)
mols = to_mols(smiles)
mols = [i for i in mols if i is not None]
assert len(mols)>80