[MMTK] MMTK 2.5.5
khinsen at cea.fr
khinsen at cea.fr
Mon Feb 21 15:21:57 CET 2005
A new development release of MMTK, 2.5.5, is available now at the
standard locations. There are two new features that qualify as
experimental: the definition of molecules from within a Python script,
and the storage of molecular systems in XML files.
The new module MMTK.MoleculeFactory permits the definition of groups
and molecules in terms of atoms, groups, and bonds. Coordinates and
attributes can be defined as well. See the example
Miscellaneous/molecule_factory.py for an illustration of its use. This
approach to molecule construction is complementary to the usual one of
writing database definition files. Depending on the application, one or
the other may be more practical.
The XML file storage is a result of a discussion on an FSAtom mailing
list a while ago. The goal was the development of an XML interchange
format to be used by many molecular simulation packages. There was a
lively discussion about the format itself, but when the question turned
to actually implementing one in various programs, the list went silent.
The format now implemented in MMTK is the last proposal I made on that
list. It uses CML tags as much as possible, though I won't claim that
it actually is CML, as CML is so huge that I never looked at all the
details of the definition. At the moment there is no other program that
uses the same format so its use for exchanging data is more than
limited. However, it can already be used to apply XML tools to
molecular systems definitions. If a concensus about an XML exchange
format ever evolves and gets implemented, I will probably modify MMTK's
XML code to use that format as well.
To write any object (molecule, universe, ...) to an XML file, use the
method writeXML(). To read an XML file, use the module MMTK.XML and see
the example Miscellaneous/read_xml.py.
Note that for reading XML files you must have the cElementTree module
installed. You can obtain it from
http://effbot.org/zone/celementtree.htm
Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Laboratoire Léon Brillouin, CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr
---------------------------------------------------------------------
More information about the mmtk
mailing list