i-pi-dev_archive
i-pi-dev_archive copied to clipboard
Input file format
While I appreciate the advantages of XML, I don't think it is all that great to work with "by hand". After all, it is not really intended for human consumption. Do we perhaps want to consider another format that has the advantages of XML, but is more human friendly? Two options that come to mind are YAML and just plain Python dictionaries, though they might have trouble with good support for both reading and writing.
I am interested in opinions and would be happy to work on the implementation.
I like yaml, even though I think that the hierarchical structure of XML matches better the module structure in IPI. I agree that if we want to change input format completely it is a now or never situation.
What worries me is that this is a lot of boring work with lots of collateral damage - eg examples and documentation. To be crystal clear, I would myself dedicate zero time to this.
In many ways this is closely related to the sphinx documentation rewriting. If one wants to do that, then one can also revolutionize input. This is ultimately for you to decide with @joshmore - he did most of the hard work on documentation, and would be the one who could help you on this.
OK, how much would we have to re-write to get this to work? Pretty much the entire manual, all the examples, the xml parser, everything in the inputs directory, bits of the properties and trajectories files... That seems like a rather large amount of work and I'm not entirely sure what we'd gain from it. What we win in terms of clarity we'd lose again with the loss of well-defined hierarchical structure. Also, doesn't YAML have more syntax to learn than XML? I'm going to need a really persuasive argument before going along with this.
Thanks for the input. To clarify, I don't have any reason to push this too much, I just thought it would be more user-friendly to use a format that is easier to work with.
I see how this might be a pretty big change across the whole code base, but I am not yet familiar with it enough to estimate how much. YAML looks pretty natural to me, but it could be something else. I was just looking for something that has structure but less syntactic cruft than XML. It is entirely possible that the small difference for the user is not worth the effort.
For what it's worth, Desmond uses JSON, for example.
To clarify, I have no fundamental objection to changing the input from xml to a leaner markup language. Just I fear it is a lot of work (probably at least a week full time) for dubious gain.