diff --git a/doc/src/dump_modify.rst b/doc/src/dump_modify.rst index 4d1fb77b10..5dfde62282 100644 --- a/doc/src/dump_modify.rst +++ b/doc/src/dump_modify.rst @@ -381,9 +381,9 @@ performed with dump style *xtc*\ . ---------- The *colname* keyword can be used to change the default header keyword -for dump styles: *atom*, *custom*, and *cfg* and their compressed and -MPIIO variants. The setting for *ID string* replaces the default text -with the provided string. *ID* can be a positive integer when it +for dump styles: *atom*, *custom*, and *cfg* and their compressed, ADIOS, +and MPIIO variants. The setting for *ID string* replaces the default +text with the provided string. *ID* can be a positive integer when it represents the column number counting from the left, a negative integer when it represents the column number from the right (i.e. -1 is the last column/keyword), or a thermo keyword (or compute, fix, property, or diff --git a/src/ADIOS/dump_atom_adios.cpp b/src/ADIOS/dump_atom_adios.cpp index 3e637b02d7..7588b6775b 100644 --- a/src/ADIOS/dump_atom_adios.cpp +++ b/src/ADIOS/dump_atom_adios.cpp @@ -238,6 +238,9 @@ void DumpAtomADIOS::init_style() columnNames = {"id", "type", "xs", "ys", "zs", "ix", "iy", "iz"}; } + for (int icol = 0; icol < (int)columnNames.size(); ++icol) + if (keyword_user[icol].size()) columnNames[icol] = keyword_user[icol]; + // setup function ptrs if (scale_flag == 1 && image_flag == 0 && domain->triclinic == 0) diff --git a/src/ADIOS/dump_custom_adios.cpp b/src/ADIOS/dump_custom_adios.cpp index 263f15349c..82cc4a9c0c 100644 --- a/src/ADIOS/dump_custom_adios.cpp +++ b/src/ADIOS/dump_custom_adios.cpp @@ -214,6 +214,19 @@ void DumpCustomADIOS::write() void DumpCustomADIOS::init_style() { + // assemble column string from defaults and user values + + delete[] columns; + std::string combined; + int icol = 0; + for (auto item : utils::split_words(columns_default)) { + if (combined.size()) combined += " "; + if (keyword_user[icol].size()) combined += keyword_user[icol]; + else combined += item; + ++icol; + } + columns = utils::strdup(combined); + // setup boundary string domain->boundary_string(boundstr);