Dear Feng:
I only partially agree with your point that XML can be a good way to
describe *read only* parameter files, such as force field parameter files.
Another big advantage of adopting XML is that we can have a better approach
to validate parameter file via DTD.
However, from past experiences, I think following issues should be
addressed:
1. Due to the nature of XML, the coding efforts in reading and writing are
not quite balanced. Though reading is easy, preparing XML is a relative
tedious work because we have to recursively build the DOM tree. In contrast,
plain text file are quite balanced in r/w operation. So, I think XML here is
more suitable to handle readonly parameter files.
2. The open source fortran XML libs are not as robust and portable as C/C++
counterparts right now. Unfortunately, most amber programs were written in
fortran.
3. For large files, e.g. trajectories, their size can be 2 or 3 times larger
than that of plain file. Your coding example will be very inefficient then.
If insisted, you have to
switch your design from DOM to SAX, and it is a totally different coding
patterns. For programmers with only occasional XML coding needs, it
apparently would not reduce much coding efforts.
best regards
qxb
--
... there have been two really clean,
consistent models of programming so far:
the C model and the Lisp model.
These two seem points of high ground,
with swampy lowlands between them.
--Paul Graham
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Sat Apr 08 2006 - 18:29:15 PDT