0

Most of the resources out there show how to use LAMMPS in Notepad++. I wanted to use LAMMPS in Jupyter notebook: from lammps import lammps, PyLammps lmp = lammps()

lmp.file("in.crack.lmp")

But I don't know how to import the file (.lmp) such that the entire content of it pops up in the Jupyter interface like a csv file usually do. Any help or linking to an appropriate source will be highly appreciated.

sin cold
  • 11
  • 4
  • Are you using JupyterLab? It won't display types of files for which plugin viewers haven't been built. Some in the common data stack come installed, like CSV and TSV as you noticed. Others, such as [this](https://github.com/quigleyj97/jupyterlab-spreadsheet) were made by developers & can be installed as extensions. For your, `.Imp` file, you may be able to right-click on it & open it in JupyterLab's editor. Jupyter is mentioned in [the recent article on LAMMPS](https://www.sciencedirect.com/science/article/pii/S0010465521002836), but doesn't point to anything specially handling the input data. – Wayne Jun 07 '22 at 20:38
  • It looks like someone has done something in VScode, see [here](https://github.com/ThFriedrich/lammps_vscode). – Wayne Jun 07 '22 at 20:38
  • [Here](https://github.com/jupyterlab/jupyter-renderers) is a list of additional [Renderers and renderer extensions for JupyterLab](https://github.com/jupyterlab/jupyter-renderers) that are supported as part of the core JupyterLab-supported ecosystem. The page describes how they get installed. They have a mime renderer tutorial walking through creating a mime renderer extension which adds mp4 video rendering to JupyterLab [here](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html). Presumably that can be adapted to develop what you seek. – Wayne Jun 07 '22 at 20:53

0 Answers0