Skip to content
Snippets Groups Projects
Commit 2548e952 authored by Berk Onat's avatar Berk Onat
Browse files

Update Readme file and main routine to match new improvements.

parent 6908cde8
No related branches found
No related tags found
No related merge requests found
# pymolfile # 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 #### Version: 0.0.2
Python interface for molfile plugins. Python interface for molfile plugins.
......
...@@ -512,6 +512,7 @@ class OpenMolfile(object): ...@@ -512,6 +512,7 @@ class OpenMolfile(object):
self.kwords["silent"]) self.kwords["silent"])
#libpymolfile.molfile_finish() #libpymolfile.molfile_finish()
else: else:
if self.kwords["nowarnings"] is True:
warnings.warn("Pymolfile can not find a plugin to open the '" + warnings.warn("Pymolfile can not find a plugin to open the '" +
self.kwords["topology_format"] + "' file format of the file " + self.kwords["topology_format"] + "' file format of the file " +
self.kwords["topology"]) self.kwords["topology"])
...@@ -531,6 +532,7 @@ class OpenMolfile(object): ...@@ -531,6 +532,7 @@ class OpenMolfile(object):
num_atoms, num_atoms,
self.kwords["silent"]) self.kwords["silent"])
else: else:
if self.kwords["nowarnings"] is True:
warnings.warn("Pymolfile can not find a plugin to open the '" + self.kwords["file_format"] + warnings.warn("Pymolfile can not find a plugin to open the '" + self.kwords["file_format"] +
"' file format of the file " + self.kwords["file_name"]) "' file format of the file " + self.kwords["file_name"])
...@@ -553,7 +555,8 @@ class OpenMolfile(object): ...@@ -553,7 +555,8 @@ class OpenMolfile(object):
"topology_format" : None, "topology_format" : None,
"topology_plugin" : None, "topology_plugin" : None,
"natoms" : None, "natoms" : None,
"silent" : False "silent" : False,
"nowarnings" : False
} }
#if not C_MOLFILE_PLUGINS: #if not C_MOLFILE_PLUGINS:
...@@ -574,7 +577,8 @@ class OpenMolfile(object): ...@@ -574,7 +577,8 @@ class OpenMolfile(object):
"topology_format" : None, "topology_format" : None,
"topology_plugin" : None, "topology_plugin" : None,
"natoms" : None, "natoms" : None,
"silent" : False "silent" : False,
"nowarnings" : False
}) })
def __del__(self): def __del__(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment