/* This file is an example for the chemfiles library * Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ #include #include static int compare_matches(const void* lhs, const void* rhs); int main(void) { CHFL_TRAJECTORY* input = chfl_trajectory_open("input.arc", 'r'); CHFL_TRAJECTORY* output = chfl_trajectory_open("output.pdb", 'w'); CHFL_FRAME* frame = chfl_frame(); CHFL_SELECTION* selection = chfl_selection("name Zn or name N"); uint64_t nsteps = 0; chfl_trajectory_nsteps(input, &nsteps); for (size_t step=0; step right) return -1; if (right < left) return 1; return 0; }