Skip to content

Commit 57abf99

Browse files
committed
add get_type_map for c++ api
1 parent be45422 commit 57abf99

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

source/lib/include/NNPInter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class NNPInter
5959
int numb_types () const {assert(inited); return ntypes;};
6060
int dim_fparam () const {assert(inited); return dfparam;};
6161
int dim_aparam () const {assert(inited); return daparam;};
62+
void get_type_map (std::string & type_map);
6263
private:
6364
Session* session;
6465
int num_intra_nthreads, num_inter_nthreads;

source/lib/src/NNPInter.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,11 @@ compute (ENERGYTYPE & dener,
677677
run_model (dener, dforce_, dvirial, datom_energy_, datom_virial_, session, input_tensors, nnpmap, nghost);
678678
}
679679

680+
void
681+
NNPInter::
682+
get_type_map(std::string & type_map){
683+
type_map = get_scalar<std::string>("model_attr/tmap");
684+
}
680685

681686

682687

0 commit comments

Comments
 (0)