diff --git a/GITHUB.md b/GITHUB.md index cee4cc8c..3240d198 100644 --- a/GITHUB.md +++ b/GITHUB.md @@ -13,11 +13,8 @@ dev: bugfix: A fork of the *master* on which the bug fixes are made. -dev-lcpq: - Toulouse development branch - -dev-lct: - Paris development branch +dev: + Development branch gh-pages: This is an independent branch, containing only the web site of QP2. diff --git a/ocaml/Molecule.ml b/ocaml/Molecule.ml index 78ceff0c..f3633155 100644 --- a/ocaml/Molecule.ml +++ b/ocaml/Molecule.ml @@ -149,14 +149,18 @@ let of_xyz_file let lines = match Io_ext.input_lines filename with | natoms :: title :: rest -> - begin - try - if (int_of_string @@ String_ext.strip natoms) <= 0 then - raise XYZError - with - | _ -> raise XYZError - end; - String.concat "\n" rest + let natoms = + try + int_of_string @@ String_ext.strip natoms + with + | _ -> raise XYZError + in + if natoms <= 0 then + raise XYZError; + let a = Array.of_list rest in + Array.sub a 0 natoms + |> Array.to_list + |> String.concat "\n" | _ -> raise XYZError in of_xyz_string ~charge:charge ~multiplicity:multiplicity