Commit 84d2e94e authored by Diogo Martins's avatar Diogo Martins
Browse files

issue #39, full git hash, write hash + runtime to dlg

parent 2bdc6584
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -194,7 +194,7 @@ check-env-all: check-env-dev check-env-cpu check-env-gpu
# ------------------------------------------------------
# Priting out its git version hash

GIT_VERSION := $(shell git describe --abbrev=7 --dirty --always --tags)
GIT_VERSION := $(shell git describe --abbrev=40 --dirty --always --tags)

CFLAGS+=-DVERSION=\"$(GIT_VERSION)\"

+9 −0
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@ int main(int argc, char* argv[])
	Liganddata myligand_init;
	Dockpars   mypars;
	float*     floatgrids;
	FILE*      fp;
	char report_file_name [256];

	clock_t clock_start_program, clock_stop_program;
	clock_start_program = clock();
@@ -127,6 +129,13 @@ int main(int argc, char* argv[])
	num_usec    = time_end.tv_usec - time_start.tv_usec;
	elapsed_sec = num_sec + (num_usec/1000000);
	printf("Program run time %.3f sec \n\n", elapsed_sec);

    // Append time information to .dlg file
	strcpy(report_file_name, mypars.resname);
	strcat(report_file_name, ".dlg");
	fp = fopen(report_file_name, "a");
	fprintf(fp, "\n\n\nProgram run time %.3f sec\n", elapsed_sec);
	fclose(fp);
	//// ------------------------
#endif
	return 0;
+1 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ void write_basic_info_dlg(FILE* fp, const Liganddata* ligand_ref, const Dockpars
	char temp_filename [128];
	int i;

	fprintf(fp, "OCLADock version: %s\n\n", VERSION);

	fprintf(fp, "**********************************************************\n");
	fprintf(fp, "**      OCLADOCK AUTODOCKTOOLS-COMPATIBLE DLG FILE      **\n");