[gmx-developers] libxml2

David van der Spoel spoel at xray.bmc.uu.se
Mon Nov 18 23:06:22 CET 2013

On 2013-11-18 17:45, Erik Lindahl wrote:
> Hi,
> On 18 Nov 2013, at 16:23, Mark Abraham <mark.j.abraham at gmail.com
> <mailto:mark.j.abraham at gmail.com>> wrote:
>> Looks like a good start! Thanks.
> Yes indeed!
>> I'm not sure whether <gromacs
>> xmlns:gmx="http://www.gromacs.__org/schemas
>> <http://www.gromacs.org/schemas>"> should name a schema file, or a
>> place to look up a schema file. Does anyone know? In the past I have
>> seem XML files with namespace-specific content like
> Formally it does not have to point to anything, IIRC; the only
> requirement is that it is a UUID (universal unique identifier) for each
> individual schema (thus, no common web page). However, I think it makes
> a lot of sense to make it point to an actual schema file, but since this
> is likely to be a quick/transient/temporary solution I also think it’s a
> good idea to create a special namespace (and schema) for it, rather than
> using the default “gromacs” name (since that will clobber all future usage)?
>>   <gmx:sfactors type="Fourier" force_field="any"
>> displaced_solvent="true" reference="">
>>     <gmx:sfactor residue="ALA" atom="MW" type="1”>
> A couple of minor things:
> * Since we’re moving to C++, should we use camelcase for new files? I
> also think we should write out names for clarity - in particular when we
> only use them a handful of times. In other words, I prefer
> “StructureFactor” over sfactor, etc. Readability rocks :-)
Sure no problem.

> * When it comes to the type of structure factor, to me it looks as if
> this is specific to electronic structure factors (or will it work for
> neutrons or other stuff too?). In that case we should probably encode that!
This may differ indeed, per the source (X-ray, neutron, electron) and 
wavelength (energy) of the source. Will check with my experimental 

> * Units are great, although I would use “^-1” to denote each reciprocal
> component. That way we might have a chance of creating an automatic
> parsing in the future.
Fine. Semi-automatic parsing has been in gromacs for while now (physics.c).
> * Rather than doing “type=1”, what does the type mean here? It seems to
> be a different sort of “type” from the same field on the preceding line.
Ok this is rather nasty, for communication with grompp. Can rename for 
clarity but rather this should be unnecessary.

> * To me it sounds _very_ bold to claim that a file will work for “any”
> force field. Will it really be applicable both to all-atom, united-atom
> and CG force fields of all kinds? If not, I think it should be
> FF-specific (just like we have copies of many other files in lots of
> directories)
There are three different classes in our present implementation for 
atoms, for Martini and for amino-acids (through center-of-mass of 
residue scattering center). So any is not accurate indeed, but rather 
the force fields should include a qualifier that we can match. There is 
no reason to have different atomistic scattering factors for charmm and 
amber. But if someone coughs up another CG force field it will need 
specific new scattering factors.

> * Not sure if this is complicated, but would it be possible to encode
> the order of each factor through an attribute rather than introducing
> new XML tags for each of them?
Yes this would be possible, but most xml gurus tend to shy away from 
attributes in favor of xml tags. Note that different tags implement 
different units here.
> * Finally, to try and help rather than nitpicking about specific fields:
> David, perhaps you do a high-level description about the things you want
> to encode, and what choices we need for that? What choices are allowed
> in different parts?
There is a paper submitted by my coworkers. There is even the beginning 
of a manual description in the patch in gerrit. Is that what you mean?

> Cheers,
> Erik

David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205.
spoel at xray.bmc.uu.se    http://folding.bmc.uu.se

More information about the gromacs.org_gmx-developers mailing list