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

Deep modifications to adopt root users with a few new packages added #33

Merged
merged 26 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5cb4301
debian Dockerfile_revert to root
SinaMostafanejad Jul 11, 2023
b42de51
lammps-mamba141 Dockerfile and metadata
SinaMostafanejad Jul 11, 2023
2b1f89f
mendeleev045-mamba141 Dockerfile and metadata
SinaMostafanejad Jul 11, 2023
2b97bc4
update psi4-mamba Dockerfile and metadata
SinaMostafanejad Jul 11, 2023
5493ca3
updates metadata for debian slim base
SinaMostafanejad Jul 11, 2023
f6f3c4e
updates ase example
SinaMostafanejad Jul 11, 2023
c4cc8bc
adds lammps example
SinaMostafanejad Jul 11, 2023
2f69d94
adds lammps catalog page
SinaMostafanejad Jul 11, 2023
3e4dd78
adds mendeleev page
SinaMostafanejad Jul 11, 2023
28d7260
updates mopac example
SinaMostafanejad Jul 11, 2023
765882f
update psi4 example
SinaMostafanejad Jul 11, 2023
337f746
updates psi4-ase example
SinaMostafanejad Jul 11, 2023
ba779e4
update pyscf example
SinaMostafanejad Jul 11, 2023
af199a8
edits conf.py for adding buttons to dropdown menu
SinaMostafanejad Jul 11, 2023
6cce555
updates the installation page
SinaMostafanejad Jul 11, 2023
57bf897
updates the ase metadata
SinaMostafanejad Jul 11, 2023
b94169b
updates mopac metadata
SinaMostafanejad Jul 11, 2023
ccc4a99
updates psi4 metadata
SinaMostafanejad Jul 11, 2023
65d6e8c
updates pyscf metadata
SinaMostafanejad Jul 11, 2023
1fe9bce
updates mamba141 Dockerfile and metadata
SinaMostafanejad Jul 11, 2023
7404bcd
updates miscromamba Dockerfile and metadata
SinaMostafanejad Jul 11, 2023
b54d5a6
updates miniconda3 Dockerfile and metadata
SinaMostafanejad Jul 11, 2023
4e9ae17
updates datamol metadata
SinaMostafanejad Jul 11, 2023
7cb1672
updates pytorch201 Dockerfile and metadata
SinaMostafanejad Jul 11, 2023
05b58e9
updates torchani-ase Dockerfile and metadata
SinaMostafanejad Jul 11, 2023
f92b35c
updates torchani-ase-jupyter Dockerfile and metadata
SinaMostafanejad Jul 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions docs/compchem/ase_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ paste it into your terminal and edit it to look like the following command line

.. code-block:: bash

docker run --rm -w /home/molssi/temp -v .:/home/molssi/temp molssi/ase322-mamba141:latest /bin/bash -c "python test.inp"
docker run --rm -w /home -v $PWD:/home molssi/ase322-mamba141:latest /bin/bash -c "python test.inp"

then press Enter.

Expand All @@ -74,12 +74,6 @@ then press Enter.
from the host system to the running container by default. For further details see the Apptainer
`documentation <https://apptainer.org/docs/user/latest/quick_start.html#working-with-files>`_.

.. caution::

Ignore (usually many) wanings that you might get the first time a SIF file is being created.
This is because of Apptainer's `fakeroot <https://apptainer.org/docs/user/1.1/fakeroot.html>`_
feature which allows an unprivileged user to run containers as root by default.

If nothing goes wrong, you should see the following lines in your terminal

.. code-block:: bash
Expand All @@ -95,7 +89,7 @@ If nothing goes wrong, you should see the following lines in your terminal

.. code-block:: bash

docker run --rm -w /home/molssi/temp -v .:/home/molssi/temp molssi/ase322-mamba141:latest /bin/bash -c "python test.inp >> test.out"
docker run --rm -w /home -v $PWD:/home molssi/ase322-mamba141:latest /bin/bash -c "python test.inp >> test.out"

or

Expand Down
7 changes: 5 additions & 2 deletions docs/compchem/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ construct and run containerized computational chemistry software.

ase322-mamba141
ase_example
lammps-mamba141
lammps_example
mendeleev045-mamba141
mopac220-mamba141
mopac_example
psi4v180-mamba141-ase322
psi4-ase_example
psi4v180-mamba141
psi4_example
psi4v180-mamba141-ase322
psi4-ase_example
pyscf221-mamba141
pyscf_example
76 changes: 76 additions & 0 deletions docs/compchem/lammps-mamba141.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
.. _lammps_mamba141:

