diff --git a/src/fix_print.cpp b/src/fix_print.cpp index 198b1fd8be..6181600acb 100644 --- a/src/fix_print.cpp +++ b/src/fix_print.cpp @@ -46,10 +46,11 @@ FixPrint::FixPrint(LAMMPS *lmp, int narg, char **arg) : int iarg = 5; while (iarg < narg) { - if (strcmp(arg[iarg],"file") == 0) { + if (strcmp(arg[iarg],"file") == 0 || strcmp(arg[iarg],"append") == 0) { if (iarg+2 > narg) error->all("Illegal fix print command"); if (me == 0) { - fp = fopen(arg[iarg+1],"w"); + if (strcmp(arg[iarg],"file") == 0) fp = fopen(arg[iarg+1],"w"); + else fp = fopen(arg[iarg+1],"a"); if (fp == NULL) { char str[128]; sprintf(str,"Cannot open fix print file %s",arg[iarg+1]);