Changeset 71910a for molecuilder/src/builder.cpp
- Timestamp:
- Apr 7, 2010, 3:45:38 PM (15 years ago)
- Children:
- 0f55b2
- Parents:
- 770138
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/builder.cpp
r770138 r71910a 1487 1487 Log() << Verbose(2) << "found element " << first->type->name << endl; 1488 1488 for (int i=NDIM;i--;) 1489 first->x .x[i] = atof(argv[argptr+1+i]);1489 first->x[i] = atof(argv[argptr+1+i]); 1490 1490 if (first->type != NULL) { 1491 1491 mol->AddAtom(first); // add to molecule … … 1837 1837 Log() << Verbose(1) << "Translating all ions by given vector." << endl; 1838 1838 for (int i=NDIM;i--;) 1839 x .x[i] = atof(argv[argptr+i]);1839 x[i] = atof(argv[argptr+i]); 1840 1840 mol->Translate((const Vector *)&x); 1841 1841 argptr+=3; … … 1853 1853 Log() << Verbose(1) << "Translating all ions periodically by given vector." << endl; 1854 1854 for (int i=NDIM;i--;) 1855 x .x[i] = atof(argv[argptr+i]);1855 x[i] = atof(argv[argptr+i]); 1856 1856 mol->TranslatePeriodically((const Vector *)&x); 1857 1857 argptr+=3; … … 1875 1875 for (int i=0;i<NDIM;i++) { 1876 1876 j += i+1; 1877 x .x[i] = atof(argv[NDIM+i]);1877 x[i] = atof(argv[NDIM+i]); 1878 1878 mol->cell_size[j]*=factor[i]; 1879 1879 } … … 1936 1936 for (int i=0;i<NDIM;i++) { 1937 1937 j += i+1; 1938 x .x[i] = atof(argv[argptr+i]);1939 mol->cell_size[j] += x .x[i]*2.;1938 x[i] = atof(argv[argptr+i]); 1939 mol->cell_size[j] += x[i]*2.; 1940 1940 } 1941 1941 mol->Translate((const Vector *)&x); … … 2094 2094 x.Zero(); 2095 2095 y.Zero(); 2096 y .x[abs(axis)-1] = mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude2096 y[abs(axis)-1] = mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude 2097 2097 for (int i=1;i<faktor;i++) { // then add this list with respective translation factor times 2098 2098 x.AddVector(&y); // per factor one cell width further
Note:
See TracChangeset
for help on using the changeset viewer.