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 Apr 19, 2024
1 parent 8e5e41c commit 44e0e6a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions source/api_cc/src/DeepPotPT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,18 @@ void DeepPotPT::compute(ENERGYVTYPE& ener,
options)
.to(device);
}
c10::Dict<c10::IValue, c10::IValue> outputs = (model_type == 1) ?
module
.run_method("forward_lower", coord_wrapped_Tensor, atype_Tensor,
firstneigh_tensor, optional_tensor, fparam_tensor,
aparam_tensor, do_atom_virial_tensor, comm_dict)
.toGenericDict() : module
.run_method("forward_lower", coord_wrapped_Tensor, atype_Tensor,
firstneigh_tensor, optional_tensor, fparam_tensor,
aparam_tensor, do_atom_virial_tensor)
.toGenericDict();
c10::Dict<c10::IValue, c10::IValue> outputs =
(model_type == 1)
? module
.run_method("forward_lower", coord_wrapped_Tensor, atype_Tensor,
firstneigh_tensor, optional_tensor, fparam_tensor,
aparam_tensor, do_atom_virial_tensor, comm_dict)
.toGenericDict()
: module
.run_method("forward_lower", coord_wrapped_Tensor, atype_Tensor,
firstneigh_tensor, optional_tensor, fparam_tensor,
aparam_tensor, do_atom_virial_tensor)
.toGenericDict();
c10::IValue energy_ = outputs.at("energy");
c10::IValue force_ = outputs.at("extended_force");
c10::IValue virial_ = outputs.at("virial");
Expand Down

0 comments on commit 44e0e6a

Please sign in to comment.