*********************************************************
{{ lammps_mamba141.hub_specifications[0]["Source"].split("/")[-1] }}
*********************************************************

{% set title = lammps_mamba141.get("name") %}

{{title}}
=========================================================

{% block content %}
{{ lammps_mamba141.description }}
{% endblock content %}

Source Specifications
=====================

{% block specifications %}
{% for dc in lammps_mamba141.source_specifications %}
{% for key, value in dc.items() %}
* **{{ key }}**: {{ value }}
{% endfor %}
{% endfor %}
{% endblock specifications %}

MolSSI Container Hub Specifications
===================================

{% block hub_specifications %}
{% for dc in lammps_mamba141.hub_specifications %}
{% for key, value in dc.items() %}
* **{{ key }}**: {{ value }}
{% endfor %}
{% endfor %}
{% endblock hub_specifications %}

* **Image pull command**:

.. code-block:: bash

{{ lammps_mamba141.docker_pull_command }}

* **Container run command**:

.. code-block:: bash

{{ lammps_mamba141.docker_run_command }}

{% block note %}
{% if lammps_mamba141.note != "" %}
.. note::

{{ lammps_mamba141.note }}
{% endif %}
{% endblock note %}

Image Specifications
====================

{% block image_specifications %}
{% for dc in lammps_mamba141.image_specifications %}
{% for key, value in dc.items() %}
{% if dc[key] is string or dc[key] == "" %}
* **{{ key }}**: {{ value }}
{% else %}
* **{{ key }}**:
{% for key2 in dc[key] %}
{% for key3, val3 in key2.items() %}
+ *{{ key3 }}*: {{ val3 }}
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endblock image_specifications %}
114 changes: 114 additions & 0 deletions docs/compchem/lammps_example.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
.. _lammps_example:

***************
LAMMPS: Example
***************

Here, we demonstrate the non-interactive usage of the LAMMPS image recipe.

Running LAMMPS Non-interactively
================================

First, let's create a temporary folder, ``temp`` in your **home** directory
and ``cd`` to it

.. code-block:: bash

mkdir ~/temp && cd ~/temp

Use your favorite text editor to create a new input file. Let's call it **in.lj**
and copy-paste the following code block into it and then, save it.

.. code-block:: python

# 1) Initialization
units lj
dimension 3
atom_style atomic
pair_style lj/cut 2.5
boundary p p p

# 2) System definition
region simulation_box block -20 20 -20 20 -20 20
create_box 2 simulation_box
create_atoms 1 random 1500 341341 simulation_box
create_atoms 2 random 100 127569 simulation_box

# 3) Simulation settings
mass 1 1
mass 2 1
pair_coeff 1 1 1.0 1.0
pair_coeff 2 2 0.5 3.0

# 4) Visualization
thermo 10

# 5) Run
minimize 1.0e-4 1.0e-6 1000 10000

This input file is borrowed from LAMMPS Tutorial
`page <https://lammpstutorials.github.io/sphinx/build/html/tutorials/lennardjones.html#the-input-script>`_
and intends to run a molecular dynamics simulation of a Lennard-Jones
binary fluid consisting of neutral dots with Langevin thermostat within the NVT ensemble.

At this stage, the content of your directory should look like the following

.. code-block:: bash

temp
└── in.lj

Let's copy the docker run command from the `catalog <https://molssi.github.io/molssi-hub/compchem/lammps-mamba141.html>`_,
paste it into a terminal and edit it to look like the following command line

.. code-block:: bash

docker run --rm -w /home -v $(pwd):/home molssi/lammps-mamba141:latest /bin/bash -c "lmp_serial -in in.lj"

then press Enter. If nothing goes wrong, you should see a long list of lines ending in

.. code-block:: bash

Nlocal: 1600 ave 1600 max 1600 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 756 ave 756 max 756 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 2178 ave 2178 max 2178 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 2178
Ave neighs/atom = 1.36125
Neighbor list builds = 141
Dangerous builds = 1
Total wall time: 0:00:00

.. note::

The same Docker image recipe can also be used with Apptainer (Singularity) to
obtain the same result via the following command

.. code-block:: bash

apptainer exec docker://molssi/lammps-mamba141:latest lmp_serial -in in.lj

Note that Apptainer binds ``/home/$USER``, ``/tmp`` and current working directory (``$PWD``)
from the host system to the running container by default. For further details see the Apptainer
`documentation <https://apptainer.org/docs/user/latest/quick_start.html#working-with-files>`_.

