Commit d38e18cb authored by Berk Onat's avatar Berk Onat

Initial Commit

parents
# Tinker Parser
[NOMAD Laboratory CoE](http://nomad-coe.eu) parser for [TINKER](https://dasher.wustl.edu/tinker/)
## Version 0.0.1
This is the parser for Tinker in [TINKER](https://dasher.wustl.edu/tinker/).
The official version lives at:
git@gitlab.mpcdf.mpg.de:nomad-lab/parser-tinker.git
You can browse it at:
https://gitlab.rzg.mpg.de/nomad-lab/parser-tinker
It relies on having the nomad-meta-info and the python-common repositories one level higher.
The simplest way to have this is to check out nomad-lab-base recursively:
git clone --recursive git@gitlab.mpcdf.mpg.de:nomad-lab/nomad-lab-base.git
This parser will be in the directory parsers/tinker of this repository.
## Running and Testing the Parser
### Requirements
The required python packages can be installed with (see [python-common](https://gitlab.rzg.mpg.de/nomad-lab/python-common)):
pip install -r nomad-lab-base/python-common/requirements.txt
### Usage
Tinker MD log output files can be parsed with:
python TINKERParser.py [path/toFile]
### Test Files
Example log output files of Tinker can be found in the directory test/examples.
More details about the calculations and files are explained in README file of test/examples.
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6.1 virtualenv at /labEnv3" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/parser-amber.iml" filepath="$PROJECT_DIR$/.idea/parser-amber.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="projectConfiguration" value="Nosetests" />
<option name="PROJECT_TEST_RUNNER" value="Nosetests" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="7426a5df-0b63-4709-ab28-0c6e68476f74" name="Default" comment="" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300" />
</component>
<component name="ProjectFrameBounds">
<option name="x" value="303" />
<option name="y" value="66" />
<option name="width" value="1602" />
<option name="height" value="1164" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="parser-amber" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="parser-amber" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration default="true" type="PythonConfigurationType" factoryName="Python">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="parser-amber" />
<option name="SCRIPT_NAME" value="" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<method />
</configuration>
<configuration default="true" type="Tox" factoryName="Tox">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="parser-amber" />
<method />
</configuration>
<configuration default="true" type="tests" factoryName="Doctests">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="parser-amber" />
<option name="SCRIPT_NAME" value="" />
<option name="CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="FOLDER_NAME" value="" />
<option name="TEST_TYPE" value="TEST_SCRIPT" />
<option name="PATTERN" value="" />
<option name="USE_PATTERN" value="false" />
<method />
</configuration>
<configuration default="true" type="tests" factoryName="Nosetests">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="parser-amber" />
<option name="_new_regexPattern" value="&quot;&quot;" />
<option name="_new_additionalArguments" value="&quot;&quot;" />
<option name="_new_target" value="&quot;.&quot;" />
<option name="_new_targetType" value="&quot;PATH&quot;" />
<method />
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="7426a5df-0b63-4709-ab28-0c6e68476f74" name="Default" comment="" />
<created>1497006387415</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1497006387415</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="303" y="66" width="1602" height="1164" extended-state="0" />
<layout>
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2496879" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32968035" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<ignored-roots>
<path value="$PROJECT_DIR$/../.." />
</ignored-roots>
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/AMBERParser.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#0#24#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/AMBERParser.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="42" column="61" lean-forward="false" selection-start-line="42" selection-start-column="61" selection-end-line="42" selection-end-column="61" />
<folding>
<element signature="e#0#24#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
import logging
import os
PARSERNAME = "TINKER"
PROGRAMNAME = "tinker"
PARSERVERSION = "0.0.1"
PARSERMETANAME = PARSERNAME.lower()
PARSERTAG = 'x_' + PARSERMETANAME
PARSER_INFO_DEFAULT = {
'name' : PARSERMETANAME+'-parser',
'version': PARSERVERSION
}
META_INFO_PATH = os.path.normpath(os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"../../../../nomad-meta-info/meta_info/nomad_meta_info/"+PARSERMETANAME+".nomadmetainfo.json"))
LOGGER = logging.getLogger("nomad."+PROGRAMNAME+"Parser")
def set_excludeList(self):
"""Sets the exclude list for x_
Returns:
the list of names
"""
excludelist = [
PARSERTAG+'_mdin_verbatim_writeout',
PARSERTAG+'_dumm_text',
PARSERTAG+'_dummy',
PARSERTAG+'_mdin_wt'
]
excludelist.extend([PARSERTAG+'_mdin_file_%s' % fileNL.lower() for fileNL in self.fileDict.keys()])
excludelist.extend([PARSERTAG+'_mdin_%s' % cntrlNL.lower() for cntrlNL in self.cntrlDict.keys()])
excludelist.extend([PARSERTAG+'_mdin_%s' % ewaldNL.lower() for ewaldNL in self.ewaldDict.keys()])
excludelist.extend([PARSERTAG+'_mdin_%s' % qmmmNL.lower() for qmmmNL in self.qmmmDict.keys()])
return excludelist
def set_includeList():
"""Sets the include list for x_
Returns:
the list of names
"""
includelist = []
return includelist
import setup_paths
import numpy as np
from TINKERCommon import PARSERNAME, PROGRAMNAME, PARSERTAG
from nomadcore.smart_parser.SmartParserDictionary import metaNameConverter, metaNameConverter_UnderscoreSpaceDash
from nomadcore.smart_parser.SmartParserDictionary import MetaInfoMap, FileInfoMap, MapDictionary
from nomadcore.smart_parser.SmartParserDictionary import getDict_MetaStrInDict, getList_MetaStrInDict, get_unitDict
import nomadcore.md_data_access.MDDataAccess as MDData
def get_fileListDict():
"""Loads dictionary for file namelists.
Returns:
the list of defaults file namelists
"""
startpage = {
'nameTranslate' : metaNameConverter,
'metaHeader' : PARSERTAG,
'metaNameTag' : 'inout_file',
'metaInfoType' : 'C',
'activeMetaNames' : [],
'activeSections' : [PARSERTAG+'_section_input_output_files'],
'fileInterface' : ["tinkerread", "parmed", "mdanalysis", "mdtraj", "pymolfile"]
}
namelist = {
'structure' : FileInfoMap(startpage, fileFormat=['.tinkerxyz', '.txyz'], activeInfo=False,
infoPurpose=['topology', 'inputcoordinates']),
'input_coord' : FileInfoMap(startpage, fileFormat=['.tinkerxyz', '.txyz'], activeInfo=False,
infoPurpose=['inputcoordinates', 'inputvelocities']),
'output_coord' : FileInfoMap(startpage, fileFormat=['.tinkerdyn', '.dyn'], activeInfo=False,
infoPurpose=['outputcoordinates', 'outputvelocities']),
'trajectory' : FileInfoMap(startpage, fileFormat=['.txyz', '.arc'], activeInfo=False,
infoPurpose=['trajectory']),
'parameter' : FileInfoMap(startpage, fileFormat=['.tinkerprm'], activeInfo=False,
infoPurpose=['forcefield']),
'output_log' : FileInfoMap(startpage),
'control_input' : FileInfoMap(startpage),
}
return MapDictionary(namelist)
def get_nameListDict(deflist):
"""Loads control in data of TINKER.
Args:
deflist: name list definition (cntrl/parm).
matchWith parameters:
EOL = End of line
PL = Match with previous line
PW = Previous word
NW = Next word (until space, comma) (DEFAULT)
UD = until delimeter (can be any string/character)
The text matched inside apostrophe or qoutation is extracted
Returns:
the list of namelists
"""
startpage = {
'nameTranslate' : metaNameConverter_UnderscoreSpaceDash,
'metaHeader' : PARSERTAG,
'metaNameTag' : 'inout_control',
'metaInfoType' : 'C',
'activeMetaNames' : [],
'activeSections' : [PARSERTAG+'_section_control_parameters'],
}
mdcntrllist = {
'RMS Grad' : MetaInfoMap(startpage),
'Molecular Dynamics Trajectory via' : MetaInfoMap(startpage, matchWith='EOL',
replaceTag='integrator',
subFunc=lambda x: ' '.join(x.strip().split()) if x is not None else None),
'Optimization' : MetaInfoMap(startpage, matchWith='BOL',
replaceTag='optimization algorithm',
subFunc=lambda x: ' '.join(x.strip().split()) if x is not None else None),
'Algorithm' : MetaInfoMap(startpage),
'Random Number Generator Initialized with SEED' : MetaInfoMap(startpage,
replaceTag='Random Number Generator seed'),
'Preconditioning' : MetaInfoMap(startpage),
'Termin' : MetaInfoMap(startpage, matchWith='PW', matchAlso='--',
replaceTag='termination status'),
'nation' : MetaInfoMap(startpage, matchAlso='--', matchWith='EOL',
replaceTag='termination reason',
subFunc=lambda x: ' '.join(x.strip().replace(
'due to', '').replace('at', '').split()) if x is not None else None),
'Function Value' : MetaInfoMap(startpage),
'RMS Gradient' : MetaInfoMap(startpage),
'RMS Coordinate Gradient' : MetaInfoMap(startpage),
'RMS Lattice Gradient' : MetaInfoMap(startpage),
'Final Gradient Norm' : MetaInfoMap(startpage),
'Coordinate Gradient Norm' : MetaInfoMap(startpage),
'Lattice Gradient Norm' : MetaInfoMap(startpage),
#'' : MetaInfoMap(startpage, defaultValue=None),
}
filecntrllist = {
'key file' : MetaInfoMap(startpage, defaultValue=None),
'coordinate file list' : MetaInfoMap(startpage, defaultValue=None),
'topology file' : MetaInfoMap(startpage, defaultValue=None),
'force field file' : MetaInfoMap(startpage, defaultValue=None),
'initial configuration file' : MetaInfoMap(startpage, defaultValue=None),
'final configuration file' : MetaInfoMap(startpage, defaultValue=None),
'initial trajectory file' : MetaInfoMap(startpage, defaultValue=None),
'restart file' : MetaInfoMap(startpage, defaultValue=None),
'archive file' : MetaInfoMap(startpage, defaultValue=None),
}
topocntrllist = {
'atom' : MetaInfoMap(startpage, defaultValue=None),
'vdw' : MetaInfoMap(startpage, defaultValue=None),
'bond' : MetaInfoMap(startpage, defaultValue=None),
'angle' : MetaInfoMap(startpage, defaultValue=None),
'ureybond' : MetaInfoMap(startpage, defaultValue=None),
'charge' : MetaInfoMap(startpage, defaultValue=None),
}
cntrllist = {
'NSTEP' : MetaInfoMap(startpage, defaultValue=None),
'parameters' : MetaInfoMap(startpage, defaultValue=None),
'verbose' : MetaInfoMap(startpage, defaultValue=None),
'lights' : MetaInfoMap(startpage, defaultValue=None),
'randomseed' : MetaInfoMap(startpage, defaultValue=None),
'a-axis' : MetaInfoMap(startpage, defaultValue=None),
'b-axis' : MetaInfoMap(startpage, defaultValue=None),
'c-axis' : MetaInfoMap(startpage, defaultValue=None),
'alpha' : MetaInfoMap(startpage, defaultValue=None),
'beta' : MetaInfoMap(startpage, defaultValue=None),
'gamma' : MetaInfoMap(startpage, defaultValue=None),
'vdwtype' : MetaInfoMap(startpage, defaultValue=None),
'radiusrule' : MetaInfoMap(startpage, defaultValue=None),
'radiustype' : MetaInfoMap(startpage, defaultValue=None),
'radiussize' : MetaInfoMap(startpage, defaultValue=None),
'epsilonrule' : MetaInfoMap(startpage, defaultValue=None),
'dielectric' : MetaInfoMap(startpage, defaultValue=None),
'integrator' : MetaInfoMap(startpage, defaultValue=None),
'rattle' : MetaInfoMap(startpage, defaultValue=None),
'lambda' : MetaInfoMap(startpage, defaultValue=None),
'mutate' : MetaInfoMap(startpage, defaultValue=None),
'basin' : MetaInfoMap(startpage, defaultValue=None),
'saddlepoint' : MetaInfoMap(startpage, defaultValue=None),
'neighbor-list' : MetaInfoMap(startpage, defaultValue=None),
'vdw-cutoff' : MetaInfoMap(startpage, defaultValue=None),
'vdw-correction' : MetaInfoMap(startpage, defaultValue=None),
'ewald' : MetaInfoMap(startpage, defaultValue=None),
'ewald-cutoff' : MetaInfoMap(startpage, defaultValue=None),
'pme-grid' : MetaInfoMap(startpage, defaultValue=None),
'pme-order' : MetaInfoMap(startpage, defaultValue=None),
'polar-eps' : MetaInfoMap(startpage, defaultValue=None),
'enforce-chirality' : MetaInfoMap(startpage, defaultValue=None),
'printout' : MetaInfoMap(startpage, defaultValue=None),
'digits' : MetaInfoMap(startpage, defaultValue=None),
'spacegroup' : MetaInfoMap(startpage, defaultValue=None),
'vib-roots' : MetaInfoMap(startpage, defaultValue=None),
'group-inter' : MetaInfoMap(startpage, defaultValue=None),
'group' : MetaInfoMap(startpage, defaultValue=None),
'debug' : MetaInfoMap(startpage, defaultValue=None),
'chargeterm' : MetaInfoMap(startpage, defaultValue=None),
'archive' : MetaInfoMap(startpage, defaultValue=None),
'barostat' : MetaInfoMap(startpage, defaultValue=None),
'aniso-pressure' : MetaInfoMap(startpage, defaultValue=None),
'trial-distance' : MetaInfoMap(startpage, defaultValue=None),
'trial-distribution' : MetaInfoMap(startpage, defaultValue=None),
#'restrain-torsion' : MetaInfoMap(startpage, defaultValue=None, activeInfo=False),
#'restrain-distance' : MetaInfoMap(startpage, defaultValue=None, activeInfo=False),
'group-molecule' : MetaInfoMap(startpage, defaultValue=None),
'mpole-list' : MetaInfoMap(startpage, defaultValue=None),
'tau-temperature' : MetaInfoMap(startpage, defaultValue=None),
'tau-pressure' : MetaInfoMap(startpage, defaultValue=None),
}
startpage.update({
'metaNameTag' : 'mdout',
'activeSections' : ['section_single_configuration_calculation']
})
mddatalist = {
'MD Step' : MetaInfoMap(startpage),
'InputCoordStep' : MetaInfoMap(startpage),
'OutputCoordStep' : MetaInfoMap(startpage),
'E Total' : MetaInfoMap(startpage),
'E Potential' : MetaInfoMap(startpage),
'E Kinetic' : MetaInfoMap(startpage),
'Temp' : MetaInfoMap(startpage),
'Pres' : MetaInfoMap(startpage),
'STEP' : MetaInfoMap(startpage),
'TIME' : MetaInfoMap(startpage),
'VOLUME' : MetaInfoMap(startpage),
'VIRIAL' : MetaInfoMap(startpage),
'Dynamics Steps' : MetaInfoMap(startpage, defaultValue=None, matchWith='PW'),
'Simulation Time' : MetaInfoMap(startpage, defaultValue=None),
'Total Energy' : MetaInfoMap(startpage, defaultValue=None),
'Potential Energy' : MetaInfoMap(startpage, defaultValue=None),
'Kinetic Energy' : MetaInfoMap(startpage, defaultValue=None),
'Temperature' : MetaInfoMap(startpage, defaultValue=None),
'Pressure' : MetaInfoMap(startpage, defaultValue=None),
'Density' : MetaInfoMap(startpage, defaultValue=None),
'Current Time' : MetaInfoMap(startpage, defaultValue=None),
'Current Potential' : MetaInfoMap(startpage, defaultValue=None),
'Current Kinetic' : MetaInfoMap(startpage, defaultValue=None),
'Lattice Lengths' : MetaInfoMap(startpage, defaultValue=None, matchWith='EOL',
subFunc=lambda x: ','.join(x.strip().split()) if x is not None else None),
'Lattice Angles' : MetaInfoMap(startpage, defaultValue=None, matchWith='EOL',
subFunc=lambda x: ','.join(x.strip().split()) if x is not None else None),
'Frame Number' : MetaInfoMap(startpage, defaultValue=None),
'Coordinate File' : MetaInfoMap(startpage, defaultValue=None),
'VM Iter' : MetaInfoMap(startpage),
'TN Iter' : MetaInfoMap(startpage),
'QN Iter' : MetaInfoMap(startpage),
'CG Iter' : MetaInfoMap(startpage),
'F Value' : MetaInfoMap(startpage),
'G RMS' : MetaInfoMap(startpage),
'RMS G' : MetaInfoMap(startpage),
'F Move' : MetaInfoMap(startpage),
'X Move' : MetaInfoMap(startpage),
'Angle' : MetaInfoMap(startpage),
'FG Call' : MetaInfoMap(startpage),
}
startpage.update({
'metaNameTag' : 'parm',
'activeSections' : [PARSERTAG+'_mdin_method']
})
extralist = {
'flags' : MetaInfoMap(startpage),
'number_of_atoms' : MetaInfoMap(startpage),
'minimization' : MetaInfoMap(startpage, activeInfo=True),
'integrator' : MetaInfoMap(startpage, activeInfo=True),
'thermostat' : MetaInfoMap(startpage, activeInfo=True),
'barostat' : MetaInfoMap(startpage, activeInfo=True),
'box_info' : MetaInfoMap(startpage),
'unitcell_radius' : MetaInfoMap(startpage),
'total_memory' : MetaInfoMap(startpage),
'file_format' : MetaInfoMap(startpage),
'file_version' : MetaInfoMap(startpage),
'file_date' : MetaInfoMap(startpage),
'file_time' : MetaInfoMap(startpage)
}
if deflist == 'mddata':
namelist = mddatalist
elif deflist == 'mdcntrl':
namelist = mdcntrllist
elif deflist == 'topocntrl':
namelist = topocntrllist
elif deflist == 'extra':
namelist = extralist
elif deflist == 'filecntrl':
namelist = filecntrllist
elif deflist == 'stepcontrol':
namelist = stepcontrol
else:
namelist = cntrllist
return MapDictionary(namelist)
def set_Dictionaries(self):
self.unitDict = get_unitDict('si')
self.fileDict = get_fileListDict()
self.cntrlDict = get_nameListDict('cntrl')
self.mdcntrlDict = get_nameListDict('mdcntrl')
self.topocntrlDict = get_nameListDict('topocntrl')
self.mdoutDict = get_nameListDict('mdout')