Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insert license to C++ header files #2652

Merged
merged 4 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ repos:
hooks:
# C++, js
- id: insert-license
files: \.(c|cc|cpp|js|ts)$
files: \.(c|cc|cpp|js|ts|h|hpp)$
args:
- --license-filepath
- .license-header.txt
- --comment-style
- //
- --no-extra-eol
exclude: ^source/3rdparty|source/lib/src/cuda/cudart/.+\.inc
# CSS
- id: insert-license
files: \.(css|scss)$
Expand Down
1 change: 1 addition & 0 deletions source/api_c/include/c_api.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 1 addition & 0 deletions source/api_c/include/c_api_internal.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#include <string>

#include "DataModifier.h"
Expand Down
1 change: 1 addition & 0 deletions source/api_c/include/deepmd.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
/*
Header-only DeePMD-kit C++ 11 library

Expand Down
1 change: 1 addition & 0 deletions source/api_c/tests/test_utils.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <gtest/gtest.h>

Expand Down
1 change: 1 addition & 0 deletions source/api_cc/include/AtomMap.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/api_cc/include/DataModifier.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include "DeepPot.h"
Expand Down
1 change: 1 addition & 0 deletions source/api_cc/include/DeepPot.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include "common.h"
Expand Down
1 change: 1 addition & 0 deletions source/api_cc/include/DeepTensor.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include "common.h"
Expand Down
1 change: 1 addition & 0 deletions source/api_cc/include/common.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions source/api_cc/include/tf_private.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
/**
* @file tf_private.h
* @brief This file includes TensorFlow headers used for compilation.
Expand Down
1 change: 1 addition & 0 deletions source/api_cc/include/tf_public.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
/**
* @file tf_public.h
* @brief This file declares incompleted TensorFlow class used for public
Expand Down
1 change: 1 addition & 0 deletions source/api_cc/tests/test_utils.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <cmath>

Expand Down
1 change: 1 addition & 0 deletions source/gmx/include/gmx_plugin.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef _GMX_PLUGIN_H_
#define _GMX_PLUGIN_H_
#ifdef DP_USE_CXX_API
Expand Down
1 change: 1 addition & 0 deletions source/ipi/include/Convert.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <map>
Expand Down
1 change: 1 addition & 0 deletions source/ipi/include/StringSplit.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __StringSplit_h_wanghan__
#define __StringSplit_h_wanghan__

Expand Down
1 change: 1 addition & 0 deletions source/ipi/include/XyzFileManager.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __XyzFileManager_h_wanghan__
#define __XyzFileManager_h_wanghan__

Expand Down
1 change: 1 addition & 0 deletions source/ipi/include/sockets.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <netdb.h>
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/ComputeDescriptor.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <algorithm>
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/DeviceFunctor.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <stdio.h>

Expand Down
1 change: 1 addition & 0 deletions source/lib/include/SimulationRegion.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __SimulationRegion_h_wanghan__
#define __SimulationRegion_h_wanghan__

Expand Down
1 change: 1 addition & 0 deletions source/lib/include/SimulationRegion_Impl.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __SimulationRegion_Impl_h_wanghan__
#define __SimulationRegion_Impl_h_wanghan__

Expand Down
1 change: 1 addition & 0 deletions source/lib/include/coord.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include "region.h"
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/device.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <stdio.h>

Expand Down
1 change: 1 addition & 0 deletions source/lib/include/env_mat.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/env_mat_nvnmd.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

// SPDX-License-Identifier: LGPL-3.0-or-later
/*
//==================================================
_ _ __ __ _ _ __ __ ____
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/errors.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <stdexcept>
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/ewald.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <algorithm>
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/fmt_nlist.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/gelu.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include "device.h"

Expand Down
1 change: 1 addition & 0 deletions source/lib/include/gpu_cuda.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <assert.h>
#include <cuda_runtime.h>
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/gpu_rocm.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <assert.h>
#include <hip/hip_runtime.h>
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/map_aparam.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/neighbor_list.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <algorithm>
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/pair_tab.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions source/lib/include/prod_env_mat.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions source/lib/include/prod_env_mat_nvnmd.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
/*
//==================================================
_ _ __ __ _ _ __ __ ____
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/prod_force.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/prod_force_grad.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/prod_virial.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/prod_virial_grad.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/region.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/soft_min_switch.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/soft_min_switch_force.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/soft_min_switch_force_grad.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/soft_min_switch_virial.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/soft_min_switch_virial_grad.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/switcher.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <cmath>
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/tabulate.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace deepmd {
Expand Down
1 change: 1 addition & 0 deletions source/lib/include/utilities.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <cmath>
Expand Down
1 change: 1 addition & 0 deletions source/lmp/compute_deeptensor_atom.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifdef COMPUTE_CLASS
// clang-format off
ComputeStyle(deeptensor/atom, ComputeDeeptensorAtom)
Expand Down
1 change: 1 addition & 0 deletions source/lmp/fix_dplr.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifdef FIX_CLASS

FixStyle(dplr, FixDPLR)
Expand Down
1 change: 1 addition & 0 deletions source/lmp/fix_ttm_dp.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#include <vector>

#include "fix_ttm.h"
Expand Down
1 change: 1 addition & 0 deletions source/lmp/pair_deepmd.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef LAMMPS_VERSION_NUMBER
#error Please define LAMMPS_VERSION_NUMBER to yyyymmdd
#endif
Expand Down
1 change: 1 addition & 0 deletions source/lmp/pppm_dplr.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifdef KSPACE_CLASS
// clang-format off
KSpaceStyle(pppm/dplr, PPPMDPLR)
Expand Down
1 change: 1 addition & 0 deletions source/md/include/AdWeight.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/Convert.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <map>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/CosSwitch.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <cmath>

Expand Down
1 change: 1 addition & 0 deletions source/md/include/Gaussian.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <cmath>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/GroFileManager.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __GroFileManager_wanghan__
#define __GroFileManager_wanghan__

Expand Down
1 change: 1 addition & 0 deletions source/md/include/HarmonicAngle.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/HarmonicBond.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/Integrator.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/Interpolation.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __wanghan__Interpolation_h__
#define __wanghan__Interpolation_h__

Expand Down
1 change: 1 addition & 0 deletions source/md/include/LJInter.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/LJTab.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/MaxShift.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/Poly.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __wanghan_Poly_h__
#define __wanghan_Poly_h__

Expand Down
1 change: 1 addition & 0 deletions source/md/include/RandomGenerator.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

namespace RandomGenerator_MT19937 {
Expand Down
1 change: 1 addition & 0 deletions source/md/include/Statistics.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/StringSplit.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __StringSplit_h_wanghan__
#define __StringSplit_h_wanghan__

Expand Down
1 change: 1 addition & 0 deletions source/md/include/TF.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <string>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/TableFileLoader.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __TableFileLoader_h_wanghan__
#define __TableFileLoader_h_wanghan__

Expand Down
1 change: 1 addition & 0 deletions source/md/include/Tabulated.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <vector>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/Trajectory.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __MDFileManager_Trajectory_h_wanghan__
#define __MDFileManager_Trajectory_h_wanghan__

Expand Down
1 change: 1 addition & 0 deletions source/md/include/UnitManager.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once

#include <string>
Expand Down
1 change: 1 addition & 0 deletions source/md/include/XyzFileManager.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef __XyzFileManager_h_wanghan__
#define __XyzFileManager_h_wanghan__

Expand Down