mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 12:23:48 +01:00
capitalize_ascii
This commit is contained in:
parent
87b0257dbe
commit
864a2955e1
@ -14,7 +14,7 @@ type t =
|
|||||||
[@@deriving sexp]
|
[@@deriving sexp]
|
||||||
|
|
||||||
let of_string x =
|
let of_string x =
|
||||||
match (String.capitalize (String.lowercase x)) with
|
match (String.capitalize_ascii (String.lowercase x)) with
|
||||||
| "X" | "Dummy" -> X
|
| "X" | "Dummy" -> X
|
||||||
| "H" | "Hydrogen" -> H
|
| "H" | "Hydrogen" -> H
|
||||||
| "He" | "Helium" -> He
|
| "He" | "Helium" -> He
|
||||||
|
@ -249,7 +249,7 @@ let parse_input input=
|
|||||||
in
|
in
|
||||||
let typ = String_ext.strip typ
|
let typ = String_ext.strip typ
|
||||||
and name = String_ext.strip name in
|
and name = String_ext.strip name in
|
||||||
let typ_cap = String.capitalize typ in
|
let typ_cap = String.capitalize_ascii typ in
|
||||||
let newstring = Printf.sprintf template name typ typ typ params_val typ typ
|
let newstring = Printf.sprintf template name typ typ typ params_val typ typ
|
||||||
typ typ params ( String_ext.strip text ) typ_cap
|
typ typ params ( String_ext.strip text ) typ_cap
|
||||||
in
|
in
|
||||||
@ -320,8 +320,8 @@ let parse_input_ezfio input=
|
|||||||
| _ -> assert false
|
| _ -> assert false
|
||||||
in
|
in
|
||||||
Printf.sprintf ezfio_template
|
Printf.sprintf ezfio_template
|
||||||
name typ typ typ typ typ typ typ typ (String.capitalize typ)
|
name typ typ typ typ typ typ typ typ (String.capitalize_ascii typ)
|
||||||
ezfio_func ezfio_func max min typ typ max msg min name (String.capitalize typ)
|
ezfio_func ezfio_func max min typ typ max msg min name (String.capitalize_ascii typ)
|
||||||
end
|
end
|
||||||
| _ -> failwith "Error in input_ezfio"
|
| _ -> failwith "Error in input_ezfio"
|
||||||
in
|
in
|
||||||
|
@ -122,7 +122,7 @@ default: 90000
|
|||||||
[state_average_weight]
|
[state_average_weight]
|
||||||
type: double precision
|
type: double precision
|
||||||
doc: Weight of the states in state-average calculations.
|
doc: Weight of the states in state-average calculations.
|
||||||
interface: ezfio,provider
|
interface: ezfio
|
||||||
default: 1.
|
default: 1.
|
||||||
size: (determinants.n_states)
|
size: (determinants.n_states)
|
||||||
|
|
||||||
|
@ -369,9 +369,9 @@ BEGIN_PROVIDER [ double precision, state_average_weight, (N_states) ]
|
|||||||
logical :: exists
|
logical :: exists
|
||||||
|
|
||||||
state_average_weight = 1.d0
|
state_average_weight = 1.d0
|
||||||
call ezfio_has_state_average_weight(exists)
|
call ezfio_has_determinants_state_average_weight(exists)
|
||||||
if (exists) then
|
if (exists) then
|
||||||
call ezfio_get_state_average_weight(state_average_weight)
|
call ezfio_get_determinants_state_average_weight(state_average_weight)
|
||||||
endif
|
endif
|
||||||
state_average_weight = state_average_weight+1.d-31
|
state_average_weight = state_average_weight+1.d-31
|
||||||
state_average_weight = state_average_weight/(sum(state_average_weight))
|
state_average_weight = state_average_weight/(sum(state_average_weight))
|
||||||
|
Loading…
Reference in New Issue
Block a user