You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import numpy as np
from unimol_tools import UniMolRepr
# single smiles unimol representation
clf = UniMolRepr(data_type='molecule',
remove_hs=False,
model_name='unimolv1', # avaliable: unimolv1, unimolv2
model_size='84m', # work when model_name is unimolv2. avaliable: 84m, 164m, 310m, 570m, 1.1B.
)
smiles = 'CCCCCCCCC(CCCCCC)Cn1nc2c(-c3ccc(C)s3)c(F)c(F)c(-c3ccc(-c4cc5c(-c6ccc(CC(CC)CCCC)s6)c6sc(C)cc6c(-c6ccc(CC(CC)CCCC)s6)c5s4)s3)c2n1'
smiles_list = [smiles]
unimol_repr = clf.get_repr(smiles_list, return_atomic_reprs=True)
# CLS token repr
print(np.array(unimol_repr['cls_repr']).shape)
# atomic level repr, align with rdkit mol.GetAtoms()
print(np.array(unimol_repr['atomic_reprs']).shape)
运行这段代码,输出结果如下
2024-12-19 18:26:08 | unimol_tools/data/conformer.py | 126 | INFO | Uni-Mol Tools | Succeeded in generating conformers for 100.00% of molecules.
2024-12-19 18:26:08 | unimol_tools/data/conformer.py | 128 | INFO | Uni-Mol Tools | Succeeded in generating 3d conformers for 0.00% of molecules.
The text was updated successfully, but these errors were encountered:
It seems CCCCCCCCC(CCCCCC)Cn1nc2c(-c3ccc(C)s3)c(F)c(F)c(-c3ccc(-c4cc5c(-c6ccc(CC(CC)CCCC)s6)c6sc(C)cc6c(-c6ccc(CC(CC)CCCC)s6)c5s4)s3)c2n1 is to hard for rdkit with MMFF. you can use other methods for conformation generation, unimol-tools also support to fit with custom conformations with coordinates provided.
运行这段代码,输出结果如下
2024-12-19 18:26:08 | unimol_tools/data/conformer.py | 126 | INFO | Uni-Mol Tools | Succeeded in generating conformers for 100.00% of molecules.
2024-12-19 18:26:08 | unimol_tools/data/conformer.py | 128 | INFO | Uni-Mol Tools | Succeeded in generating 3d conformers for 0.00% of molecules.
The text was updated successfully, but these errors were encountered: