|
seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
|
Create, fill, read, and free a seams_system. More...
Functions | |
| SEAMS_API seams_system * | seams_system_create (void) |
| Allocate an empty frame. | |
| SEAMS_API void | seams_system_destroy (seams_system *sys) |
| Free a frame. | |
| SEAMS_API seams_status | seams_system_set_atoms (seams_system *sys, const double *xyz, size_t n, const double *box9, size_t box_len, const int *types, const int *ids) |
| Store points and a general cell. | |
| SEAMS_API seams_status | seams_system_set_frame (seams_system *sys, const double *xyz, int n, const double *box9, const int *types, const int *ids) |
| Store points and a general LAMMPS cell, with an int count. | |
| SEAMS_API seams_status | seams_system_set_ortho (seams_system *sys, const double *xyz, int n, double ox, double oy, double oz, double lx, double ly, double lz, const int *types, const int *ids) |
| Store points and an orthorhombic cell. | |
| SEAMS_API seams_status | seams_system_read (seams_system *sys, const char *path, int frame, int type_filter) |
| Read one frame from a trajectory file. | |
| SEAMS_API seams_status | seams_path_nframes (const char *path, size_t *nframes) |
| Number of frames in a trajectory path. | |
| SEAMS_API int | seams_system_count (const seams_system *sys) |
| Number of points in the frame, as an int. | |
Create, fill, read, and free a seams_system.
| SEAMS_API seams_status seams_path_nframes | ( | const char * | path, |
| size_t * | nframes ) |
Number of frames in a trajectory path.
| path | Filesystem path. |
| nframes | Receives the count. Must be non-NULL. |
| SEAMS_API int seams_system_count | ( | const seams_system * | sys | ) |
Number of points in the frame, as an int.
ABI 1 query. It cannot report an error; seams_system_natoms() can.
| sys | Frame handle, or NULL. |
| SEAMS_API seams_system * seams_system_create | ( | void | ) |
Allocate an empty frame.
| SEAMS_API void seams_system_destroy | ( | seams_system * | sys | ) |
Free a frame.
| sys | Handle from seams_system_create(), or NULL. NULL is ignored. |
| SEAMS_API seams_status seams_system_read | ( | seams_system * | sys, |
| const char * | path, | ||
| int | frame, | ||
| int | type_filter ) |
Read one frame from a trajectory file.
| sys | Frame handle. On failure the previously stored frame is kept. |
| path | Filesystem path. CON, LAMMPS dump, and the formats the linked readers accept. |
| frame | Frame index, 1-based, matching the file order. |
| type_filter | Negative keeps every atom. Zero guesses the oxygen species. A positive value keeps that species number. |
| SEAMS_API seams_status seams_system_set_atoms | ( | seams_system * | sys, |
| const double * | xyz, | ||
| size_t | n, | ||
| const double * | box9, | ||
| size_t | box_len, | ||
| const int * | types, | ||
| const int * | ids ) |
Store points and a general cell.
Lengths are size_t.
On failure the previously stored frame, if any, is kept.
A reload on the same handle reuses its per-atom storage. When ids is NULL or 1..n and n matches the previous load, the id table is kept as well, so reloading a trajectory frame by frame costs one pass over the input after the finiteness check. seams_system_set_positions() also skips the type and id pass.
| sys | Frame handle. |
| xyz | n times 3 Cartesian coordinates, Angstrom. Every value must be finite. |
| n | Atom count. Zero is rejected. A count that does not fit in the frame's integer width is rejected. |
| box9 | Cell numbers: ox, oy, oz, lx, ly, lz, xy, xz, yz. |
| box_len | Must be 9. |
| types | Atom types, or NULL to store type 1 for every atom. |
| ids | Atom ids, or NULL to store 1..n. Ids must be unique. |
| SEAMS_API seams_status seams_system_set_frame | ( | seams_system * | sys, |
| const double * | xyz, | ||
| int | n, | ||
| const double * | box9, | ||
| const int * | types, | ||
| const int * | ids ) |
Store points and a general LAMMPS cell, with an int count.
ABI 1 entry. New callers use seams_system_set_atoms().
| sys | Frame handle. |
| xyz | n times 3 coordinates, Angstrom. |
| n | Atom count. A non-positive count is rejected. |
| box9 | Nine cell numbers: ox, oy, oz, lx, ly, lz, xy, xz, yz. |
| types | Types, or NULL for type 1. |
| ids | Ids, or NULL for 1..n. |
| SEAMS_API seams_status seams_system_set_ortho | ( | seams_system * | sys, |
| const double * | xyz, | ||
| int | n, | ||
| double | ox, | ||
| double | oy, | ||
| double | oz, | ||
| double | lx, | ||
| double | ly, | ||
| double | lz, | ||
| const int * | types, | ||
| const int * | ids ) |
Store points and an orthorhombic cell.
| sys | Frame handle. |
| xyz | n times 3 coordinates, Angstrom. |
| n | Atom count. |
| ox | Origin x, Angstrom. |
| oy | Origin y, Angstrom. |
| oz | Origin z, Angstrom. |
| lx | Edge length x, Angstrom. |
| ly | Edge length y, Angstrom. |
| lz | Edge length z, Angstrom. |
| types | Types, or NULL. |
| ids | Ids, or NULL. |