Skip to content

Commit e70b16c

Browse files
authored
Merge pull request #36 from deepmodeling/master
master branch update
2 parents 85863c3 + 816b803 commit e70b16c

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<span style="font-size:larger;">DeePMD-kit Manual</span>
22
========
33
[![GitHub release](https://img.shields.io/github/release/deepmodeling/deepmd-kit.svg?maxAge=86400)](https://github.com/deepmodeling/deepmd-kit/releases)
4-
[![Documentation Status](https://readthedocs.org/projects/deepmd/badge/?version=latest)](https://deepmd.readthedocs.io/en/latest/?badge=latest)
4+
[![doi:10.1016/j.cpc.2018.03.016](https://img.shields.io/badge/DOI-10.1016%2Fj.cpc.2018.03.016-blue)](https://doi.org/10.1016/j.cpc.2020.107206)
5+
[![offline packages](https://img.shields.io/github/downloads/deepmodeling/deepmd-kit/total?label=offline%20packages)](https://github.com/deepmodeling/deepmd-kit/releases)
6+
[![conda install](https://img.shields.io/badge/downloads-9k%20total-green.svg?style=round-square&label=conda%20install)](https://anaconda.org/deepmodeling/deepmd-kit)
7+
[![pip install](https://img.shields.io/pypi/dm/deepmd-kit?label=pip%20install)](https://pypi.org/project/deepmd-kit)
8+
[![docker pull](https://img.shields.io/docker/pulls/deepmodeling/deepmd-kit)](https://hub.docker.com/r/deepmodeling/deepmd-kit)
9+
[![Documentation Status](https://readthedocs.org/projects/deepmd/badge/)](https://deepmd.readthedocs.io/)
510

611
# Table of contents
712
- [About DeePMD-kit](#about-deepmd-kit)

source/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
cmake_minimum_required(VERSION 3.7)
22
project(DeePMD)
3-
set(CMAKE_LINK_WHAT_YOU_USE TRUE)
3+
if (CMAKE_COMPILER_IS_GNU)
4+
set(CMAKE_LINK_WHAT_YOU_USE TRUE)
5+
endif ()
46

57
# build cpp or python interfaces
68
if (NOT DEFINED BUILD_CPP_IF)

source/cmake/Findtensorflow.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ find_path(TensorFlow_INCLUDE_DIRS
3232
PATH_SUFFIXES "/include"
3333
NO_DEFAULT_PATH
3434
)
35+
if (BUILD_CPP_IF)
3536
find_path(TensorFlow_INCLUDE_DIRS_GOOGLE
3637
NAMES
3738
google/protobuf/type.pb.h
@@ -40,6 +41,7 @@ find_path(TensorFlow_INCLUDE_DIRS_GOOGLE
4041
NO_DEFAULT_PATH
4142
)
4243
list(APPEND TensorFlow_INCLUDE_DIRS ${TensorFlow_INCLUDE_DIRS_GOOGLE})
44+
endif ()
4345

4446
if (NOT TensorFlow_INCLUDE_DIRS AND tensorflow_FIND_REQUIRED)
4547
message(FATAL_ERROR

source/lmp/pair_nnp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,10 @@ void PairNNP::compute(int eflag, int vflag)
482482
nnp_inter_model_devi.compute_avg (tmp_avg_f_, all_force_);
483483
nnp_inter_model_devi.compute_std_f (std_f_, tmp_avg_f_, all_force_);
484484
std_f.resize(std_f_.size());
485-
for (int dd = 0; dd < std_f_.size(); ++dd) std_f[dd] = std_f_[dd];
486485
if (out_rel == 1){
487486
nnp_inter_model_devi.compute_relative_std_f (std_f_, tmp_avg_f_, eps);
488487
}
488+
for (int dd = 0; dd < std_f_.size(); ++dd) std_f[dd] = std_f_[dd];
489489
#endif
490490
double min = numeric_limits<double>::max(), max = 0, avg = 0;
491491
ana_st(max, min, avg, std_f, nlocal);

0 commit comments

Comments
 (0)