By default, LAMMPS generates a **log.lammps** file with the auto-generated output upon finishing
the job execution.

.. note::

You can store the generated output in a separate output file by passing the ``-l <output_name>``
to the execution command as follows

.. code-block:: bash

docker run --rm -w /home -v $(pwd):/home molssi/lammps-mamba141:latest /bin/bash -c /bin/bash -c "lmp_serial -in in.lj -l log.out"

or

.. code-block:: bash

apptainer exec docker://molssi/lammps-mamba141:latest lmp_serial -in in.lj -l log.out
76 changes: 76 additions & 0 deletions docs/compchem/mendeleev045-mamba141.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
.. _mendeleev045_mamba141:

*********************************************************
{{ mendeleev045_mamba141.hub_specifications[0]["Source"].split("/")[-1] }}
*********************************************************

{% set title = mendeleev045_mamba141.get("name") %}

{{title}}
=========================================================

{% block content %}
{{ mendeleev045_mamba141.description }}
{% endblock content %}

Source Specifications
=====================

{% block specifications %}
{% for dc in mendeleev045_mamba141.source_specifications %}
{% for key, value in dc.items() %}
* **{{ key }}**: {{ value }}
{% endfor %}
{% endfor %}
{% endblock specifications %}

MolSSI Container Hub Specifications
===================================

{% block hub_specifications %}
{% for dc in mendeleev045_mamba141.hub_specifications %}
{% for key, value in dc.items() %}
* **{{ key }}**: {{ value }}
{% endfor %}
{% endfor %}
{% endblock hub_specifications %}

* **Image pull command**:

.. code-block:: bash

{{ mendeleev045_mamba141.docker_pull_command }}

* **Container run command**:

.. code-block:: bash

{{ mendeleev045_mamba141.docker_run_command }}

{% block note %}
{% if mendeleev045_mamba141.note != "" %}
.. note::

{{ mendeleev045_mamba141.note }}
{% endif %}
{% endblock note %}

Image Specifications
====================

{% block image_specifications %}
{% for dc in mendeleev045_mamba141.image_specifications %}
{% for key, value in dc.items() %}
{% if dc[key] is string or dc[key] == "" %}
* **{{ key }}**: {{ value }}
{% else %}
* **{{ key }}**:
{% for key2 in dc[key] %}
{% for key3, val3 in key2.items() %}
+ *{{ key3 }}*: {{ val3 }}
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endblock image_specifications %}
40 changes: 16 additions & 24 deletions docs/compchem/mopac_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,9 @@ paste it into your terminal and edit it to look like the following command line

.. code-block:: bash

docker run --rm -w /home/molssi/temp -v $(pwd):/home/molssi/temp molssi/mopac220-mamba141:latest /bin/bash -c "mopac test.mop test.out"
docker run --rm -w /home -v $PWD:/home molssi/mopac220-mamba141:latest /bin/bash -c "mopac test.mop test.out"

then press Enter.

.. note::

The same Docker image recipe can also be used with Apptainer (Singularity) to
obtain the same result via the following command

.. code-block:: bash

apptainer exec docker://molssi/mopac220-mamba141:latest mopac test.mop test.out

Note that Apptainer binds ``/home/$USER``, ``/tmp`` and current working directory (``$PWD``)
from the host system to the running container by default. For further details see the Apptainer
`documentation <https://apptainer.org/docs/user/latest/quick_start.html#working-with-files>`_.

.. caution::

Ignore (usually many) wanings that you might get the first time a SIF file is being created.
This is because of Apptainer's `fakeroot <https://apptainer.org/docs/user/1.1/fakeroot.html>`_
feature which allows an unprivileged user to run containers as root by default.

If nothing goes wrong, you should see the following lines in your terminal
then press Enter. If nothing goes wrong, you should see the following lines in your terminal

.. code-block:: bash

Expand All @@ -104,4 +83,17 @@ Your directory should now have the following structure

.. code-block:: bash

* JOB ENDED NORMALLY *
* JOB ENDED NORMALLY *

.. note::

The same Docker image recipe can also be used with Apptainer (Singularity) to
obtain the same result via the following command

.. code-block:: bash

apptainer exec docker://molssi/mopac220-mamba141:latest mopac test.mop test.out

Note that Apptainer binds ``/home/$USER``, ``/tmp`` and current working directory (``$PWD``)
from the host system to the running container by default. For further details see the Apptainer
`documentation <https://apptainer.org/docs/user/latest/quick_start.html#working-with-files>`_.
Loading