void domainType::print(int currentFrame) {
FILE *ndxFile {std::fopen(outPut.c_str(), "a+")}, *slFile {std::fopen(("selectionList-" + outPut.substr(0, outPut.size() - 4)).c_str(), "a+")};
short int writeCount {0};
- if (currentFrame == 0) {
+ if (indexFlag) {
std::fprintf(ndxFile, "[C-alpha]\n");
std::fprintf(slFile, "group %cC-alpha%c;\n", '"', '"');
for (size_t i {0}; i < structIndex.size(); ++i) {
std::fprintf(ndxFile, "%5lu ", structIndex[i] + 1);
}
std::fprintf(ndxFile,"\n\n");
+ indexFlag = false;
}
if (domains.size() == 0) {
std::fclose(ndxFile);
int ts {window / 10}; // selectable
// название выходного файла для записи доменов, так же происходит создание selectionList для выделенных доменов
std::string outPut = "default.ndx"; // selectable
+ // флаг для первой записи индекса в файл групп
+ bool indexFlag = true;
// инициализация матриц соотношений в структуре
void setGraph(std::vector< std::vector< node > > &smallGraph);