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

Issue converting CG dcd to all atom dcd using the "Martini+cg2all.ipynb" #117

Open
kabirbiswas opened this issue Aug 8, 2024 · 1 comment

Comments

@kabirbiswas
Copy link

Really appreciate your efforts towards to writing all the colab notebooks.

While running the , I encountered the following error during conversion of the CG dcd to all atom dcd using the "Martini+cg2all.ipynb". Would you please suggest any specific changes to the notebook for getting this step to work? Note that script suggestions by Google Gemini did not work.

Error text:

CalledProcessError Traceback (most recent call last)

in <cell line: 1>()
----> 1 get_ipython().run_cell_magic('bash', '', '\nmamba activate cg2all\npython\nimport cg2all.lib.libmodel\nfrom cg2all.lib.libconfig import MODEL_HOME\nfor model_type in ["Martini", "Martini3",]:\n ckpt_fn = MODEL_HOME / f"{model_type}.ckpt"\n if not ckpt_fn.exists():\n cg2all.lib.libmodel.download_ckpt_file(model_type, ckpt_fn)\n\nimport os\nimport subprocess\nimport sys\n\nGoogle_Drive_Path = '/content/drive/MyDrive/CG-MD-sim/mNG-flex-NLuc-02' #@param {type:"string"}\nworkDir = Google_Drive_Path\nJobname = "mNG-flex-NLuc" #@param {type: "string"}\n\nCoarse_grained_model = "Martini3" #@param ["Martini", "Martini3"]\n\nbatch_size = 1 #@param {type: "number"}\n#@markdown - Batch size should be a divisor of the total number of frames.\n# device = "cuda" #@param ["cpu", "cuda"]\n\ntraj_input = os.path.join(workDir, str(Jobname) + "_cg_nw.dcd")\npdb_input = os.path.join(workDir, str(Jobname) + "_nw.pdb")\npdb_ini_output = os.path.join(workDir, str(Jobname) + "_frame0_backmapped.pdb")\ntraj_output = os.path.join(workDir, str(Jobname) + "_backmapped.dcd")\npdb_output = os.path.join(workDir, str(Jobname) + "_backmapped.pdb")\nbackmap_align_dcd = os.path.join(workDir, str(Jobname) + "_backmapped_align.dcd")\nbackmap_align_pdb = os.path.join(workDir, str(Jobname) + "_backmapped_align.pdb")\n\nsubprocess.run("convert_cg2all -p " + str(...

4 frames

in shebang(self, line, cell)

/usr/local/lib/python3.10/dist-packages/IPython/core/magics/script.py in shebang(self, line, cell)
243 sys.stderr.flush()
244 if args.raise_error and p.returncode!=0:
--> 245 raise CalledProcessError(p.returncode, cell, output=out, stderr=err)
246
247 def _run_script(self, p, cell, to_close):

CalledProcessError: Command 'b'\nmamba activate cg2all\npython\nimport cg2all.lib.libmodel\nfrom cg2all.lib.libconfig import MODEL_HOME\nfor model_type in ["Martini", "Martini3",]:\n ckpt_fn = MODEL_HOME / f"{model_type}.ckpt"\n if not ckpt_fn.exists():\n cg2all.lib.libmodel.download_ckpt_file(model_type, ckpt_fn)\n\nimport os\nimport subprocess\nimport sys\n\nGoogle_Drive_Path = '/content/drive/MyDrive/CG-MD-sim/mNG-flex-NLuc-02' #@param {type:"string"}\nworkDir = Google_Drive_Path\nJobname = "mNG-flex-NLuc" #@param {type: "string"}\n\nCoarse_grained_model = "Martini3" #@param ["Martini", "Martini3"]\n\nbatch_size = 1 #@param {type: "number"}\n#@markdown - Batch size should be a divisor of the total number of frames.\n# device = "cuda" #@param ["cpu", "cuda"]\n\ntraj_input = os.path.join(workDir, str(Jobname) + "_cg_nw.dcd")\npdb_input = os.path.join(workDir, str(Jobname) + "_nw.pdb")\npdb_ini_output = os.path.join(workDir, str(Jobname) + "_frame0_backmapped.pdb")\ntraj_output = os.path.join(workDir, str(Jobname) + "_backmapped.dcd")\npdb_output = os.path.join(workDir, str(Jobname) + "_backmapped.pdb")\nbackmap_align_dcd = os.path.join(workDir, str(Jobname) + "_backmapped_align.dcd")\nbackmap_align_pdb = os.path.join(workDir, str(Jobname) + "_backmapped_align.pdb")\n\nsubprocess.run("convert_cg2all -p " + str(pdb_input) + " -o " + str(pdb_ini_output) + " --cg " + str(Coarse_grained_model), shell=True)\nsubprocess.run("convert_cg2all -p " + ...

@pablo-arantes
Copy link
Owner

Hi @kabirbiswas

Thank you for letting me know about the issue.
I will check and back to you.

Best,

Pablo

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