are you me?    id passwd

status  

 sleepy

picture

 

 thinking

calender

PyTorch vs Tensorflow - 컴퓨터

Unexpected differences

>>> a=np.random.rand(500,500)
>>> b=tf.pow(tf.constant(a, tf.float32),2)
>>> c=torch.pow(torch.tensor(a, dtype=torch.float32),2)
>>> np.sum(b.numpy()-c.numpy())
3.87448e-06

written time : 2020-09-08 12:25:36.0

axel instead of wget - 컴퓨터

ref: https://stackoverflow.com/questions/3430810/multiple-simultaneous-downloads-using-wget

on Ubuntu

sudo apt-get install axel
axel -n NUMBER_OF_CONNECTIONS URL

written time : 2020-09-02 16:35:28.0

Molecular embedding from sdf(3D) - 컴퓨터

ref: https://www.rdkit.org/docs/GettingStartedInPython.html
ref: https://github.com/keiserlab/e3fp
ref: https://github.com/CanisW/TF3P/blob/master/data/utils.py

. prerequisites
rdkit : https://www.rdkit.org/docs/index.html
 > import rdkit.Chem as Chem
 > from rdkit.Chem import AllChem
e3fp : pip install e3fp
 > from e3fp.fingerprint.generate import fprints_dict_from_mol

. input: sdf (3D) to mol
 - text sdf
 > suppl = Chem.SDMolSupplier(/path_to_sdf)
 > mol = suppl[0]
 - binary sdf
 > inf = open(/path_to_sdf,'rb')
 > fsuppl = Chem.ForwardSDMolSupplier(inf)
 - zip sdf (import gzip)
 > inf = gzip.open('/path_to_sdf.gz')
 > fsuppl = Chem.ForwardSDMolSupplier(inf)
 * fsuppl is not randomly accessed
 example)
 for mol in fsuppl: 
   ... use "mol" ...

. output (previous researches)
 - ECFP: ecfp_obj = AllChem.GetMorganFingerprintAsBitVect(mol, 2, nBits=nBits)
 - MACCSKey: macc_obj = AllChem.GetMACCSKeysFingerprint(mol)
 - E3FP: e3fp_obj = fprints_dict_from_mol(mol, bits=nBits)[5][0].to_rdkit()

written time : 2020-09-02 11:16:46.0
...  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |  ...