What's new? |
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
>>> 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
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)
&nb
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)
&nb