mosdef-hub / mosdef_slitpore Goto Github PK
View Code? Open in Web Editor NEWA variety of water and carbon slit-pore simulations
License: MIT License
A variety of water and carbon slit-pore simulations
License: MIT License
Was testing the cassandra section in the SI. I ran run_simulation
, but did not use submit. I then CTRL-C
the process, before data was written.
This causes line 119 to fail since the file does not exist. So anything that calls this helper utility will fail under these conditions.
To reproduce:
python project.py run -o run_simulation -n 1
Running Cassandra...
, press CTRL-C
python project.py status
A checklist of things to do before making this repository public:
Improve the documentation via the README which includes installation instructions, simulation details, an overview of each simulation step, etc.
Add a requirements.txt
that allows a user to conda install or pip install dependencies for this package
Test instructions for installation using a fresh environment to ensure everything runs properly
Hello,
I followed the instructions to create the environment,
conda env create -f environment.yml
at the root folder.conda activate slitpore37
in the terminalpip3 install -e .
to install the packagesBut after all the steps, I still failed to run the first Python file to build the vapor and liquid box by using python GEMC_NVT_Psat_water_298K.py
I tried to import the packages in the terminal one by one and I found I was not able to import the Forcefield
module of the foyer
package. The following are the details.
Python 3.9.16 | packaged by conda-forge | (main, Feb 1 2023, 21:39:03)
[GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mbuild
/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/mdtraj/geometry/order.py:25: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import parse_version
/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
>>> from foyer import Forcefield
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/foyer/__init__.py", line 2, in <module>
from foyer.forcefield import Forcefield
File "/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/foyer/forcefield.py", line 37, in <module>
from foyer.atomtyper import find_atomtypes
File "/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/foyer/atomtyper.py", line 6, in <module>
from gmso import Topology
File "/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/gmso/__init__.py", line 2, in <module>
from .core.angle import Angle
File "/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/gmso/core/angle.py", line 6, in <module>
from gmso.abc.abstract_connection import Connection
File "/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/gmso/abc/abstract_connection.py", line 5, in <module>
from gmso.abc.abstract_site import Site
File "/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/gmso/abc/abstract_site.py", line 10, in <module>
from gmso.abc.gmso_base import GMSOBase
File "/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/gmso/abc/gmso_base.py", line 8, in <module>
from pydantic.validators import dict_validator
ImportError: cannot import name 'dict_validator' from 'pydantic.validators' (/storage/programs/miniconda3/envs/slitpore37/lib/python3.9/site-packages/pydantic/validators.py)
Could you please tell me how to solve this problem?
I also tried to use pip3
to install the packages and tried to run the Python file with the default Python executable. E.g. at the folder mosdef_slitpore/simulations/Psat_SPCE_298K/gomc/build_liq_vap_boxes
I run /usr/bin/python3 GEMC_NVT_Psat_water_298K.py
, but I got the following errors
/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat
Traceback (most recent call last):
File "GEMC_NVT_Psat_water_298K.py", line 2, in <module>
from foyer import Forcefield
File "/home/wenqiang/.local/lib/python3.6/site-packages/foyer/__init__.py", line 1, in <module>
from foyer.forcefield import Forcefield
File "/home/wenqiang/.local/lib/python3.6/site-packages/foyer/forcefield.py", line 14, in <module>
import simtk.openmm.app.element as elem
ModuleNotFoundError: No module named 'simtk.openmm'
Could you please help me with this problem? I am trying to run the Psat_SPCE_298K
example and trying to get more values of vapor saturation pressure at different temperatures.
Any help would be greatly appreciated!
Originally addressed in #11, the prog
should be changed so that a user can run the simulations directly from the repository without having to edit the scripts.
Just did a fresh clone of the repo > get this message:
Encountered 20 file(s) that should have been pointers, but weren't:
simulations/Plot_ads_des/E_vs_P_div_Psat.pdf
simulations/adsorption/3x3x1.0nm_3-layer/gomc/set2/input/1.png
simulations/adsorption/3x3x1.0nm_3-layer/gomc/set3/input/1.png
simulations/adsorption/3x3x1.0nm_3-layer/gomc/set4/input/1.png
simulations/adsorption/3x3x1.0nm_3-layer/gomc/set5/input/1.png
simulations/bulk-water/gomc/analysis/Pvap_vs_Antoine_data_water.pdf
simulations/nvt-pore/1x1x1.0nm_1-layer/cp2k/data/1water_data/numberdensity.pdf
simulations/nvt-pore/1x1x1.0nm_1-layer/cp2k/data/1water_data/s_order.pdf
simulations/nvt-pore/1x1x1.0nm_1-layer/cp2k/data/24water_data/numberdensity.pdf
simulations/nvt-pore/1x1x1.0nm_1-layer/cp2k/data/24water_data/s_order.pdf
simulations/nvt-pore/1x1x1.0nm_1-layer/cp2k/data_absz/1water_data/numberdensity.pdf
simulations/nvt-pore/1x1x1.0nm_1-layer/cp2k/data_absz/1water_data/s_order.pdf
simulations/nvt-pore/1x1x1.0nm_1-layer/cp2k/data_absz/24water_data/numberdensity.pdf
simulations/nvt-pore/1x1x1.0nm_1-layer/cp2k/data_absz/24water_data/s_order.pdf
simulations/surface/1x1x1.0nm_1-layer/gomc/analysis/Average_No_density_data_hw.pdf
simulations/surface/1x1x1.0nm_1-layer/gomc/analysis/Average_No_density_data_ow.pdf
simulations/surface/1x1x1.0nm_1-layer/gomc/analysis/Average_order_param.pdf
simulations/surface/3x3x2.0nm_3-layer/gomc/analysis/Average_No_density_data_hw.pdf
simulations/surface/3x3x2.0nm_3-layer/gomc/analysis/Average_No_density_data_ow.pdf
simulations/surface/3x3x2.0nm_3-layer/gomc/analysis/Average_order_param.pdf
Dear Dr Ray Matsumoto,
I came across an error (see below).
It appears the issue is related Pore-Builder. It looks it has not be updated along mbuild. But I am not sure about this. I am aware Pore-Builder (https://github.com/PTC-CMC/Pore-Builder) is a separate module but curious to know which version of mbuild and Pore-Builder on which mosdef_slitpore examples as given your supplementation info (https://aiche.onlinelibrary.wiley.com/action/downloadSupplement?doi=10.1002%2Faic.17206&file=aic17206-sup-0001-supinfo.pdf) worked.
Look forwards to your reply.
Regards,
Jingsheng
Error:
(slitpore37) D:\mosdef\mosdef_slitpore\simulations\nvt-pore\1x1x1.0nm_1-layer\gromacs>python project.py run -o initialize -n 1
Warning: importing 'simtk.openmm' is deprecated. Import 'openmm' instead.
D:\3rdps-tools\anaconda3\envs\slitpore37\lib\site-packages\flow\project.py:1803: DeprecatedWarning: root_directory is deprecated as of 1.8 and will be removed in 2.0. Use Project.path instead.
self.root_directory(), self._config.get("template_dir", "templates")
Using environment configuration: StandardEnvironment
D:\3rdps-tools\anaconda3\envs\slitpore37\lib\site-packages\flow\project.py:1030: DeprecatedWarning: root_directory is deprecated as of 1.8 and will be removed in 2.0. Use Project.path instead.
root_directory = project.root_directory()
D:\3rdps-tools\anaconda3\envs\slitpore37\lib\site-packages\mbuild\compound.py:1266: UserWarning: Compound.box.lengths < Compound.boundingbox.lengths. There may be particles outside of the defined simulation box.
warn(
Traceback (most recent call last):
File "D:\3rdps-tools\anaconda3\envs\slitpore37\lib\site-packages\flow\project.py", line 3515, in _execute_operation
self._operationsoperation.name
File "D:\3rdps-tools\anaconda3\envs\slitpore37\lib\site-packages\flow\project.py", line 669, in call
return self._op_func(*jobs)
File "D:\mosdef\mosdef_slitpore\simulations\nvt-pore\1x1x1.0nm_1-layer\gromacs\project.py", line 47, in initialize
pore = mb.recipes.GraphenePoreSolvent(
File "d:\mosdef\pore-builder\porebuilder\porebuilder.py", line 119, in init
pore = GraphenePore(pore_length=pore_length, pore_depth=pore_depth,
File "d:\mosdef\pore-builder\porebuilder\porebuilder.py", line 54, in init
graphene.periodicity[1] = factor # cos(30).246
TypeError: 'tuple' object does not support item assignment
In the Signac project for CP2K, the operations run_md
and restart_md
have the same pre conditions: https://github.com/rmatsum836/mosdef_slitpore/blob/master/simulations/nvt-pore/1x1x1.0nm_1-layer/cp2k/project.py. This isn't a huge issue, but it does create some confusion. We can change the pre conditions for restart_md
such that if the restart file is present for a job, then the operation that should run for the job will be restart_md
and not run_md
. This also may require that the post condition for run_md
is updated as well.
I get the following error if I install mosdef_slitpore
without making it editable. I.e., if I just do: pip install .
:
ModuleNotFoundError: No module named 'mosdef_slitpore.utils
When trying to run the cp2k example in the virtualbox ova file, the memory requested exceeded the available ram for it. The system then froze, since it was trying to handle the out of memory issues.
Hey @bc118,
I was working through the SI and running some of these simulations. However, all the files i described in the issue title will have syntax import errors happen before anything is able to run.
This is due to this line for example
from mbuild.recipes.porebuilder import GraphenePore
That incantation does not work for the recipes
section due to the plugin architecture.
To find all locations of these from the terminal:
(assuming you are at the top level of the mosdef_slitpore repo)
grep -inR "from mbuild.recipes.porebuilder"
will discover all files where this occurs, and the line number for each file.
Note that this grep command was the GNU Grep that ships with linux and not the BSD Grep that ships with MacOS. The flags might be slightly different.
Right now the charmm writer in mBuild isn't merged into the main branch. To avoid complications, @justinGilmer suggested we copy this code into the repository.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.