Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 27, 2024
1 parent db798a7 commit 0a440c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/api_cc/src/DeepPotPT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ void DeepPotPT::compute(ENERGYVTYPE& ener,
torch::from_blob(atype_64.data(), {1, natoms}, int_options).to(device);
inputs.push_back(atype_Tensor);
c10::optional<torch::Tensor> box_Tensor;
if(!box.empty())
{
box_Tensor = torch::from_blob(const_cast<VALUETYPE*>(box.data()), {1, 9}, options)
.to(device);
if (!box.empty()) {
box_Tensor =
torch::from_blob(const_cast<VALUETYPE*>(box.data()), {1, 9}, options)
.to(device);
}
inputs.push_back(box_Tensor);
c10::optional<torch::Tensor> fparam_tensor;
Expand Down

0 comments on commit 0a440c5

Please sign in to comment.