Skip to content

Commit

Permalink
changed metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
rsexton2 committed Feb 21, 2024
1 parent 772cc9b commit 1f39ead
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions basicrta/contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,11 @@ def run(self):
lens = np.array(lens)
mapsize = sum(lens)
bounds = np.concatenate([[0], np.cumsum(lens)])
dtype = np.dtype(np.float64,
metadata={'top': self.u.filename,
'traj': self.u.trajectory.filename,
'ag1': ag1, 'ag2': ag2})
dtype = np.dtype(np.float64, metadata={'u': self.u, 'ag1': ag1,
'ag2': ag2})

contact_map = np.memmap('.tmpmap', mode='w+',
shape=(mapsize, 5), dtype=np.float64)
shape=(mapsize, 5), dtype=dtype)
for i in range(self.nslices):
contact_map[bounds[i]:bounds[i+1]] = np.genfromtxt(f'.contacts_'
f'{i:04}',
Expand Down Expand Up @@ -131,7 +129,7 @@ def run(self):
pool = Pool(self.nproc, initializer=tqdm.set_lock, initargs=(Lock(),))

try:
lens = pool.istarmap(self._lipswap, params)
lens = pool.starmap(self._lipswap, params)
except KeyboardInterrupt:
pool.terminate()
pool.close()
Expand Down

0 comments on commit 1f39ead

Please sign in to comment.