imdclient 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- imdclient/IMDClient.py +896 -0
- imdclient/IMDProtocol.py +164 -0
- imdclient/IMDREADER.py +129 -0
- imdclient/__init__.py +14 -0
- imdclient/backends.py +352 -0
- imdclient/data/__init__.py +0 -0
- imdclient/data/gromacs/md/gromacs_struct.gro +21151 -0
- imdclient/data/gromacs/md/gromacs_v3.top +11764 -0
- imdclient/data/gromacs/md/gromacs_v3_nst1.mdp +58 -0
- imdclient/data/gromacs/md/gromacs_v3_nst1.tpr +0 -0
- imdclient/data/gromacs/md/gromacs_v3_nst1.trr +0 -0
- imdclient/data/lammps/md/lammps_topol.data +8022 -0
- imdclient/data/lammps/md/lammps_trj.h5md +0 -0
- imdclient/data/lammps/md/lammps_v3.in +71 -0
- imdclient/data/namd/md/alanin.dcd +0 -0
- imdclient/data/namd/md/alanin.params +402 -0
- imdclient/data/namd/md/alanin.pdb +77 -0
- imdclient/data/namd/md/alanin.psf +206 -0
- imdclient/data/namd/md/namd_v3.namd +47 -0
- imdclient/results.py +332 -0
- imdclient/streamanalysis.py +1056 -0
- imdclient/streambase.py +199 -0
- imdclient/tests/__init__.py +0 -0
- imdclient/tests/base.py +122 -0
- imdclient/tests/conftest.py +38 -0
- imdclient/tests/datafiles.py +34 -0
- imdclient/tests/server.py +212 -0
- imdclient/tests/test_gromacs.py +33 -0
- imdclient/tests/test_imdclient.py +150 -0
- imdclient/tests/test_imdreader.py +644 -0
- imdclient/tests/test_lammps.py +38 -0
- imdclient/tests/test_manual.py +70 -0
- imdclient/tests/test_namd.py +38 -0
- imdclient/tests/test_stream_analysis.py +61 -0
- imdclient/tests/utils.py +41 -0
- imdclient/utils.py +118 -0
- imdclient-0.1.0.dist-info/AUTHORS.md +23 -0
- imdclient-0.1.0.dist-info/LICENSE +21 -0
- imdclient-0.1.0.dist-info/METADATA +143 -0
- imdclient-0.1.0.dist-info/RECORD +42 -0
- imdclient-0.1.0.dist-info/WHEEL +5 -0
- imdclient-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,70 @@
|
|
1
|
+
from imdclient.IMDClient import IMDClient
|
2
|
+
import pytest
|
3
|
+
import MDAnalysis as mda
|
4
|
+
from MDAnalysisTests.coordinates.base import assert_timestep_almost_equal
|
5
|
+
from numpy.testing import (
|
6
|
+
assert_array_almost_equal,
|
7
|
+
assert_almost_equal,
|
8
|
+
assert_allclose,
|
9
|
+
)
|
10
|
+
import numpy as np
|
11
|
+
from .base import assert_allclose_with_logging
|
12
|
+
|
13
|
+
import logging
|
14
|
+
|
15
|
+
logger = logging.getLogger("imdclient.IMDClient")
|
16
|
+
|
17
|
+
|
18
|
+
class TestIMDv3Manual:
|
19
|
+
"""
|
20
|
+
Tool for running IMDv3 integration tests via the command line.
|
21
|
+
|
22
|
+
To use, start the simulation, wait for it to be ready for an IMD connection,
|
23
|
+
and then run this command relative to the root of the cloned respository:
|
24
|
+
|
25
|
+
pytest -s imdclient/tests/test_manual.py \
|
26
|
+
--topol_arg <path/to/topology> \
|
27
|
+
--traj_arg <path/to/trajectory> \
|
28
|
+
--first_frame_arg <first traj frame to compare to IMD>
|
29
|
+
|
30
|
+
Where the topology is the same topology as the IMD system, the trajectory is the trajectory
|
31
|
+
to compare to IMD data read from the socket, and the first frame is the first frame of the
|
32
|
+
trajectory which should be compared to IMD data read from the socket (0 for GROMACS and NAMD, 1 for LAMMPS)
|
33
|
+
"""
|
34
|
+
|
35
|
+
@pytest.fixture()
|
36
|
+
def universe(self, topol_arg, traj_arg):
|
37
|
+
return mda.Universe(topol_arg, traj_arg)
|
38
|
+
|
39
|
+
@pytest.fixture()
|
40
|
+
def client(self, universe):
|
41
|
+
client = IMDClient("localhost", 8888, universe.trajectory.n_atoms)
|
42
|
+
yield client
|
43
|
+
client.stop()
|
44
|
+
|
45
|
+
def test_compare_imd_to_true_traj(self, universe, client, first_frame_arg):
|
46
|
+
imdsinfo = client.get_imdsessioninfo()
|
47
|
+
|
48
|
+
for ts in universe.trajectory[first_frame_arg:]:
|
49
|
+
imdf = client.get_imdframe()
|
50
|
+
if imdsinfo.time:
|
51
|
+
assert_allclose(imdf.time, ts.time, atol=1e-03)
|
52
|
+
assert_allclose(imdf.step, ts.data["step"])
|
53
|
+
if imdsinfo.box:
|
54
|
+
assert_allclose_with_logging(
|
55
|
+
imdf.box,
|
56
|
+
ts.triclinic_dimensions,
|
57
|
+
atol=1e-03,
|
58
|
+
)
|
59
|
+
if imdsinfo.positions:
|
60
|
+
assert_allclose_with_logging(
|
61
|
+
imdf.positions, ts.positions, atol=1e-03
|
62
|
+
)
|
63
|
+
if imdsinfo.velocities:
|
64
|
+
assert_allclose_with_logging(
|
65
|
+
imdf.velocities, ts.velocities, atol=1e-03
|
66
|
+
)
|
67
|
+
if imdsinfo.forces:
|
68
|
+
assert_allclose_with_logging(
|
69
|
+
imdf.forces, ts.forces, atol=1e-03
|
70
|
+
)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import MDAnalysis as mda
|
2
|
+
import pytest
|
3
|
+
import logging
|
4
|
+
from .base import IMDv3IntegrationTest
|
5
|
+
from .datafiles import NAMD_TOPOL, NAMD_CONF, NAMD_TRAJ, NAMD_PARAMS, NAMD_PSF
|
6
|
+
|
7
|
+
logger = logging.getLogger("imdclient.IMDClient")
|
8
|
+
file_handler = logging.FileHandler("test.log")
|
9
|
+
formatter = logging.Formatter(
|
10
|
+
"%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
11
|
+
)
|
12
|
+
file_handler.setFormatter(formatter)
|
13
|
+
logger.addHandler(file_handler)
|
14
|
+
logger.setLevel(logging.DEBUG)
|
15
|
+
|
16
|
+
|
17
|
+
class TestIMDv3NAMD(IMDv3IntegrationTest):
|
18
|
+
|
19
|
+
@pytest.fixture()
|
20
|
+
def command(self):
|
21
|
+
return (
|
22
|
+
f"cp {NAMD_PARAMS} {NAMD_PSF} {NAMD_TOPOL} . && namd3 {NAMD_CONF}"
|
23
|
+
)
|
24
|
+
|
25
|
+
@pytest.fixture()
|
26
|
+
def match_string(self):
|
27
|
+
return "INTERACTIVE MD AWAITING CONNECTION"
|
28
|
+
|
29
|
+
@pytest.fixture()
|
30
|
+
def first_frame(self):
|
31
|
+
return 0
|
32
|
+
|
33
|
+
@pytest.fixture()
|
34
|
+
def universe(self):
|
35
|
+
return mda.Universe(
|
36
|
+
NAMD_TOPOL,
|
37
|
+
NAMD_TRAJ,
|
38
|
+
)
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import imdclient
|
2
|
+
from MDAnalysisTests.datafiles import (
|
3
|
+
COORDINATES_TOPOLOGY,
|
4
|
+
COORDINATES_H5MD,
|
5
|
+
)
|
6
|
+
import MDAnalysis as mda
|
7
|
+
from .utils import (
|
8
|
+
get_free_port,
|
9
|
+
create_default_imdsinfo_v3,
|
10
|
+
)
|
11
|
+
from .server import InThreadIMDServer
|
12
|
+
from MDAnalysis.analysis.rms import RMSF
|
13
|
+
from numpy.testing import (
|
14
|
+
assert_almost_equal,
|
15
|
+
)
|
16
|
+
import numpy as np
|
17
|
+
import pytest
|
18
|
+
from imdclient.IMDREADER import IMDReader
|
19
|
+
|
20
|
+
|
21
|
+
class TestStreamAnalysis:
|
22
|
+
|
23
|
+
@pytest.fixture
|
24
|
+
def port(self):
|
25
|
+
return get_free_port()
|
26
|
+
|
27
|
+
@pytest.fixture
|
28
|
+
def universe(self):
|
29
|
+
return mda.Universe(COORDINATES_TOPOLOGY, COORDINATES_H5MD)
|
30
|
+
|
31
|
+
@pytest.fixture
|
32
|
+
def imdsinfo(self):
|
33
|
+
return create_default_imdsinfo_v3()
|
34
|
+
|
35
|
+
@pytest.fixture
|
36
|
+
def imd_universe(self, universe, imdsinfo, port):
|
37
|
+
server = InThreadIMDServer(universe.trajectory)
|
38
|
+
server.set_imdsessioninfo(imdsinfo)
|
39
|
+
server.handshake_sequence("localhost", port, first_frame=True)
|
40
|
+
|
41
|
+
imd_universe = mda.Universe(COORDINATES_TOPOLOGY, f"localhost:{port}")
|
42
|
+
server.send_frames(1, 5)
|
43
|
+
|
44
|
+
yield imd_universe
|
45
|
+
server.cleanup()
|
46
|
+
|
47
|
+
def test_rmsf(self, imd_universe, universe):
|
48
|
+
imd_rmsf = RMSF(imd_universe.atoms).run()
|
49
|
+
rmsf = RMSF(universe.atoms).run()
|
50
|
+
|
51
|
+
assert_almost_equal(imd_rmsf.results.rmsf, rmsf.results.rmsf)
|
52
|
+
|
53
|
+
def test_stack_rmsf(self, imd_universe, universe):
|
54
|
+
r1 = RMSF(imd_universe.atoms)
|
55
|
+
r2 = RMSF(imd_universe.atoms)
|
56
|
+
imdclient.StackableAnalysis(imd_universe.trajectory, [r1, r2]).run()
|
57
|
+
|
58
|
+
rmsf = RMSF(universe.atoms).run()
|
59
|
+
|
60
|
+
assert_almost_equal(r1.results.rmsf, rmsf.results.rmsf)
|
61
|
+
assert_almost_equal(r2.results.rmsf, rmsf.results.rmsf)
|
imdclient/tests/utils.py
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
from imdclient.IMDProtocol import *
|
2
|
+
import socket
|
3
|
+
from imdclient.IMDProtocol import *
|
4
|
+
import logging
|
5
|
+
|
6
|
+
|
7
|
+
logger = logging.getLogger("imdclient.IMDClient")
|
8
|
+
|
9
|
+
|
10
|
+
def create_default_imdsinfo_v2():
|
11
|
+
return IMDSessionInfo(
|
12
|
+
version=2,
|
13
|
+
endianness="<",
|
14
|
+
wrapped_coords=True,
|
15
|
+
energies=True,
|
16
|
+
box=False,
|
17
|
+
positions=True,
|
18
|
+
velocities=False,
|
19
|
+
forces=False,
|
20
|
+
)
|
21
|
+
|
22
|
+
|
23
|
+
def create_default_imdsinfo_v3():
|
24
|
+
return IMDSessionInfo(
|
25
|
+
version=3,
|
26
|
+
endianness="<",
|
27
|
+
time=True,
|
28
|
+
energies=True,
|
29
|
+
box=True,
|
30
|
+
positions=True,
|
31
|
+
velocities=True,
|
32
|
+
forces=True,
|
33
|
+
wrapped_coords=False,
|
34
|
+
)
|
35
|
+
|
36
|
+
|
37
|
+
def get_free_port():
|
38
|
+
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
39
|
+
s.bind(("", 0))
|
40
|
+
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
41
|
+
return s.getsockname()[1]
|
imdclient/utils.py
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
import time
|
2
|
+
import logging
|
3
|
+
import select
|
4
|
+
|
5
|
+
logger = logging.getLogger("imdclient.IMDClient")
|
6
|
+
|
7
|
+
|
8
|
+
class timeit(object):
|
9
|
+
"""measure time spend in context
|
10
|
+
|
11
|
+
:class:`timeit` is a context manager (to be used with the :keyword:`with`
|
12
|
+
statement) that records the execution time for the enclosed context block
|
13
|
+
in :attr:`elapsed`.
|
14
|
+
|
15
|
+
Attributes
|
16
|
+
----------
|
17
|
+
elapsed : float
|
18
|
+
Time in seconds that elapsed between entering
|
19
|
+
and exiting the context.
|
20
|
+
|
21
|
+
Example
|
22
|
+
-------
|
23
|
+
Use as a context manager::
|
24
|
+
|
25
|
+
with timeit() as total:
|
26
|
+
# code to be timed
|
27
|
+
|
28
|
+
print(total.elapsed, "seconds")
|
29
|
+
|
30
|
+
See Also
|
31
|
+
--------
|
32
|
+
:func:`time.time`
|
33
|
+
|
34
|
+
"""
|
35
|
+
|
36
|
+
def __enter__(self):
|
37
|
+
self._start_time = time.time()
|
38
|
+
return self
|
39
|
+
|
40
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
41
|
+
end_time = time.time()
|
42
|
+
self.elapsed = end_time - self._start_time
|
43
|
+
# always propagate exceptions forward
|
44
|
+
return False
|
45
|
+
|
46
|
+
|
47
|
+
# NOTE: think of other edge cases as well- should be robust
|
48
|
+
def parse_host_port(filename):
|
49
|
+
# Check if the format is correct
|
50
|
+
parts = filename.split(":")
|
51
|
+
if len(parts) == 2:
|
52
|
+
host = parts[0] # Hostname part
|
53
|
+
try:
|
54
|
+
port = int(parts[1]) # Convert the port part to an integer
|
55
|
+
return (host, port)
|
56
|
+
except ValueError:
|
57
|
+
# Handle the case where the port is not a valid integer
|
58
|
+
raise ValueError("Port must be an integer")
|
59
|
+
else:
|
60
|
+
# Handle the case where the format does not match "host:port"
|
61
|
+
raise ValueError("Filename must be in the format 'host:port'")
|
62
|
+
|
63
|
+
|
64
|
+
def approximate_timestep_memsize(
|
65
|
+
n_atoms, energies, dimensions, positions, velocities, forces
|
66
|
+
):
|
67
|
+
total_size = 0
|
68
|
+
|
69
|
+
if energies:
|
70
|
+
total_size += 36
|
71
|
+
|
72
|
+
if dimensions:
|
73
|
+
# dimensions in the form (*A*, *B*, *C*, *alpha*, *beta*, *gamma*)
|
74
|
+
total_size += 24
|
75
|
+
|
76
|
+
for dset in (positions, velocities, forces):
|
77
|
+
if dset:
|
78
|
+
total_size += n_atoms * 12
|
79
|
+
|
80
|
+
return total_size
|
81
|
+
|
82
|
+
|
83
|
+
def read_into_buf(sock, buf):
|
84
|
+
"""Receives len(buf) bytes into buf from the socket sock"""
|
85
|
+
view = memoryview(buf)
|
86
|
+
total_received = 0
|
87
|
+
while total_received < len(view):
|
88
|
+
try:
|
89
|
+
received = sock.recv_into(view[total_received:])
|
90
|
+
if received == 0:
|
91
|
+
logger.debug(
|
92
|
+
"read_into_buf excepting due to server closing connection"
|
93
|
+
)
|
94
|
+
raise ConnectionError
|
95
|
+
except TimeoutError:
|
96
|
+
logger.debug("read_into_buf excepting due to read timeout")
|
97
|
+
raise TimeoutError
|
98
|
+
except BlockingIOError:
|
99
|
+
logger.debug(
|
100
|
+
"read_into_buf excepting because socket timeout is 0 and no bytes are available to read"
|
101
|
+
)
|
102
|
+
raise BlockingIOError
|
103
|
+
except OSError:
|
104
|
+
logger.debug(
|
105
|
+
"read_into_buf excepting because socket was closed elsewhere"
|
106
|
+
)
|
107
|
+
raise OSError
|
108
|
+
except Exception as e:
|
109
|
+
logger.debug(f"read_into_buf excepting due to: {e}")
|
110
|
+
raise e
|
111
|
+
total_received += received
|
112
|
+
|
113
|
+
|
114
|
+
def sock_contains_data(sock, timeout) -> bool:
|
115
|
+
ready_to_read, ready_to_write, in_error = select.select(
|
116
|
+
[sock], [], [], timeout
|
117
|
+
)
|
118
|
+
return sock in ready_to_read
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Authors
|
2
|
+
|
3
|
+
IMDClient was created by Lawson in 2024.
|
4
|
+
|
5
|
+
|
6
|
+
<!-- All contributing authors are listed in this file below.
|
7
|
+
The repository history at https://github.com/becksteinlab/imdreader
|
8
|
+
and the CHANGELOG show individual code contributions. -->
|
9
|
+
|
10
|
+
## Chronological list of authors
|
11
|
+
|
12
|
+
<!--
|
13
|
+
The rules for this file:
|
14
|
+
* Authors are sorted chronologically, earliest to latest
|
15
|
+
* Please format it each entry as "Preferred name <GitHub username>"
|
16
|
+
* Your preferred name is whatever you wish to go by --
|
17
|
+
it does *not* have to be your legal name!
|
18
|
+
* Please start a new section for each new year
|
19
|
+
* Don't ever delete anything
|
20
|
+
-->
|
21
|
+
|
22
|
+
**2024**
|
23
|
+
- Lawson <@ljwoods2>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 ljwoods2
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,143 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: imdclient
|
3
|
+
Version: 0.1.0
|
4
|
+
Summary: Receiver for IMD v2 and v3 data from simulation engines like Gromacs, LAMMPS, and NAMD
|
5
|
+
Author-email: Lawson <ljwoods2@asu.edu>
|
6
|
+
Maintainer-email: Lawson <ljwoods2@asu.edu>
|
7
|
+
License: MIT License
|
8
|
+
|
9
|
+
Copyright (c) 2024 ljwoods2
|
10
|
+
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
13
|
+
in the Software without restriction, including without limitation the rights
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
16
|
+
furnished to do so, subject to the following conditions:
|
17
|
+
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
19
|
+
copies or substantial portions of the Software.
|
20
|
+
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
27
|
+
SOFTWARE.
|
28
|
+
|
29
|
+
Keywords: molecular simulations
|
30
|
+
Requires-Python: >=3.9
|
31
|
+
Description-Content-Type: text/markdown
|
32
|
+
License-File: LICENSE
|
33
|
+
License-File: AUTHORS.md
|
34
|
+
Requires-Dist: MDAnalysis >=2.7.0
|
35
|
+
Provides-Extra: doc
|
36
|
+
Requires-Dist: sphinx ; extra == 'doc'
|
37
|
+
Requires-Dist: sphinx-rtd-theme ; extra == 'doc'
|
38
|
+
Provides-Extra: test
|
39
|
+
Requires-Dist: pytest >=6.0 ; extra == 'test'
|
40
|
+
Requires-Dist: pytest-xdist >=2.5 ; extra == 'test'
|
41
|
+
Requires-Dist: pytest-cov >=3.0 ; extra == 'test'
|
42
|
+
Requires-Dist: MDAnalysisTests >=2.7.0 ; extra == 'test'
|
43
|
+
|
44
|
+
IMDClient
|
45
|
+
==============================
|
46
|
+
[//]: # (Badges)
|
47
|
+
|
48
|
+
| **Latest release** | [![Last release tag][badge_release]][url_latest_release] ![GitHub commits since latest release (by date) for a branch][badge_commits_since] [![Documentation Status][badge_docs]][url_docs]|
|
49
|
+
| :----------------- | :------- |
|
50
|
+
| **Status** | [![GH Actions Status][badge_actions]][url_actions] [![codecov][badge_codecov]][url_codecov] |
|
51
|
+
| **Community** | [![License: GPL v2][badge_license]][url_license] [![Powered by MDAnalysis][badge_mda]][url_mda]|
|
52
|
+
|
53
|
+
[badge_actions]: https://github.com/becksteinlab/imdclient/actions/workflows/gh-ci.yaml/badge.svg
|
54
|
+
[badge_codecov]: https://codecov.io/gh/becksteinlab/imdclient/branch/main/graph/badge.svg
|
55
|
+
[badge_commits_since]: https://img.shields.io/github/commits-since/becksteinlab/imdclient/latest
|
56
|
+
[badge_docs]: https://readthedocs.org/projects/imdclient/badge/?version=latest
|
57
|
+
[badge_license]: https://img.shields.io/badge/License-MIT-blue.svg
|
58
|
+
[badge_mda]: https://img.shields.io/badge/powered%20by-MDAnalysis-orange.svg?logoWidth=16&logo=data:image/x-icon;base64,AAABAAEAEBAAAAEAIAAoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJD+XwCY/fEAkf3uAJf97wGT/a+HfHaoiIWE7n9/f+6Hh4fvgICAjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACT/yYAlP//AJ///wCg//8JjvOchXly1oaGhv+Ghob/j4+P/39/f3IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJH8aQCY/8wAkv2kfY+elJ6al/yVlZX7iIiI8H9/f7h/f38UAAAAAAAAAAAAAAAAAAAAAAAAAAB/f38egYF/noqAebF8gYaagnx3oFpUUtZpaWr/WFhY8zo6OmT///8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICAn46Ojv+Hh4b/jouJ/4iGhfcAAADnAAAA/wAAAP8AAADIAAAAAwCj/zIAnf2VAJD/PAAAAAAAAAAAAAAAAICAgNGHh4f/gICA/4SEhP+Xl5f/AwMD/wAAAP8AAAD/AAAA/wAAAB8Aov9/ALr//wCS/Z0AAAAAAAAAAAAAAACBgYGOjo6O/4mJif+Pj4//iYmJ/wAAAOAAAAD+AAAA/wAAAP8AAABhAP7+FgCi/38Axf4fAAAAAAAAAAAAAAAAiIiID4GBgYKCgoKogoB+fYSEgZhgYGDZXl5e/m9vb/9ISEjpEBAQxw8AAFQAAAAAAAAANQAAADcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjo6Mb5iYmP+cnJz/jY2N95CQkO4pKSn/AAAA7gAAAP0AAAD7AAAAhgAAAAEAAAAAAAAAAACL/gsAkv2uAJX/QQAAAAB9fX3egoKC/4CAgP+NjY3/c3Nz+wAAAP8AAAD/AAAA/wAAAPUAAAAcAAAAAAAAAAAAnP4NAJL9rgCR/0YAAAAAfX19w4ODg/98fHz/i4uL/4qKivwAAAD/AAAA/wAAAP8AAAD1AAAAGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALGxsVyqqqr/mpqa/6mpqf9KSUn/AAAA5QAAAPkAAAD5AAAAhQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADkUFBSuZ2dn/3V1df8uLi7bAAAATgBGfyQAAAA2AAAAMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0AAADoAAAA/wAAAP8AAAD/AAAAWgC3/2AAnv3eAJ/+dgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9AAAA/wAAAP8AAAD/AAAA/wAKDzEAnP3WAKn//wCS/OgAf/8MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIQAAANwAAADtAAAA7QAAAMAAABUMAJn9gwCe/e0Aj/2LAP//AQAAAAAAAAAA
|
59
|
+
[badge_release]: https://img.shields.io/github/release-pre/becksteinlab/imdclient.svg
|
60
|
+
[url_actions]: https://github.com/becksteinlab/imdclient/actions?query=branch%3Amain+workflow%3Agh-ci
|
61
|
+
[url_codecov]: https://codecov.io/gh/becksteinlab/imdclient/branch/main
|
62
|
+
[url_docs]: https://imdclient.readthedocs.io/en/latest/?badge=latest
|
63
|
+
[url_latest_release]: https://github.com/becksteinlab/imdclient/releases
|
64
|
+
[url_license]: https://www.gnu.org/licenses/gpl-2.0
|
65
|
+
[url_mda]: https://www.mdanalysis.org
|
66
|
+
|
67
|
+
Receiver for IMDv3 protocol from simulation engines like Gromacs, LAMMPS, and NAMD.
|
68
|
+
|
69
|
+
IMDClient is bound by a [Code of Conduct](https://github.com/becksteinlab/imdreader/blob/main/CODE_OF_CONDUCT.md).
|
70
|
+
|
71
|
+
### Installation
|
72
|
+
|
73
|
+
To build IMDClient from source,
|
74
|
+
we highly recommend using virtual environments.
|
75
|
+
If possible, we strongly recommend that you use
|
76
|
+
[Anaconda](https://docs.conda.io/en/latest/) as your package manager.
|
77
|
+
Below we provide instructions both for `conda` and
|
78
|
+
for `pip`.
|
79
|
+
|
80
|
+
#### With conda
|
81
|
+
|
82
|
+
Ensure that you have [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) installed.
|
83
|
+
|
84
|
+
Create a virtual environment and activate it:
|
85
|
+
|
86
|
+
```
|
87
|
+
conda create --name imdclient
|
88
|
+
conda activate imdclient
|
89
|
+
```
|
90
|
+
|
91
|
+
<!-- Install the development and documentation dependencies:
|
92
|
+
|
93
|
+
```
|
94
|
+
conda env update --name imdreader --file devtools/conda-envs/test_env.yaml
|
95
|
+
conda env update --name imdreader --file docs/requirements.yaml
|
96
|
+
``` -->
|
97
|
+
|
98
|
+
Build this package from source:
|
99
|
+
|
100
|
+
```
|
101
|
+
pip install -e .
|
102
|
+
```
|
103
|
+
|
104
|
+
If you want to update your dependencies (which can be risky!), run:
|
105
|
+
|
106
|
+
```
|
107
|
+
conda update --all
|
108
|
+
```
|
109
|
+
|
110
|
+
And when you are finished, you can exit the virtual environment with:
|
111
|
+
|
112
|
+
```
|
113
|
+
conda deactivate
|
114
|
+
```
|
115
|
+
|
116
|
+
#### With pip
|
117
|
+
|
118
|
+
To build the package from source, run:
|
119
|
+
|
120
|
+
```
|
121
|
+
pip install .
|
122
|
+
```
|
123
|
+
|
124
|
+
If you want to create a development environment, install
|
125
|
+
the dependencies required for tests and docs with:
|
126
|
+
|
127
|
+
```
|
128
|
+
pip install ".[test,doc]"
|
129
|
+
```
|
130
|
+
|
131
|
+
### Copyright
|
132
|
+
|
133
|
+
The IMDClient source code is hosted at https://github.com/becksteinlab/imdclient
|
134
|
+
and is available under the MIT license (see the file [LICENSE](https://github.com/becksteinlab/imdclient/blob/main/LICENSE)).
|
135
|
+
|
136
|
+
Copyright (c) 2024, Lawson
|
137
|
+
|
138
|
+
|
139
|
+
#### Acknowledgements
|
140
|
+
|
141
|
+
Project based on the
|
142
|
+
[MDAnalysis Cookiecutter](https://github.com/MDAnalysis/cookiecutter-mda) version 0.1.
|
143
|
+
<!-- Please cite [MDAnalysis](https://github.com/MDAnalysis/mdanalysis#citation) when using IMDReader in published work. -->
|
@@ -0,0 +1,42 @@
|
|
1
|
+
imdclient/IMDClient.py,sha256=2P4wgv8fZjZ_3JFLsm3L2JxxAlTAiWTZtXr5vRWJHf0,30687
|
2
|
+
imdclient/IMDProtocol.py,sha256=jm7ehwfDCcs-zWHjZ2V2KpAWdGhD4JSy7RVtCSF0818,4045
|
3
|
+
imdclient/IMDREADER.py,sha256=V8yfkQkKYyWwYh0V2m7EOg0yzdsUKmQAqDmIlzgiiIY,3712
|
4
|
+
imdclient/__init__.py,sha256=Pa5h6Fjyvyxf3ECzO43pcmLm3Vk-vOuEb5Gi6TDWhds,339
|
5
|
+
imdclient/backends.py,sha256=QmHjwYbmvFVHz-uFgpSOA0UmZTZqiMGqWMO7B8wr1zs,10368
|
6
|
+
imdclient/results.py,sha256=2MyjFdQMW7BfiHhG5X6wQwMVrF_0mKYFnv907lgLMas,9920
|
7
|
+
imdclient/streamanalysis.py,sha256=Qq0h_WPO-wb0_lP8jTRHe0HX7UDZNgJFA6C4PZdUmK8,38385
|
8
|
+
imdclient/streambase.py,sha256=rwhdyC2V3_9pSz_6rNwjSc4MNToI9S318OH7AH0arHA,6176
|
9
|
+
imdclient/utils.py,sha256=kd1e5nqEOb46hCR_9ITjDB30j56mXFbV0u_wMv0pMco,3330
|
10
|
+
imdclient/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
+
imdclient/data/gromacs/md/gromacs_struct.gro,sha256=kt4vE10iF_1RbeyTogmYmIY9yKJacofrzNT-hPHGyL8,1459301
|
12
|
+
imdclient/data/gromacs/md/gromacs_v3.top,sha256=AXFEDjvz5Qqq-VECffimdeEvhD6L-H0SFPILW-6Sums,348329
|
13
|
+
imdclient/data/gromacs/md/gromacs_v3_nst1.mdp,sha256=3ZStLxoeQo7k5R3C6EY2oRxet_FAccDEIwVsymbN8f4,3053
|
14
|
+
imdclient/data/gromacs/md/gromacs_v3_nst1.tpr,sha256=YDXlSFxUmvRBuo2za7By7QYzcdQ6Z0agypl3V5Hqt4Q,912932
|
15
|
+
imdclient/data/gromacs/md/gromacs_v3_nst1.trr,sha256=deehbC7X_HvJj_DDRptoePNhjKy70w8n_myWsxoPWMQ,76906248
|
16
|
+
imdclient/data/lammps/md/lammps_topol.data,sha256=u4osSkn7yG9p2Egz9ovLW4eVmdaThPxeZ0L218J3-V0,172948
|
17
|
+
imdclient/data/lammps/md/lammps_trj.h5md,sha256=9J5dCVznJQKDFCSCS73p0YMR0hYDzyQC4WPVEsopw4s,30116656
|
18
|
+
imdclient/data/lammps/md/lammps_v3.in,sha256=4MF-lXcVoFVTjuqAy5Z9o5ukj3qhZ3cK3hKc8em-050,2592
|
19
|
+
imdclient/data/namd/md/alanin.dcd,sha256=UJIjQBjv6oZTn5CnJNwU_5mur_KrD69iV5TOvq935lo,8436
|
20
|
+
imdclient/data/namd/md/alanin.params,sha256=zWw-UfqYD3-xpdA_8R8T-0OYBbUM6py7jKAq_uyu8HE,17389
|
21
|
+
imdclient/data/namd/md/alanin.pdb,sha256=eccDD-ledUXjbB2s1fxY40lmAKWWDpxkxANbsOkqjHc,5615
|
22
|
+
imdclient/data/namd/md/alanin.psf,sha256=VhCZeGFhpUa8yN5iEL19zlVjqIJg2JIdPzhazpRForY,12953
|
23
|
+
imdclient/data/namd/md/namd_v3.namd,sha256=KWH3RXsa0aeA9dYSz9CnUFHcDGbAFnB3yLoYaLtCiBs,720
|
24
|
+
imdclient/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
|
+
imdclient/tests/base.py,sha256=OsoZm4T5E7p4XEQ6F4Je0g3vgpa8wcPQgKbWaC2AttQ,3761
|
26
|
+
imdclient/tests/conftest.py,sha256=k_QOYMf8Q70ebP1tRKclIYYM9DE6XKvP5NiJgllu8w8,1255
|
27
|
+
imdclient/tests/datafiles.py,sha256=36Mip1wx_LHukJIaHu0Ew-F0XFIEXNEyXg2wRzQLDaM,1118
|
28
|
+
imdclient/tests/server.py,sha256=7KqzDg74d7Oe617jctB-rDGvEUNSaT9agkp9SiEtiME,6978
|
29
|
+
imdclient/tests/test_gromacs.py,sha256=4HbgK6lnE6G35bvYDpFiQbLVz7-q9BB9FKsgjeCa9do,942
|
30
|
+
imdclient/tests/test_imdclient.py,sha256=99u_xIHNMCCJSew5IoPndxAa5N3F-r37jqFProkl4Ts,5336
|
31
|
+
imdclient/tests/test_imdreader.py,sha256=TID3iFOZRY3wrHobYkP5FNYIYwAt3c2SIc8ACkTSotY,22954
|
32
|
+
imdclient/tests/test_lammps.py,sha256=NZqX0Hj65I3A33LpejZThZTo-0PuI_4x_wODzJ9o490,957
|
33
|
+
imdclient/tests/test_manual.py,sha256=2YNRkpaGdI5-Pro6xSCujhwZHsHf0C1Ehu2v2dk3lbM,2507
|
34
|
+
imdclient/tests/test_namd.py,sha256=69F27qUH2GmdQMvm3RQHQFS1aAl8JiNz16SN8D6mp-E,962
|
35
|
+
imdclient/tests/test_stream_analysis.py,sha256=BS3U-FwBc2shYAsDHvUX8H6Zioo_tUNGirkzWcuMXEY,1723
|
36
|
+
imdclient/tests/utils.py,sha256=i5GviFFdIaDsAOv8giP_jVJUeGww86nD0l2brB4_jRM,890
|
37
|
+
imdclient-0.1.0.dist-info/AUTHORS.md,sha256=R4JTI7mrgL1WYgfyuAv4quw0e0oLQGVjWcMQa-UXJlE,652
|
38
|
+
imdclient-0.1.0.dist-info/LICENSE,sha256=cERlftlPR1Vka6DmjkIosLRBZTXXhOsLFU3jw1ELcXs,1065
|
39
|
+
imdclient-0.1.0.dist-info/METADATA,sha256=HimAyna3ttkLycOdoVunxbpkjDkHd-IIYkqEkJldPfQ,6952
|
40
|
+
imdclient-0.1.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
41
|
+
imdclient-0.1.0.dist-info/top_level.txt,sha256=40W62GWiXUT2CbDm-No7GTeJG160wyIMpk1hBNrdkkE,10
|
42
|
+
imdclient-0.1.0.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
imdclient
|