File: read_xml.py

package info (click to toggle)
mmtk 2.7.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,788 kB
  • ctags: 6,600
  • sloc: python: 18,050; ansic: 12,400; makefile: 129; csh: 3
file content (9 lines) | stat: -rw-r--r-- 271 bytes parent folder | download
1
2
3
4
5
6
7
8
9
# Read a universe from an XML file produced by the writeXML() method.
#
# The file used here is produced by running the example molecule_factory.py
#

from MMTK.XML import XMLMoleculeFactory

factory = XMLMoleculeFactory('water_universe.xml')
universe = factory.universe