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

No adduct generation #29

Open
samuelcajahuaringa opened this issue Mar 9, 2024 · 4 comments
Open

No adduct generation #29

samuelcajahuaringa opened this issue Mar 9, 2024 · 4 comments

Comments

@samuelcajahuaringa
Copy link

Hello Isicle developers,

I try to reproduce the example of collision cross section. The Isicle was installed correctly according to the message

Requirement already satisfied: certifi>=2017.4.17 in /home/oscar.macollunco/anaconda3/envs/isicle/lib/python3.9/site-packages (from requests->snakemake>=6.3.0->isicle==2.0.0) (2024.2.2)
Requirement already satisfied: smmap<6,>=3.0.1 in /home/oscar.macollunco/anaconda3/envs/isicle/lib/python3.9/site-packages (from gitdb<5,>=4.0.1->gitpython->snakemake>=6.3.0->isicle==2.0.0) (5.0.0)
Requirement already satisfied: platformdirs>=2.5 in /home/oscar.macollunco/anaconda3/envs/isicle/lib/python3.9/site-packages (from jupyter-core->nbformat->snakemake>=6.3.0->isicle==2.0.0) (4.2.0)
Installing collected packages: isicle
  Running setup.py develop for isicle
Successfully installed isicle-2.0.0

the structure of example is dimethylglycine.mol

 OpenBabel03092420292D

 16 15  0  0  0  0  0  0  0  0999 V2000
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  1  8  1  0  0  0  0
  1  9  1  0  0  0  0
  1 10  1  0  0  0  0
  2  3  1  0  0  0  0
  2  4  1  0  0  0  0
  3 11  1  0  0  0  0
  3 12  1  0  0  0  0
  3 13  1  0  0  0  0
  4  5  1  0  0  0  0
  4 14  1  0  0  0  0
  4 15  1  0  0  0  0
  5  6  2  0  0  0  0
  5  7  1  0  0  0  0
  7 16  1  0  0  0  0
M  END

I am trying to get started using isicle but im running into an issue when following the CCS example presented here.

(isicle) oscar.macollunco@sorgan-cpu6:~/isicle$ python
Python 3.9.18 | packaged by conda-forge | (main, Dec 23 2023, 16:33:10) 
[GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import isicle
>>> geom = isicle.io.load('dimethylglycine.mol')
>>> geom = geom.initial_optimize(embed=True)
>>> adducts = geom.ionize(method = 'explicit', ion_list = ['H+'], element_list = ['O', 'N'])
>>> adducts = isicle.io.load('ccs_adducts.joblib')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/oscar.macollunco/isicle/isicle/io.py", line 465, in load
    return load_joblib(path)
  File "/home/oscar.macollunco/isicle/isicle/io.py", line 384, in load_joblib
    with open(path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'ccs_adducts.joblib'
>>> 

where i found the 'ccs_adducts.joblib' that is a job submission file? can you send me a example.

Any help would be much appreciated.

@smcolby
Copy link
Collaborator

smcolby commented Mar 15, 2024

The line adducts = geom.ionize(method = 'explicit', ion_list = ['H+'], element_list = ['O', 'N']) will have generated possible adducts. Downstream activities would include conformational sampling by molecular dynamics, conformer downselection, density functional theory-based geometry optimization, and, finally, CCS prediction.

These tasks have all been developed as snakemake and nextflow workflows, which you found. However, these are intended to be run outside the ISiCLE API. For example, snakemake is invoked as snakemake --snakefile PATH {ARGS}.

We currently do not have documentation detailing the workflow usage, so I would encourage you to familiarize yourself with snakemake and/or nextflow documentation.

@samuelcajahuaringa
Copy link
Author

Thanks for the advice @smcolby, if possible use the ccs.nf to test that example, the ccs.bf file that is found in workflows/ccs/nextflow-local/ccs.nf.

@samuelcajahuaringa
Copy link
Author

samuelcajahuaringa commented Mar 25, 2024

Hello isicle developers

I have installed nextflow and I try to use ccs.nf file but I have the follow problem:

(isicle) oscar.macollunco@sorgan-cpu6:~/isicle/workflows/ccs/nextflow-local$ nextflow run ccs.nf -config nextflow.config
N E X T F L O W ~ version 23.10.1
Launching ccs.nf [loving_pauling] DSL2 - revision: 94cf33a3b4
executor > local (1)
[b2/140a44] process > adducts (1) [100%] 1 of 1, failed: 1 ✘
[- ] process > conformers -
[- ] process > dft -
[- ] process > mobility -
ERROR ~ Error executing process > 'adducts (1)'

Caused by:
Missing output file(s) *.joblib expected by process adducts (1)

Command executed:

#!/usr/bin/env python3
import isicle
import yaml
import os
import sys
from os.path import *

cwd = "/home/oscar.macollunco/isicle/workflows/ccs/nextflow-local"
with open(f"{cwd}/config.yaml", "r") as f:
config = yaml.load(f, Loader=yaml.FullLoader)

geom = isicle.io.load("dimethylglycine.mol")
geom = geom.initial_optimize(embed=True)

adducts = geom.ionize(ion_list=config['adducts']['ion_list'],
element_list=config['adducts']['element_list'],
method=config['adducts']['method'])

for add in adducts.adducts:
output_path = f'{add.basename}{add.ion}{add.adductID}.joblib'
isicle.io.save(output_path, add)

Command exit status:
0

Command output:
(empty)

Work dir:
/home/oscar.macollunco/isicle/workflows/ccs/nextflow-local/work/b2/140a44e0830fd74b84d4de9ef53d4d

Tip: when you have fixed the problem you can continue the execution adding the option -resume to the run command line

-- Check '.nextflow.log' file for details

again is the joblib file,

Any help would be much appreciated.

@smcolby
Copy link
Collaborator

smcolby commented Apr 15, 2024

I am actually not familiar with NextFlow (I've used Snakemake). I'm copying @jessbade here, as she has more experience with NextFlow.

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

2 participants