Skip to content

Commit

Permalink
Handle two scaling commands in the same way as n2p2
Browse files Browse the repository at this point in the history
  • Loading branch information
cschran authored and dev-zero committed Dec 8, 2021
1 parent b5b8227 commit 9f7a817
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/nnp_environment.F
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,20 @@ SUBROUTINE nnp_init_model(nnp_env)
CPABORT("NNP| number of elements missing in NNP_INPUT_FILE")
END IF

CALL parser_search_string(parser, "scale_symmetry_functions_sigma", .TRUE., found, &
search_from_begin_of_file=.TRUE.)
nnp_env%scale_sigma_acsf = found

CALL parser_search_string(parser, "scale_symmetry_functions", .TRUE., found, &
search_from_begin_of_file=.TRUE.)
nnp_env%scale_acsf = found

CALL parser_search_string(parser, "scale_symmetry_functions_sigma", .TRUE., found, &
search_from_begin_of_file=.TRUE.)
nnp_env%scale_sigma_acsf = found
! keywords are identical up to ending
IF (nnp_env%scale_acsf .AND. nnp_env%scale_sigma_acsf) THEN
! Test if there are two keywords of this:
CALL parser_search_string(parser, "scale_symmetry_functions", .TRUE., found)
IF (found .AND. nnp_env%scale_sigma_acsf) THEN
CPWARN('Two scaling keywords in the input, we will ignore sigma scaling in this case')
nnp_env%scale_sigma_acsf = .FALSE.
ELSE IF (.NOT. found .AND. nnp_env%scale_sigma_acsf) THEN
nnp_env%scale_acsf = .FALSE.
END IF

Expand Down

0 comments on commit 9f7a817

Please sign in to comment.