#include "largefiles.h"
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include "endianswap.h"
#include "fastio.h"
#include "molfile_plugin.h"
Go to the source code of this file.
Compounds | |
struct | dcdhandle |
Defines | |
#define | M_PI_2 1.57079632679489661922 |
#define | RECSCALE32BIT 1 |
#define | RECSCALE64BIT 2 |
#define | RECSCALEMAX 2 |
#define | DCD_SUCCESS 0 |
#define | DCD_EOF -1 |
#define | DCD_DNE -2 |
#define | DCD_OPENFAILED -3 |
#define | DCD_BADREAD -4 |
#define | DCD_BADEOF -5 |
#define | DCD_BADFORMAT -6 |
#define | DCD_FILEEXISTS -7 |
#define | DCD_BADMALLOC -8 |
#define | DCD_BADWRITE -9 |
#define | DCD_IS_CHARMM 0x01 |
#define | DCD_HAS_4DIMS 0x02 |
#define | DCD_HAS_EXTRA_BLOCK 0x04 |
#define | DCD_HAS_64BIT_REC 0x08 |
#define | NFILE_POS 8L |
#define | NSTEP_POS 20L |
#define | READ(fd, buf, size) fio_fread(((void *) buf), (size), 1, (fd)) |
#define | WRITE(fd, buf, size) fio_fwrite(((void *) buf), (size), 1, (fd)) |
#define | CHECK_FREAD(X, msg) if (X==-1) { return(DCD_BADREAD); } |
#define | CHECK_FEOF(X, msg) if (X==0) { return(DCD_BADEOF); } |
Functions | |
void | print_dcderror (const char *func, int errcode) |
int | read_dcdheader (fio_fd fd, int *N, int *NSET, int *ISTART, int *NSAVC, double *DELTA, int *NAMNF, int **FREEINDEXES, float **fixedcoords, int *reverseEndian, int *charmm) |
int | read_charmm_extrablock (fio_fd fd, int charmm, int reverseEndian, float *unitcell) |
int | read_fixed_atoms (fio_fd fd, int N, int num_free, const int *indexes, int reverseEndian, const float *fixedcoords, float *freeatoms, float *pos, int charmm) |
int | read_charmm_4dim (fio_fd fd, int charmm, int reverseEndian) |
int | read_dcdstep (fio_fd fd, int N, float *X, float *Y, float *Z, float *unitcell, int num_fixed, int first, int *indexes, float *fixedcoords, int reverseEndian, int charmm) |
int | skip_dcdstep (fio_fd fd, int natoms, int nfixed, int charmm) |
int | write_dcdstep (fio_fd fd, int curframe, int curstep, int N, const float *X, const float *Y, const float *Z, const double *unitcell, int charmm) |
int | write_dcdheader (fio_fd fd, const char *remarks, int N, int ISTART, int NSAVC, double DELTA, int with_unitcell, int charmm) |
void | close_dcd_read (int *indexes, float *fixedcoords) |
void * | open_dcd_read (const char *path, const char *filetype, int *natoms) |
int | read_next_timestep (void *v, int natoms, molfile_timestep_t *ts) |
void | close_file_read (void *v) |
void * | open_dcd_write (const char *path, const char *filetype, int natoms) |
int | write_timestep (void *v, const molfile_timestep_t *ts) |
void | close_file_write (void *v) |
VMDPLUGIN_API int | VMDPLUGIN_init () |
VMDPLUGIN_API int | VMDPLUGIN_register (void *v, vmdplugin_register_cb cb) |
VMDPLUGIN_API int | VMDPLUGIN_fini () |
Variables | |
molfile_plugin_t | dcdplugin |
|
Definition at line 114 of file dcdplugin.c. Referenced by read_dcdheader. |
|
Definition at line 113 of file dcdplugin.c. Referenced by read_dcdheader. |
|
Definition at line 90 of file dcdplugin.c. Referenced by print_dcderror, and skip_dcdstep. |
|
Definition at line 91 of file dcdplugin.c. Referenced by print_dcderror, read_dcdheader, read_dcdstep, and read_fixed_atoms. |
|
Definition at line 93 of file dcdplugin.c. Referenced by print_dcderror, and read_dcdheader. |
|
Definition at line 89 of file dcdplugin.c. Referenced by print_dcderror, read_charmm_4dim, read_charmm_extrablock, read_dcdstep, and read_fixed_atoms. |
|
Definition at line 94 of file dcdplugin.c. Referenced by print_dcderror, and write_dcdstep. |
|
Definition at line 87 of file dcdplugin.c. Referenced by print_dcderror. |
|
Definition at line 86 of file dcdplugin.c. Referenced by print_dcderror. |
|
Definition at line 92 of file dcdplugin.c. Referenced by print_dcderror. |
|
Definition at line 98 of file dcdplugin.c. Referenced by open_dcd_read, read_charmm_4dim, read_dcdheader, and skip_dcdstep. |
|
Definition at line 100 of file dcdplugin.c. Referenced by read_charmm_4dim, read_charmm_extrablock, read_dcdheader, read_dcdstep, read_fixed_atoms, and skip_dcdstep. |
|
Definition at line 99 of file dcdplugin.c. Referenced by open_dcd_read, open_dcd_write, read_charmm_extrablock, read_dcdheader, and skip_dcdstep. |
|
Definition at line 97 of file dcdplugin.c. Referenced by open_dcd_write, read_charmm_4dim, read_charmm_extrablock, read_dcdheader, and skip_dcdstep. |
|
Definition at line 88 of file dcdplugin.c. Referenced by print_dcderror. |
|
Definition at line 85 of file dcdplugin.c. Referenced by print_dcderror, read_charmm_4dim, read_charmm_extrablock, read_dcdheader, read_dcdstep, read_fixed_atoms, skip_dcdstep, write_dcdheader, and write_dcdstep. |
|
Definition at line 59 of file dcdplugin.c. Referenced by read_next_timestep, and write_timestep. |
|
Definition at line 103 of file dcdplugin.c. Referenced by write_dcdstep. |
|
Definition at line 104 of file dcdplugin.c. Referenced by write_dcdstep. |
|
Definition at line 107 of file dcdplugin.c. Referenced by read_dcdheader. |
|
Definition at line 62 of file dcdplugin.c. Referenced by read_charmm_4dim, read_charmm_extrablock, read_dcdheader, read_dcdstep, read_fixed_atoms, and skip_dcdstep. |
|
Definition at line 63 of file dcdplugin.c. Referenced by read_charmm_4dim, read_charmm_extrablock, read_dcdheader, read_dcdstep, read_fixed_atoms, and skip_dcdstep. |
|
Definition at line 64 of file dcdplugin.c. Referenced by read_dcdstep. |
|
Definition at line 110 of file dcdplugin.c. Referenced by write_dcdheader, and write_dcdstep. |
|
Definition at line 781 of file dcdplugin.c. Referenced by close_file_read. |
|
Definition at line 977 of file dcdplugin.c. References close_dcd_read, dcdhandle::fd, fio_fclose, dcdhandle::fixedcoords, dcdhandle::freeind, dcdhandle::x, dcdhandle::y, and dcdhandle::z. |
|
Definition at line 1074 of file dcdplugin.c. References dcdhandle::fd, fio_fclose, dcdhandle::x, dcdhandle::y, and dcdhandle::z. |
|
|
Definition at line 988 of file dcdplugin.c. References dcdhandle::charmm, DCD_HAS_EXTRA_BLOCK, DCD_IS_CHARMM, dcdhandle::fd, fio_fclose, fio_fd, fio_open, FIO_WRITE, dcdhandle::istart, dcdhandle::natoms, dcdhandle::nsavc, dcdhandle::nsets, print_dcderror, dcdhandle::with_unitcell, write_dcdheader, dcdhandle::x, dcdhandle::y, and dcdhandle::z. |
|
Definition at line 118 of file dcdplugin.c. References DCD_BADEOF, DCD_BADFORMAT, DCD_BADMALLOC, DCD_BADREAD, DCD_BADWRITE, DCD_DNE, DCD_EOF, DCD_FILEEXISTS, DCD_OPENFAILED, and DCD_SUCCESS. Referenced by open_dcd_read, open_dcd_write, read_next_timestep, and write_timestep. |
|
Definition at line 459 of file dcdplugin.c. References DCD_BADREAD, DCD_HAS_4DIMS, DCD_HAS_64BIT_REC, DCD_IS_CHARMM, DCD_SUCCESS, fio_fd, fio_fread, fio_fseek, FIO_SEEK_CUR, RECSCALE32BIT, RECSCALE64BIT, and swap4_aligned. Referenced by read_dcdstep. |
|
Definition at line 391 of file dcdplugin.c. References DCD_BADREAD, DCD_HAS_64BIT_REC, DCD_HAS_EXTRA_BLOCK, DCD_IS_CHARMM, DCD_SUCCESS, fio_fd, fio_fread, fio_fseek, FIO_SEEK_CUR, RECSCALE32BIT, RECSCALE64BIT, swap4_aligned, and swap8_aligned. Referenced by read_dcdstep. |
|
Definition at line 154 of file dcdplugin.c. References CHECK_FEOF, CHECK_FREAD, DCD_BADFORMAT, DCD_BADMALLOC, DCD_HAS_4DIMS, DCD_HAS_64BIT_REC, DCD_HAS_EXTRA_BLOCK, DCD_IS_CHARMM, DCD_SUCCESS, fio_fd, fio_fseek, FIO_SEEK_CUR, READ, RECSCALE32BIT, RECSCALE64BIT, swap4_aligned, swap4_unaligned, and swap8_unaligned. Referenced by open_dcd_read. |
|
Definition at line 495 of file dcdplugin.c. References DCD_BADFORMAT, DCD_BADREAD, DCD_HAS_64BIT_REC, DCD_SUCCESS, fio_fd, fio_readv, fio_size_t, fio_iovec::iov_base, fio_iovec::iov_len, read_charmm_4dim, read_charmm_extrablock, read_fixed_atoms, RECSCALE32BIT, RECSCALE64BIT, RECSCALEMAX, and swap4_aligned. Referenced by read_next_timestep. |
|
Definition at line 423 of file dcdplugin.c. References DCD_BADFORMAT, DCD_BADREAD, DCD_HAS_64BIT_REC, DCD_SUCCESS, fio_fd, fio_fread, RECSCALE32BIT, RECSCALE64BIT, and swap4_aligned. Referenced by read_dcdstep. |
|
|
Definition at line 619 of file dcdplugin.c. References DCD_BADEOF, DCD_HAS_4DIMS, DCD_HAS_64BIT_REC, DCD_HAS_EXTRA_BLOCK, DCD_IS_CHARMM, DCD_SUCCESS, fio_fd, fio_fseek, FIO_SEEK_CUR, RECSCALE32BIT, and RECSCALE64BIT. Referenced by read_next_timestep. |
|
Definition at line 1117 of file dcdplugin.c. References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS. |
|
Definition at line 1108 of file dcdplugin.c. References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS. |
|
Definition at line 1112 of file dcdplugin.c. References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS. |
|
Definition at line 706 of file dcdplugin.c. References DCD_SUCCESS, fio_fd, fio_write_int32, and WRITE. Referenced by open_dcd_write. |
|
Definition at line 659 of file dcdplugin.c. References DCD_BADWRITE, DCD_SUCCESS, fio_fd, fio_fseek, fio_fwrite, FIO_SEEK_END, FIO_SEEK_SET, fio_write_int32, NFILE_POS, NSTEP_POS, and WRITE. Referenced by write_timestep. |
|
|
Initial value: { vmdplugin_ABIVERSION, MOLFILE_PLUGIN_TYPE, "dcd", "CHARMM,NAMD,XPLOR DCD Trajectory", "Justin Gullingsrud, John Stone", 1, 8, VMDPLUGIN_THREADSAFE, "dcd", open_dcd_read, 0, 0, read_next_timestep, close_file_read, open_dcd_write, 0, write_timestep, close_file_write } Definition at line 1087 of file dcdplugin.c. |