We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a4225ce + 07d6bc7 commit 9fac9faCopy full SHA for 9fac9fa
2 files changed
.gitignore
@@ -71,3 +71,6 @@ docs/_build/
71
72
# PyBuilder
73
target/
74
+# pixi environments
75
+.pixi/*
76
+!.pixi/config.toml
contact_map/contact_map.py
@@ -6,6 +6,7 @@
6
import collections
7
import itertools
8
import pickle
9
+import io
10
import json
11
12
import warnings
@@ -273,7 +274,7 @@ def from_dict(cls, dct):
273
274
def _deserialize_topology(topology_json):
275
"""Create MDTraj topology from JSON-serialized version"""
276
table, bonds = json.loads(topology_json)
- topology_df = pd.read_json(table)
277
+ topology_df = pd.read_json(io.StringIO(table))
278
topology = md.Topology.from_dataframe(topology_df,
279
np.array(bonds))
280
return topology
0 commit comments