Commit 2548e952 authored by Berk Onat's avatar Berk Onat

Update Readme file and main routine to match new improvements.

parent 6908cde8
# pymolfile
#### Version: 0.0.3
What is new?
* Added script to change printf/fprintf to stdout and stderr at C level on molfile plugins to make the package compatiable with NOMAD parsers.
* Added "nowarnings" option to OpenMolfile to prevent user warnings.
Anything in mind for additional improvements?
* C level silencing modifications are mandatory. This might be optional with a setup.py parameter.
* pymolfile only supports read fucntions at plugins. Write functions might also be added to convert data to other formats.
Needs precaution when using?
* Recursive initialization of OpenMolfile leads to breaks at trajectory class when an outer calling function fails (Ex: in MDDataAccess package) since trajectory file can still be open and can not be closed properly without a delete call.
#### Version: 0.0.2
Python interface for molfile plugins.
......
......@@ -512,9 +512,10 @@ class OpenMolfile(object):
self.kwords["silent"])
#libpymolfile.molfile_finish()
else:
warnings.warn("Pymolfile can not find a plugin to open the '" +
self.kwords["topology_format"] + "' file format of the file " +
self.kwords["topology"])
if self.kwords["nowarnings"] is True:
warnings.warn("Pymolfile can not find a plugin to open the '" +
self.kwords["topology_format"] + "' file format of the file " +
self.kwords["topology"])
if self.fplugin[1][5] == 1:
num_atoms = 0
......@@ -531,8 +532,9 @@ class OpenMolfile(object):
num_atoms,
self.kwords["silent"])
else:
warnings.warn("Pymolfile can not find a plugin to open the '" + self.kwords["file_format"] +
"' file format of the file " + self.kwords["file_name"])
if self.kwords["nowarnings"] is True:
warnings.warn("Pymolfile can not find a plugin to open the '" + self.kwords["file_format"] +
"' file format of the file " + self.kwords["file_name"])
def initialize_settings(self):
#global MOLFILE_PLUGINS
......@@ -553,7 +555,8 @@ class OpenMolfile(object):
"topology_format" : None,
"topology_plugin" : None,
"natoms" : None,
"silent" : False
"silent" : False,
"nowarnings" : False
}
#if not C_MOLFILE_PLUGINS:
......@@ -574,7 +577,8 @@ class OpenMolfile(object):
"topology_format" : None,
"topology_plugin" : None,
"natoms" : None,
"silent" : False
"silent" : False,
"nowarnings" : False
})
def __del__(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment