Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
8625e85
Merge pull request #22 from deepmodeling/devel
denghuilu Sep 7, 2020
d8b3921
device independence for deepmd-kit
Sep 7, 2020
b55309f
use standard operator style
Sep 10, 2020
4dd842c
use standard styles for custome operators
Sep 13, 2020
df6126b
Merge pull request #254 from denghuilu/devel
amcadmus Sep 16, 2020
a3f467e
global_polar: print loss not normalized by sqrt(natoms). add dp test …
Sep 16, 2020
c9fd68d
correct way of getting site package path
Sep 17, 2020
173afe5
set RPATH to $ORIGIN
njzjz Sep 30, 2020
edbe49c
Merge pull request #263 from njzjz/install_path
amcadmus Oct 2, 2020
2039b43
enable setting test size individually for each system
marian-code Oct 7, 2020
45849aa
add ability to parse yaml config files
marian-code Oct 7, 2020
faae175
added script to convert json to yaml
marian-code Oct 7, 2020
af3867a
fix failing test_get_test
marian-code Oct 7, 2020
265c559
some small alterations to better preserve the original logic of the code
marian-code Oct 8, 2020
9806168
added test for json yaml equality
marian-code Oct 8, 2020
865a1f4
minor bugfix
marian-code Oct 8, 2020
373b0ae
trigger new travis build
marian-code Oct 8, 2020
a461221
Merge branch 'master' into yaml_support
amcadmus Oct 10, 2020
0e956cb
Merge pull request #271 from marian-code/yaml_support
amcadmus Oct 11, 2020
ad3cb19
add info about yaml to docs and parser
marian-code Oct 12, 2020
ddeae14
Merge branch 'yaml_support' of github.com:marian-code/deepmd-kit into…
marian-code Oct 12, 2020
3553e26
added script to convert json to yaml
marian-code Oct 7, 2020
2f6e77c
added test for json yaml equality
marian-code Oct 8, 2020
2c5bd32
minor bugfix
marian-code Oct 8, 2020
b38b829
Merge pull request #275 from marian-code/yaml_support
amcadmus Oct 12, 2020
4df0eae
change default rcut_smth
Oct 16, 2020
db25786
change energy loss type from `std` to `ener`
Oct 16, 2020
ffc8cbd
add type_one_side to se_r
Oct 16, 2020
44b889c
resolve requested changes
marian-code Oct 16, 2020
b576caa
fix the bug when getting an NoneType value
Oct 17, 2020
041c45b
test on tensorflow 2.3
njzjz Aug 8, 2020
9f53326
bump tf version to 2.3; add tf to requirement if it's not detected; d…
njzjz Oct 17, 2020
d77ffd3
remove useless code
njzjz Oct 17, 2020
d8a4b77
fix bug
njzjz Oct 18, 2020
b943aea
fix conflict
njzjz Oct 18, 2020
f0da852
bugfix
njzjz Oct 18, 2020
e760f6c
bugfix
njzjz Oct 18, 2020
99492e3
add tf_install_dir
njzjz Oct 18, 2020
fccd45b
remove before_install
njzjz Oct 18, 2020
609a323
remove verbose
njzjz Oct 18, 2020
298abc1
Merge pull request #278 from amcadmus/devel
amcadmus Oct 18, 2020
7dc6cef
install tf
njzjz Oct 19, 2020
98710c4
check and generate doc for the options in the training input file.
Oct 19, 2020
7928151
try to fix it
njzjz Oct 19, 2020
7d98beb
set extras_require
njzjz Oct 19, 2020
289e532
Update README.md
amcadmus Oct 19, 2020
b7c523c
Update README.md
amcadmus Oct 19, 2020
d81eb57
Merge pull request #267 from marian-code/variable_n_tests
amcadmus Oct 19, 2020
3f4bde1
Merge remote-tracking branch 'upstream/devel' into devel
Oct 19, 2020
3330844
restructure the readme. Fix bugs in argcheck
Oct 19, 2020
cacf428
doc generated by updated dargs
Oct 19, 2020
17f0479
better way of checking and normalizing data
Oct 19, 2020
b5c307b
Merge pull request #242 from njzjz/tf2.3
amcadmus Oct 21, 2020
e764da1
fix bug in polar doc
Oct 30, 2020
f0fe085
bump docker version in README
njzjz Nov 2, 2020
dfe3cbf
Merge pull request #285 from deepmodeling/docker
amcadmus Nov 2, 2020
c7f58f6
merge with upstream/devel
Nov 9, 2020
2ef41c3
update doc
Nov 9, 2020
55baecf
add hyperlinks
Nov 9, 2020
1e483c9
revise the source for hyperlink
Nov 9, 2020
a84db43
Merge pull request #289 from amcadmus/devel
amcadmus Nov 13, 2020
b0b62b0
allow ntypes_model > ntypes_data (fix #261)
njzjz Nov 20, 2020
35b6eae
use sphinx to build docs
njzjz Nov 21, 2020
106ab31
update docs
njzjz Nov 22, 2020
0f6bc0f
add requirements for docs
njzjz Nov 22, 2020
f450c46
requirements.txt resolves relative path to cwd...
njzjz Nov 22, 2020
9268223
install tf; move docs require to setup.py
njzjz Nov 22, 2020
6c68f8e
overrides Read the Doc's default conf
njzjz Nov 22, 2020
d537243
add overflow for pre
njzjz Nov 22, 2020
dc8469c
Merge pull request #295 from njzjz/master
amcadmus Nov 24, 2020
5d5b1ff
Merge pull request #296 from njzjz/ntypes
amcadmus Nov 24, 2020
bf1f001
Merge pull request #297 from njzjz/docs
amcadmus Nov 24, 2020
e90d33d
fix error in definition of numb_test possible type
marian-code Nov 24, 2020
b96112e
Merge pull request #299 from marian-code/patch-1
amcadmus Nov 26, 2020
0b4101f
compatible to lammps stable_29Oct2020
Nov 29, 2020
a741845
Merge pull request #302 from amcadmus/devel
amcadmus Dec 1, 2020
5165c2a
add documentation link to readme
njzjz Dec 3, 2020
698cf3a
Merge pull request #303 from njzjz/njzjz-patch-3
amcadmus Dec 11, 2020
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ dist
.eggs
_version.py
venv*
.vscode/**
_build
_templates
16 changes: 6 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,34 +66,30 @@ jobs:
env:
- CC=gcc-5
- CXX=g++-5
- TENSORFLOW_VERSION=2.1
- TENSORFLOW_VERSION=2.3
- python: 3.7
env:
- CC=gcc-8
- CXX=g++-8
- TENSORFLOW_VERSION=2.1
- TENSORFLOW_VERSION=2.3
- stage: build whls
services: docker
env:
- TWINE_USERNAME=__token__
- CIBW_BUILD="cp36-* cp37-*"
- CIBW_BEFORE_BUILD="pip install tensorflow && sed -i 's/libresolv.so.2\"/libresolv.so.2\", \"libtensorflow_framework.so.2\"/g' \$(find / -name policy.json)"
- CIBW_BEFORE_BUILD="sed -i 's/libresolv.so.2\"/libresolv.so.2\", \"libtensorflow_framework.so.2\"/g' \$(find / -name policy.json)"
- CIBW_SKIP="*-win32 *-manylinux_i686"
- CC=gcc-7
- CXX=g++-7
- TENSORFLOW_VERSION=2.1
- TENSORFLOW_VERSION=2.3
install:
- python -m pip install twine cibuildwheel==1.1.0 scikit-build setuptools_scm
- python -m pip install twine cibuildwheel==1.6.3 scikit-build setuptools_scm
script:
- python -m cibuildwheel --output-dir wheelhouse
- python setup.py sdist
after_success:
- if [[ $TRAVIS_TAG ]]; then python -m twine upload wheelhouse/*; python -m twine upload dist/*.tar.gz; fi
before_install:
#- pip install --upgrade pip
- pip install --upgrade setuptools
- pip install tensorflow==$TENSORFLOW_VERSION
install:
- pip install --verbose .[test]
- pip install .[cpu,test]
script:
- cd source/tests && python -m unittest
549 changes: 15 additions & 534 deletions README.md

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions data/json/json2yaml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python3

import argparse
import json
from pathlib import Path
from warnings import warn

import yaml


def _main():
parser = argparse.ArgumentParser(
description="convert json config file to yaml",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)

# get all json files in dir
jsons = [p for p in Path.cwd().glob("*.json")]
# use the newest as autosuggestion
jsons.sort(key=lambda x: x.stat().st_mtime, reverse=True)
jfile = jsons[0]
yfile = jfile.with_suffix(".yaml")

parser.add_argument("INPUT", default=jfile, type=Path, nargs="?",
help="input json file")
parser.add_argument("OUTPUT", default=yfile, type=Path, nargs="?",
help="output yaml file")
args = parser.parse_args()

with args.INPUT.open("r") as infile, args.OUTPUT.open("w") as outfile:
yaml.dump(json.load(infile), outfile, default_flow_style=False,
sort_keys=False)

warn("The order of the keys won't be preserved!", SyntaxWarning)
warn("_comment keys will also be lostt in the conversion")

if __name__ == "__main__":
_main()
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
3 changes: 3 additions & 0 deletions doc/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pre{
overflow: auto;
}
91 changes: 91 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
DeePMD-kit API
===============

.. toctree::
:maxdepth: 2
:caption: Contents:

.. automodule:: deepmd.Data
:members:
:undoc-members:

.. automodule:: deepmd.DataModifier
:members:
:undoc-members:

.. automodule:: deepmd.DataSystem
:members:
:undoc-members:

.. automodule:: deepmd.DeepDipole
:members:
:undoc-members:

.. automodule:: deepmd.DeepEval
:members:
:undoc-members:

.. automodule:: deepmd.DeepPolar
:members:
:undoc-members:

.. automodule:: deepmd.DeepPot
:members:
:undoc-members:

.. automodule:: deepmd.DeepWFC
:members:
:undoc-members:

.. automodule:: deepmd.DescrptLocFrame
:members:
:undoc-members:

.. automodule:: deepmd.DescrptSeA
:members:
:undoc-members:

.. automodule:: deepmd.DescrptSeAR
:members:
:undoc-members:

.. automodule:: deepmd.DescrptSeR
:members:
:undoc-members:

.. automodule:: deepmd.EwaldRecp
:members:
:undoc-members:

.. automodule:: deepmd.Fitting
:members:
:undoc-members:

.. automodule:: deepmd.LearningRate
:members:
:undoc-members:

.. automodule:: deepmd.Local
:members:
:undoc-members:

.. automodule:: deepmd.Loss
:members:
:undoc-members:

.. automodule:: deepmd.Model
:members:
:undoc-members:

.. automodule:: deepmd.Network
:members:
:undoc-members:

.. automodule:: deepmd.TabInter
:members:
:undoc-members:

.. automodule:: deepmd.Trainer
:members:
:undoc-members:

60 changes: 60 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'DeePMD-kit'
copyright = '2020, Deep Potential'
author = 'Deep Potential'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'recommonmark',
"sphinx_rtd_theme",
'sphinx.ext.autosummary'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_css_files = ['css/custom.css']

autodoc_default_flags = ['members']
autosummary_generate = True
master_doc = 'index'
26 changes: 26 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. deepmd-kit documentation master file, created by
sphinx-quickstart on Sat Nov 21 18:36:24 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

DeePMD-kit's documentation
======================================

.. toctree::
:maxdepth: 2
:caption: Contents:


install
use-deepmd-kit
train-input
lammps-pair-style-deepmd
api


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Loading