Giter VIP home page Giter VIP logo

openmm_deepmd_plugin's People

Contributors

dingye18 avatar njzjz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openmm_deepmd_plugin's Issues

Errors when running `make test`

Thank you for creating this plugin!

I am having an issue during the installation process. I am able to successfully run the make and make install commands. However, when I run make test, all of the tests fail, as shown below.

Running tests...
/common/software/install/spack/linux-centos7-ivybridge/gcc-13.1.0/cmake-3.26.3-em4tlmoxf4uhny57w2i5f6vfdfk6v4wy/bin/ctest --force-new-ctest-process 
Test project gopal145/software/openmm_deepmd_plugin/build
    Start 1: TestSerializeDeepmdForce
1/5 Test #1: TestSerializeDeepmdForce .........***Failed    3.20 sec
    Start 2: TestDeepmdPlugin4Reference
2/5 Test #2: TestDeepmdPlugin4Reference .......***Failed    0.58 sec
    Start 3: TestDeepmdPlugin4CUDASingle
3/5 Test #3: TestDeepmdPlugin4CUDASingle ......Subprocess aborted***Exception:   0.77 sec
    Start 4: TestDeepmdPlugin4CUDAMixed
4/5 Test #4: TestDeepmdPlugin4CUDAMixed .......Subprocess aborted***Exception:   0.60 sec
    Start 5: TestDeepmdPlugin4CUDADouble
5/5 Test #5: TestDeepmdPlugin4CUDADouble ......Subprocess aborted***Exception:   0.60 sec

0% tests passed, 5 tests failed out of 5

Total Test time (real) =   5.78 sec

The following tests FAILED:
	  1 - TestSerializeDeepmdForce (Failed)
	  2 - TestDeepmdPlugin4Reference (Failed)
	  3 - TestDeepmdPlugin4CUDASingle (Subprocess aborted)
	  4 - TestDeepmdPlugin4CUDAMixed (Subprocess aborted)
	  5 - TestDeepmdPlugin4CUDADouble (Subprocess aborted)
Errors while running CTest

I looked at the test log file located at build/Testing/Temporary/LastTest.log and I see the following message:

Start testing: Dec 06 20:00 CST
----------------------------------------------------------
1/5 Testing: TestSerializeDeepmdForce
1/5 Test: TestSerializeDeepmdForce
Command: "gopal145/software/openmm_deepmd_plugin/build/TestSerializeDeepmdForce"
Directory: gopal145/software/openmm_deepmd_plugin/build
"TestSerializeDeepmdForce" start time: Dec 06 20:00 CST
Output:
----------------------------------------------------------
DeePMD-kit: Successfully load libcudart.so
DeePMD-kit WARNING: Environmental variable TF_INTRA_OP_PARALLELISM_THREADS is not set. Tune TF_INTRA_OP_PARALLELISM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information.
DeePMD-kit WARNING: Environmental variable TF_INTER_OP_PARALLELISM_THREADS is not set. Tune TF_INTER_OP_PARALLELISM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information.
DeePMD-kit WARNING: Environmental variable OMP_NUM_THREADS is not set. Tune OMP_NUM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information.
DATA_LOSS: Can't parse ../python/OpenMMDeepmdPlugin/data/water.pb as binary proto
exception: DeePMD-kit C API Error: DeePMD-kit Error: TensorFlow Error: DATA_LOSS: Can't parse ../python/OpenMMDeepmdPlugin/data/water.pb as binary proto
<end of output>
Test time =   3.20 sec
----------------------------------------------------------
Test Failed.
"TestSerializeDeepmdForce" end time: Dec 06 20:00 CST
"TestSerializeDeepmdForce" time elapsed: 00:00:03
----------------------------------------------------------

The remaining 4 tests all fail for a similar reason. I have verified that the water.pb file does exist. I understand that the warning states that certain environment variables are not set, but I am not sure it would cause the following error. I also looked at issue #9 and exported the LD_LIBRARY_PATH variable, but I observed the same error. Can someone please provide some assistance? Thank you.

strange boxes when using the qdpi model

Thanks for this nice module!

I am trying to use the QDpi Model, for running a MD simulation describing the whole waterbox with the NNP, following this comment

Alternatively, are you specifically interested in running a simulation solely using the trained NNP model?
If you want a simulation with NNP only, the Deepmd Plugin is enough to use.

