/* Molecular Vibrations Analyser - VibrAlyzer * * This programme fourier transforms input from ESPACK (temperature output) * in order to make the automated retrieval of vibrational frequencies possible. */ #include #include #include /** Main routine. * The routine needs a file name to be read as the temperature file, and also * a frequency range (start and steps). Standard one-dimensional fourier-trans- * formation via a simple discrete integration over the given values from the * file is performed and the result returned on stdout. * \param argc parameter count * \param **argv array of parameter (array of chars) * \return error code */ int main(int argc, char **argv) { FILE *temperature_file; // file with temperature values double *time_steps, *temperatures; // contain data value pairs int counter; // keeps track of data pairs array size double freq_start, freq_step; // frequency start and step width (end determined by number of points in temp.file) char *filename; // filename of temp.file char line[255]; // line buffer for parsing the temperature file int i,j; // runtime variable double result, iresult; // temporary result value for fourier transformation double frequency; // current frequency during dumb O(N^2) integration double gauge; // conversion to atomic units for time axis // Check for needed arguments if (argc < 4) { printf("Molecular Vibrations Analyser - VibrAlyzer\n\n"); printf("Usage: %s