GithubHelp home page GithubHelp logo

mosdef-hub / mosdef_slitpore Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 4.0 6.87 MB

A variety of water and carbon slit-pore simulations

License: MIT License

Python 96.14% Shell 0.58% Jupyter Notebook 3.08% Dockerfile 0.20%

mosdef_slitpore's People

Contributors

bc118 avatar ramanishsingh avatar rmatsum836 avatar rsdefever avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mosdef_slitpore's Issues

Cassandra 1xx1x1.0nm_1-layer project fails when running a status check in certain conditions

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:

  1. initialize the signac project python project.py run -o run_simulation -n 1
  2. When the stdout shows Running Cassandra..., press CTRL-C
  3. Try to run python project.py status

Checklist for making repo public

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

Not able to establish the enviroment for running the first python file

Hello,
I followed the instructions to create the environment,

  1. I installed conda first
  2. run conda env create -f environment.yml at the root folder.
  3. run conda activate slitpore37 in the terminal
  4. run pip3 install -e . to install the packages

But 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!

Files that aren't `git-lfsd`

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

Issue with Pore-Builder when running example

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

CP2K Signac project has same pre conditions for `run_md` and `restart_md`

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.

RAM available for the VM should be upped

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.

GOMC build_NVT_pore_*-layer.py has a syntax error

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.