|
Last change
on this file since eb94c1 was eb94c1, checked in by Saskia Metzler <metzler@…>, 16 years ago |
|
Work-in-progress commit of change tracker and parser
|
-
Property mode
set to
100644
|
|
File size:
481 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * XyzParser.cpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Mar 2, 2010
|
|---|
| 5 | * Author: metzler
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | void XyzParser::load(char* fileName) {
|
|---|
| 9 | MatrixContainer* data = readData(fileName, 2, 0);
|
|---|
| 10 | comment
|
|---|
| 11 | for (each line in matrix) {
|
|---|
| 12 | add atom to the world
|
|---|
| 13 | }
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | void XyzParser::save(char* fileName) {
|
|---|
| 17 | write number of atoms to file
|
|---|
| 18 | write comment from original header to file or sum formula if there is none
|
|---|
| 19 | for (each atom in world) {
|
|---|
| 20 | write coordinates
|
|---|
| 21 | }
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | int getHeaderSize(char identifier) {
|
|---|
| 25 | return 2;
|
|---|
| 26 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.