If I run the NVT test script provided within this repository (https://github.com/JingHuangLab/openmm_deepmd_plugin/blob/master/python/tests/test_deepmd_nvt.py) I can run this test with the provided water.pb file and everything looks nice. If I now change the water.pb to the qdpi model (qdpi-1.0.pb), the waterbox is exploding:

#"Progress (%)"	"Step"	"Time (ps)"	"Potential Energy (kJ/mole)"	"Kinetic Energy (kJ/mole)"	"Total Energy (kJ/mole)"	"Temperature (K)"	"Density (g/mL)"	"Speed (ns/day)"	"Time Remaining"
10.0%	100	0.01999999999999999	-48617782.74773688	5991.949569741136	-48611790.79816714	625.5780260850828	0.9854098249994789	0	--
20.0%	200	0.03999999999999987	-48619461.151101604	8961.926531253604	-48610499.22457035	935.6527861404164	0.9854098249994789	0.243	0:56
30.0%	300	0.05999999999999975	-48621288.31182224	18550.951134558753	-48602737.36068769	1936.776546211729	0.9854098249994789	0.233	0:52
40.0%	400	0.08000000000000024	-48622517.24254719	24885.054267470026	-48597632.18827972	2598.0764601689757	0.9854098249994789	0.231	0:44

image

Am I doing something wrong or is this a problem of the used NNP model?

Eoorr: Error loading CUDA module

Thanks for this nice module!

I am trying to use the openmm with dp model for running a MD simulation, Some CUDA errors occur. My test GPU models were 3090 and V100. nvidia-driver-525. The following is a detailed description of the error. How to solve this kind of error?
#######################################################################################

DeePMD-kit: Successfully load libcudart.so
Matplotlib created a temporary cache directory at /tmp/matplotlib-qhzu1vhe because the default path (/HOME/scz0btj/.cache/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
DeePMD-kit WARNING: Environmental variable TF_INTRA_OP_PARALLELISM_THREADS is not set. Tune TF_INTRA_OP_PARALLELISM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information.
DeePMD-kit WARNING: Environmental variable TF_INTER_OP_PARALLELISM_THREADS is not set. Tune TF_INTER_OP_PARALLELISM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information.
DeePMD-kit WARNING: Environmental variable OMP_NUM_THREADS is not set. Tune OMP_NUM_THREADS for the best performance. See https://deepmd.rtfd.io/parallelism/ for more information.
2023-11-25 22:17:09.632661: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "/input_lbg-12767-9901414/run_nvt.py", line 66, in
simulation = Simulation(pdb.topology, dp_system, integrator, platform, properties)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/dp_omm/lib/python3.11/site-packages/openmm/app/simulation.py", line 103, in init
self.context = mm.Context(self.system, self.integrator, platform, platformProperties)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/dp_omm/lib/python3.11/site-packages/openmm/openmm.py", line 3749, in init
_openmm.Context_swiginit(self, _openmm.new_Context(*args))
^^^^^^^^^^^^^^^^^^^^^^^^^^
openmm.OpenMMException: Error loading CUDA module: CUDA_ERROR_UNSUPPORTED_PTX_VERSION (222)

Installation failed

I have followed your Installation guidance in READMD.md.

However, I encounter some difficulties in the Installation process.

My OPENMM_INSTALLED_DIR is the env direction of anaconda which installed the openmm by conda (/home/xuzp/WORK/shipengjie/01-app/anaconda/envs/dp_openmm)
My LIBDEEPMD_C_INSTALLED_DIR is the direction of C++ API download by wget
(/home/xuzp/WORK/shipengjie/01-app/openmm_dp/libdeepmd_c_2.2.1)

When I execute “cmake”, the log information is:

-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xuzp/WORK/shipengjie/01-app/openmm_dp/openmm_deepmd_plugin/build

It looks fine. Then I execute make:

[  5%] Building CXX object CMakeFiles/OpenMMDeepmd.dir/openmmapi/src/DeepmdForce.cpp.o
[ 10%] Building CXX object CMakeFiles/OpenMMDeepmd.dir/openmmapi/src/DeepmdForceImpl.cpp.o
[ 15%] Building CXX object CMakeFiles/OpenMMDeepmd.dir/serialization/src/DeepmdForceProxy.cpp.o
[ 21%] Building CXX object CMakeFiles/OpenMMDeepmd.dir/serialization/src/DeepmdSerializationProxyRegistration.cpp.o
[ 26%] Linking CXX shared library libOpenMMDeepmd.so
[ 26%] Built target OpenMMDeepmd
[ 31%] Building CXX object serialization/tests/CMakeFiles/TestSerializeDeepmdForce.dir/TestSerializeDeepmdForce.cpp.o
[ 36%] Linking CXX executable ../../TestSerializeDeepmdForce
CMakeFiles/TestSerializeDeepmdForce.dir/TestSerializeDeepmdForce.cpp.o:在函数‘testSerialization()’中:
TestSerializeDeepmdForce.cpp:(.text+0x3f7):对‘OpenMM::throwException(char const*, int, std::string const&)’未定义的引用
CMakeFiles/TestSerializeDeepmdForce.dir/TestSerializeDeepmdForce.cpp.o:在函数‘void OpenMM::XmlSerializer::serialize<DeepmdPlugin::DeepmdForce>(DeepmdPlugin::DeepmdForce const*, std::string const&, std::ostream&)’中:
TestSerializeDeepmdForce.cpp:(.text._ZN6OpenMM13XmlSerializer9serializeIN12DeepmdPlugin11DeepmdForceEEEvPKT_RKSsRSo[_ZN6OpenMM13XmlSerializer9serializeIN12DeepmdPlugin11DeepmdForceEEEvPKT_RKSsRSo]+0x6b):对‘OpenMM::SerializationNode::setName(std::string const&)’未定义的引用
TestSerializeDeepmdForce.cpp:(.text._ZN6OpenMM13XmlSerializer9serializeIN12DeepmdPlugin11DeepmdForceEEEvPKT_RKSsRSo[_ZN6OpenMM13XmlSerializer9serializeIN12DeepmdPlugin11DeepmdForceEEEvPKT_RKSsRSo]+0xce):对‘OpenMM::SerializationNode::hasProperty(std::string const&) const’未定义的引用
TestSerializeDeepmdForce.cpp:(.text._ZN6OpenMM13XmlSerializer9serializeIN12DeepmdPlugin11DeepmdForceEEEvPKT_RKSsRSo[_ZN6OpenMM13XmlSerializer9serializeIN12DeepmdPlugin11DeepmdForceEEEvPKT_RKSsRSo]+0x105):对‘OpenMM::SerializationProxy::getTypeName() const’未定义的引用
TestSerializeDeepmdForce.cpp:(.text._ZN6OpenMM13XmlSerializer9serializeIN12DeepmdPlugin11DeepmdForceEEEvPKT_RKSsRSo[_ZN6OpenMM13XmlSerializer9serializeIN12DeepmdPlugin11DeepmdForceEEEvPKT_RKSsRSo]+0x155):对‘OpenMM::SerializationProxy::getTypeName() const’未定义的引用
TestSerializeDeepmdForce.cpp:(.text._ZN6OpenMM13XmlSerializer9serializeIN12DeepmdPlugin11DeepmdForceEEEvPKT_RKSsRSo[_ZN6OpenMM13XmlSerializer9serializeIN12DeepmdPlugin11DeepmdForceEEEvPKT_RKSsRSo]+0x192):对‘OpenMM::SerializationNode::setStringProperty(std::string const&, std::string const&)’未定义的引用
../../libOpenMMDeepmd.so:对‘OpenMM::SerializationProxy::SerializationProxy(std::string const&)’未定义的引用
../../libOpenMMDeepmd.so:对‘OpenMM::Platform::createKernel(std::string const&, OpenMM::ContextImpl&) const’未定义的引用
../../libOpenMMDeepmd.so:对‘OpenMM::SerializationNode::setIntProperty(std::string const&, int)’未定义的引用
../../libOpenMMDeepmd.so:对‘OpenMM::SerializationNode::getIntProperty(std::string const&) const’未定义的引用
../../libOpenMMDeepmd.so:对‘OpenMM::SerializationNode::getStringProperty(std::string const&) const’未定义的引用
collect2: 错误:ld 返回 1
make[2]: *** [TestSerializeDeepmdForce] 错误 1
make[1]: *** [serialization/tests/CMakeFiles/TestSerializeDeepmdForce.dir/all] 错误 2
make: *** [all] 错误 2
(dp_openmm) [xuzp@c13b02n04 build]$ echo ${LIBDEEPMD_C_INSTALLED_DIR}
/home/xuzp/WORK/shipengjie/01-app/openmm_dp/libdeepmd_c_2.2.1
(dp_openmm) [xuzp@c13b02n04 build]$ echo ${OPENMM_INSTALLED_DIR}
/home/xuzp/WORK/shipengjie/01-app/anaconda/envs/dp_openmm

It has undefined reference error.
I don't know where the problem is.

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.