mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-03 01:55:40 +01:00
Fixed xyz file reader
This commit is contained in:
parent
f17a72428b
commit
bc5587c8f0
@ -29,6 +29,8 @@ input:
|
||||
integer:
|
||||
| INTEGER EOL { $1 }
|
||||
| INTEGER SPACE EOL { $1 }
|
||||
| SPACE INTEGER EOL { $2 }
|
||||
| SPACE INTEGER SPACE EOL { $2 }
|
||||
|
||||
title:
|
||||
| title_list EOL { $1 }
|
||||
@ -47,12 +49,17 @@ atoms_xyz:
|
||||
| atoms_list EOL { List.rev $1 }
|
||||
| atoms_list EOF { List.rev $1 }
|
||||
|
||||
|
||||
atoms_list:
|
||||
| { [] }
|
||||
| atoms_list WORD SPACE FLOAT SPACE FLOAT SPACE FLOAT EOL { (Element.of_string $2, Coordinate.of_3_floats $4 $6 $8 `Angstrom ) :: $1 }
|
||||
| atoms_list WORD SPACE FLOAT SPACE FLOAT SPACE FLOAT SPACE EOL { (Element.of_string $2, Coordinate.of_3_floats $4 $6 $8 `Angstrom ) :: $1 }
|
||||
| atoms_list INTEGER SPACE FLOAT SPACE FLOAT SPACE FLOAT EOL { (Element.of_int $2, Coordinate.of_3_floats $4 $6 $8 `Angstrom ) :: $1 }
|
||||
| atoms_list INTEGER SPACE FLOAT SPACE FLOAT SPACE FLOAT SPACE EOL { (Element.of_int $2, Coordinate.of_3_floats $4 $6 $8 `Angstrom ) :: $1 }
|
||||
| atoms_list SPACE WORD SPACE FLOAT SPACE FLOAT SPACE FLOAT EOL { (Element.of_string $3, Coordinate.of_3_floats $5 $7 $9 `Angstrom ) :: $1 }
|
||||
| atoms_list SPACE WORD SPACE FLOAT SPACE FLOAT SPACE FLOAT SPACE EOL { (Element.of_string $3, Coordinate.of_3_floats $5 $7 $9 `Angstrom ) :: $1 }
|
||||
| atoms_list SPACE INTEGER SPACE FLOAT SPACE FLOAT SPACE FLOAT EOL { (Element.of_int $3, Coordinate.of_3_floats $5 $7 $9 `Angstrom ) :: $1 }
|
||||
| atoms_list SPACE INTEGER SPACE FLOAT SPACE FLOAT SPACE FLOAT SPACE EOL { (Element.of_int $3, Coordinate.of_3_floats $5 $7 $9 `Angstrom ) :: $1 }
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user