[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] Espresso input/output with Python

From: Michael Winokur
Subject: Re: [ESPResSo-users] Espresso input/output with Python
Date: Fri, 23 Dec 2016 15:03:25 -0600

Hello Kai,

Thanks for the quick response.  There are still a few issues:

1.  My e-mail to espressomd-users is getting a rejection notice (but clearly it is getting through)
2.  The build using the python branch is a little cryptic because cmake breaks if I simply follow the directions.  After three minor changes (it is not clear that all three were needed) the source builds (I am on the learning curve with cmake but no matter).
3.  I presume that I must still customize myconfig.hpp
4.  After the build (no error) I note the the directory ~/core/src/python/espressomd/io/writer was missing and so this line "from import h5md  # pylint: disable=import-error" in the test program failed.

I tried copying these files "by hand" from the python source branch into my working directory.  The above line worked and now there are also *.pyc files in this directory.

However the following line breaks:  "h5_file = h5md.H5md(filename="sample.h5", write_pos=True, write_vel=True,
                    write_force=True, write_type=True, write_mass=False)"
with this message

terminate called after throwing an instance of 'std::domain_error'
  what():  Class 'ScriptInterface::Writer::H5mdScript' not found.
[romano5:16742] *** Process received signal ***
[romano5:16742] Signal: Aborted (6)
[romano5:16742] Signal code:  (-6)
[romano5:16742] [ 0] /lib/x86_64-linux-gnu/[0x7f014eb57100]
[romano5:16742] [ 1] /lib/x86_64-linux-gnu/[0x7f014deb5fdf]
[romano5:16742] [ 2] /lib/x86_64-linux-gnu/[0x7f014deb740a]
[romano5:16742] [ 3] /usr/lib/x86_64-linux-gnu/[0x7f014724a04d]
[romano5:16742] [ 4] /usr/lib/x86_64-linux-gnu/[0x7f0147248016]
[romano5:16742] [ 5] /usr/lib/x86_64-linux-gnu/[0x7f0147248061]
[romano5:16742] [ 6] /usr/lib/x86_64-linux-gnu/[0x7f0147248279]
[romano5:16742] [ 7] /home/winokur/Espresso/espresso-utd/core/src/script_interface/[0x7f0149dd070b]
[romano5:16742] [ 8] /home/winokur/Espresso/espresso-utd/core/src/script_interface/[0x7f0149df540b]
[romano5:16742] [ 9] /home/winokur/Espresso/espresso-utd/core/src/script_interface/[0x7f0149dcfe0d]
[romano5:16742] [10] /home/winokur/Espresso/espresso-utd/core/src/python/espressomd/[0x7f0145e041c0]
[romano5:16742] [11] /usr/bin/python(+0xed414)[0x55aad6ef6414]
[romano5:16742] [12] /usr/bin/python(PyObject_Call+0x43)[0x55aad6ef08f3]
[romano5:16742] [13] /usr/bin/python(PyEval_EvalFrameEx+0x60ff)[0x55aad6f09c6f]
[romano5:16742] [14] /usr/bin/python(PyEval_EvalCodeEx+0x255)[0x55aad6f02345]
[romano5:16742] [15] /usr/bin/python(+0x1161a8)[0x55aad6f1f1a8]
[romano5:16742] [16] /usr/bin/python(PyObject_Call+0x43)[0x55aad6ef08f3]
[romano5:16742] [17] /usr/bin/python(+0x12c54e)[0x55aad6f3554e]
[romano5:16742] [18] /usr/bin/python(PyObject_Call+0x43)[0x55aad6ef08f3]
[romano5:16742] [19] /usr/bin/python(+0x12c287)[0x55aad6f35287]
[romano5:16742] [20] /usr/bin/python(+0xed414)[0x55aad6ef6414]
[romano5:16742] [21] /usr/bin/python(PyObject_Call+0x43)[0x55aad6ef08f3]
[romano5:16742] [22] /usr/bin/python(PyEval_EvalFrameEx+0x60ff)[0x55aad6f09c6f]
[romano5:16742] [23] /usr/bin/python(PyEval_EvalCodeEx+0x255)[0x55aad6f02345]
[romano5:16742] [24] /usr/bin/python(PyEval_EvalCode+0x19)[0x55aad6f020e9]
[romano5:16742] [25] /usr/bin/python(+0x1293af)[0x55aad6f323af]
[romano5:16742] [26] /usr/bin/python(PyRun_InteractiveOneFlags+0x199)[0x55aad6e8c745]
[romano5:16742] [27] /usr/bin/python(PyRun_InteractiveLoopFlags+0xc6)[0x55aad6e8c499]
[romano5:16742] [28] /usr/bin/python(+0x65bfc)[0x55aad6e6ebfc]
[romano5:16742] [29] /usr/bin/python(Py_Main+0x6c1)[0x55aad6eddfb1]
[romano5:16742] *** End of error message ***

So clearly something is still amiss.

How should I proceed?

Thanks again,


On Fri, Dec 23, 2016 at 2:51 AM, Kai Szuttor <address@hidden> wrote:
Hi Michael,

please use the python branch if you want the latest features of the
python interface. There is an in-core implementation of the hdf5 format
which is documented and also has a sample script.
Please keep in mind that you have to install the hdf5-plugin for VMD
available on github in order to be able to read the written h5 files of

As far as I know the imd stuff is not ported and won't be ported to
python, instead we have an openGL and mayavi visualization (also
available in the python branch).


On Thu, Dec 22, 2016 at 04:46:25PM -0600, Michael Winokur wrote:
>    Hello,
>    I am starting to make sure I can use some basic functions and it seems
>    that the best way at present to transfer data to VMD is by the hdf5
>    read/write functions.A  I've been trying to get to work but
>    this sample file generates an error message:A
>    Traceback (most recent call last):
>    A  File "<stdin>", line 35, in <module>
>    A  File "espressomd/h5md.pyx", line 247, in
>    espressomd.h5md.write_to_h5.pos
>    (/home/winokur/Espresso/espresso-master/build/src/python/espressomd/h5md.cpp:7376)
>    AttributeError: 'System' object has no attribute 'n_part'
>    My version of Espresso is from the "master" git download.A
>    Also, will the imd communication protocol be ported to Python?
>    Thanks,
>    Michael

reply via email to

[Prev in Thread] Current Thread [Next in Thread]