mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-30 15:15:38 +01:00
This commit is contained in:
parent
bc042cefa2
commit
31bb892b65
@ -58,17 +58,32 @@ let int_of_atom_id : atom_id -> int = fun x -> x
|
|||||||
let float_of_distance : float StringMap.t -> distance -> float =
|
let float_of_distance : float StringMap.t -> distance -> float =
|
||||||
fun map -> function
|
fun map -> function
|
||||||
| Value x -> x
|
| Value x -> x
|
||||||
| Label s -> StringMap.find s map
|
| Label s -> begin
|
||||||
|
try StringMap.find s map with
|
||||||
|
| Not_found ->
|
||||||
|
Printf.sprintf "Zmatrix error: distance %s undefined" s
|
||||||
|
|> failwith
|
||||||
|
end
|
||||||
|
|
||||||
let float_of_angle : float StringMap.t -> angle -> float =
|
let float_of_angle : float StringMap.t -> angle -> float =
|
||||||
fun map -> function
|
fun map -> function
|
||||||
| Value x -> x
|
| Value x -> x
|
||||||
| Label s -> StringMap.find s map
|
| Label s -> begin
|
||||||
|
try StringMap.find s map with
|
||||||
|
| Not_found ->
|
||||||
|
Printf.sprintf "Zmatrix error: angle %s undefined" s
|
||||||
|
|> failwith
|
||||||
|
end
|
||||||
|
|
||||||
let float_of_dihedral : float StringMap.t -> dihedral -> float =
|
let float_of_dihedral : float StringMap.t -> dihedral -> float =
|
||||||
fun map -> function
|
fun map -> function
|
||||||
| Value x -> x
|
| Value x -> x
|
||||||
| Label s -> StringMap.find s map
|
| Label s -> begin
|
||||||
|
try StringMap.find s map with
|
||||||
|
| Not_found ->
|
||||||
|
Printf.sprintf "Zmatrix error: dihedral %s undefined" s
|
||||||
|
|> failwith
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
type line =
|
type line =
|
||||||
|
Loading…
Reference in New Issue
Block a user