Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unintentional loop about calc.pandas #78

Open
hori1537 opened this issue Oct 10, 2019 · 0 comments
Open

Unintentional loop about calc.pandas #78

hori1537 opened this issue Oct 10, 2019 · 0 comments

Comments

@hori1537
Copy link

hori1537 commented Oct 10, 2019

description

--
test.py
import pandas as pd
from mordred import descriptors, Calculator
from rdkit import Chem

i = 0
print('program start')
i += 1
print(i)

def fit_by_mordred():
print('start the def_xxxx')
df_mordred=pd.DataFrame({ 'smiles' : ['C', 'CC', 'CCC'],
'name' : ['a', 'b', 'C'],
'value' : [1,2,3,] })

df_mordred=pd.DataFrame({   'smiles' : ['C'],
                            'name'   : ['a'],
                            'value'  : [1] })

def apply_molfromsmiles(smiles_name):
    mols = Chem.MolFromSmiles(smiles_name)
    return mols

df_mordred['mols'] = df_mordred['smiles'].map(apply_molfromsmiles)
#print(df_mordred)


calc =Calculator(descriptors, ignore_3D = True)
print('before calc.pandas')
X = calc.pandas(df_mordred['mols']).astype('float').dropna(axis = 1)
print('after calc.pandas')

if name == "main":
fit_by_mordred()

--

--
results
program start
1
start the def_xxxx
before calc.pandas
program start
1
program start
1
program start
1
program start
1
0%| | 0/1 [00:00<?, ?it/s]program start
1
100%|██████████████████████████████████████████████| 1/1 [00:00<00:00, 4.10it/s]
after calc.pandas

--

environment

OS/distribution

Windows 10

conda or pip

pip

python version

Please execute the command and paste result.

python 3.7.4

library version

Please execute the command and paste result.

  • pip

mordred 1.2.0
tensorflow 2.0.0

  • conda
    absl-py 0.8.0
    astor 0.8.0
    backcall 0.1.0
    blas 1.0 mkl
    ca-certificates 2019.8.28 0
    cairo 1.14.12 hf171d8a_3
    category-encoders 2.1.0
    certifi 2019.9.11 py37_0
    chainer 6.4.0
    chainer-chemistry 0.6.0
    colorama 0.4.1
    cycler 0.10.0
    decorator 4.4.0
    filelock 3.0.12
    freetype 2.9.1 ha9979f8_1
    gast 0.2.2
    google-pasta 0.1.7
    grpcio 1.24.1
    h5py 2.10.0
    icc_rt 2019.0.0 h0cc432a_1
    icu 58.2 ha66f8fd_1
    intel-openmp 2019.4 245
    ipython 7.8.0
    ipython-genutils 0.2.0
    jedi 0.15.1
    joblib 0.14.0
    jpeg 9b hb83a4c4_2
    Keras 2.3.1
    Keras-Applications 1.0.8
    Keras-Preprocessing 1.1.0
    kiwisolver 1.1.0
    libboost 1.67.0 hd9e427e_4
    libpng 1.6.37 h2a8f88b_0
    libtiff 4.0.10 hb898794_2
    Markdown 3.1.1
    matplotlib 3.1.1
    mkl 2019.4 245
    mkl-service 2.3.0 py37hb782905_0
    mkl_fft 1.0.14 py37h14836fe_0
    mkl_random 1.1.0 py37h675688f_0
    mordred 1.2.0
    networkx 2.3
    numpy 1.16.5 py37h19fb1c0_0
    numpy-base 1.16.5 py37hc3f5095_0
    olefile 0.46 py37_0
    openssl 1.1.1d he774522_2
    opt-einsum 3.1.0
    pandas 0.25.1 py37ha925a31_0
    parso 0.5.1
    patsy 0.5.1
    pickleshare 0.7.5
    pillow 6.2.0 py37hdc69c19_0
    pip 19.2.3 py37_0
    pixman 0.38.0 he774522_0
    prompt-toolkit 2.0.10
    protobuf 3.7.1
    PubChemPy 1.0.4
    py-boost 1.67.0 py37h8300f20_4
    Pygments 2.4.2
    pyparsing 2.4.2
    python 3.7.4 h5263a28_0
    python-dateutil 2.8.0 py37_0
    pytz 2019.3 py_0
    PyYAML 5.1.2
    rdkit 2019.03.4.0 py37hc1e3ae0_1 rdkit
    scikit-learn 0.21.3
    scipy 1.3.1
    setuptools 41.4.0 py37_0
    six 1.12.0 py37_0
    sqlite 3.30.0 he774522_0
    statsmodels 0.10.1
    tensorboard 2.0.0
    tensorflow 2.0.0
    tensorflow-estimator 2.0.0
    termcolor 1.1.0
    tk 8.6.8 hfa6e2cd_0
    tqdm 4.36.1
    traitlets 4.3.3
    typing 3.7.4.1
    typing-extensions 3.6.6
    vc 14.1 h0510ff6_4
    vs2015_runtime 14.16.27012 hf0eaf9b_0
    wcwidth 0.1.7
    Werkzeug 0.16.0
    wheel 0.33.6 py37_0
    wincertstore 0.2 py37_0
    wrapt 1.11.2
    xz 5.2.4 h2fa13f4_4
    zlib 1.2.11 h62dcd97_3
    zstd 1.3.7 h508b16e_0
@hori1537 hori1537 changed the title Error about calc.pandas Unintentional loop about calc.pandas Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant