Changeset 63443f for molecuilder
- Timestamp:
- Jul 27, 2009, 2:22:20 PM (16 years ago)
- Children:
- dd69cc
- Parents:
- a0fb02
- git-author:
- Frederik Heber <heber@…> (07/27/09 14:19:12)
- git-committer:
- Frederik Heber <heber@…> (07/27/09 14:22:20)
- File:
-
- 1 edited
-
molecuilder/src/config.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/config.cpp
ra0fb02 r63443f 936 936 map<int, atom *> AtomList[config::MaxTypes]; 937 937 map<int, atom *> LinearList; 938 atom *neues = NULL; 938 939 if (!FastParsing) { 939 940 // parse in trajectories 940 941 bool status = true; 941 atom *neues = NULL;942 942 while (status) { 943 943 cout << "Currently parsing MD step " << repetition << "." << endl; … … 949 949 neues = new atom(); 950 950 AtomList[i][j] = neues; 951 LinearList[ FileBuffer->CurrentLine] = neues;951 LinearList[ FileBuffer->LineMapping[FileBuffer->CurrentLine] ] = neues; 952 952 neues->type = elementhash[i]; // find element type 953 953 } else … … 1005 1005 } 1006 1006 repetition++; 1007 }1008 // put atoms into the molecule in their original order1009 for(map<int, atom*>::iterator runner = LinearList.begin(); runner != LinearList.end(); ++runner) {1010 mol->AddAtom(runner->second);1011 1007 } 1012 1008 repetition--; … … 1026 1022 for(int j=0;j<No[i];j++) { 1027 1023 sprintf(keyword,"%s_%i",name, j+1); 1028 atom *neues = new atom(); 1024 if (repetition == 0) { 1025 neues = new atom(); 1026 AtomList[i][j] = neues; 1027 LinearList[ FileBuffer->LineMapping[FileBuffer->CurrentLine] ] = neues; 1028 neues->type = elementhash[i]; // find element type 1029 } else 1030 neues = AtomList[i][j]; 1029 1031 // then parse for each atom the coordinates as often as present 1030 1032 ParseForParameter(verbose,FileBuffer, keyword, 0, 1, 1, double_type, &neues->x.x[0], repetition,critical); … … 1043 1045 } 1044 1046 } 1047 } 1048 // put atoms into the molecule in their original order 1049 for(map<int, atom*>::iterator runner = LinearList.begin(); runner != LinearList.end(); ++runner) { 1050 mol->AddAtom(runner->second); 1045 1051 } 1046 1052 }
Note:
See TracChangeset
for help on using the changeset viewer.
