Ignore Cython c files.

This commit is contained in:
Niels Müller
2016-06-03 13:06:56 +02:00
parent 76c7e793a6
commit 8d3d09fcc9
6 changed files with 27 additions and 8880 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
# distutils: sources = mdevaluate/gromacs/compression.c
# distutils: sources = pygmx/gromacs/compression.c
from cython cimport view
from array import array
@ -19,28 +19,28 @@ cdef extern from "compression.h":
def decompress(int size, float precision, minint, maxint, int smallidx, bytes blob):
assert len(minint) == 3
assert len(maxint) == 3
cdef int minints[3]
cdef int maxints[3]
for i in range(3):
minints[i] = minint[i]
maxints[i] = maxint[i]
cdef np.ndarray[float, ndim=2] coordinates = np.empty((size,3), dtype=np.float32)
cdef size_t readed
xdrfile_decompress_coord_float(
<float *>coordinates.data,
size,
<float *>coordinates.data,
size,
precision,
maxints,
minints,
smallidx,
minints,
smallidx,
blob,
len(blob),
&readed)

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,9 @@ import xdrlib
import io
import os
from .coordinates import decompress
from ..utils import hash_anything, merge_hashes
from functools import partial
import numpy as np
import hashlib
TRR_MAGIC = 1993
XTC_MAGIC = 1995
@ -352,7 +352,11 @@ class XTCReader(BaseReader):
return [self[i].time for i in indices]
def __hash__(self):
return merge_hashes(hash_anything(self.filename), hash_anything(self._cache))
m = hashlib.md5()
m.update(self.filename.encode())
m.update(str(self._cache).encode())
return int.from_bytes(m.digest(), 'big')
# return merge_hashes(hash_anything(self.filename), hash_anything(self._cache))
class TRRHeader: