Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cythonized Timestep [Core] #3683

Merged
merged 73 commits into from
Jun 13, 2022
Merged
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
15f6f34
add start of timestep class
hmacdope May 24, 2022
401201d
finalize copy over
hmacdope May 24, 2022
7c9eb5f
add to init dunder and change tested class
hmacdope May 24, 2022
a1a5253
passes api tests
hmacdope May 24, 2022
0238c0b
partially working
hmacdope May 25, 2022
2334483
fix hasattr calls
hmacdope May 25, 2022
7919324
imporve error message
hmacdope May 25, 2022
ddac2ef
remove frame get set method
hmacdope May 25, 2022
3db54d6
add _frame attr
hmacdope May 25, 2022
085a7b4
make sure to cinit numpy arrays
hmacdope May 25, 2022
64cba3b
working
hmacdope May 25, 2022
25a6a7b
make changes to base
hmacdope May 25, 2022
5d7d8ef
partially fix pickling
hmacdope May 26, 2022
954aaf3
move docs around
hmacdope May 26, 2022
2d84a67
change dlpoly test to has_ rather than AttributeError
hmacdope May 26, 2022
a26f4fc
change dms test to has_velocities rather than hasattr
hmacdope May 26, 2022
84222d5
fix import in TRJ / TRZ
hmacdope May 26, 2022
b440cc3
fix attributeError
hmacdope May 26, 2022
2a6bc0d
improve setter API
hmacdope May 27, 2022
af95363
remove requirement for c-style contiguity
hmacdope May 27, 2022
e8e2305
add start of NPY API calls
hmacdope May 27, 2022
1151da6
work on correct casting and pathing for ndarray creation
hmacdope May 27, 2022
47e53dc
move to helper method
hmacdope May 27, 2022
9695fa1
improve casting etc, but whole new class of errors
hmacdope May 27, 2022
c58ed6a
stash
hmacdope May 27, 2022
00d3ccd
add in docs changes
hmacdope May 28, 2022
5c5ae31
remove doc subclasses of Timestep in TRJ and memory readers
hmacdope May 28, 2022
478e193
add docs to build
hmacdope May 28, 2022
1f225e0
tidy up a fraction in timestep.pyx
hmacdope May 28, 2022
be8b156
add cast
hmacdope May 28, 2022
c64143a
improve casts
hmacdope May 28, 2022
a478b80
okay I know this works
hmacdope May 28, 2022
1800b8b
add options
hmacdope May 28, 2022
cec7f85
promising improvememnt
hmacdope May 28, 2022
aa01cb8
move memory reader to Timestep
hmacdope May 29, 2022
255de91
update forces and vels to use PyArray interface
hmacdope May 29, 2022
548d0ce
clean up unsued snippets and make array innit smaller
hmacdope May 30, 2022
4d393c5
add in some explanatory notes
hmacdope May 30, 2022
f9a5d2a
Merge remote-tracking branch 'upstream/develop' into CythonTimestep
hmacdope May 30, 2022
12d52b0
improve for docs
hmacdope May 31, 2022
058e6ea
tidy docstrings
hmacdope May 31, 2022
e606af5
change to 0 size init
hmacdope May 31, 2022
e9923b4
autopep8
hmacdope May 31, 2022
80a1407
add __all__ and change docs in init
hmacdope May 31, 2022
7cab52f
fix docs build
hmacdope May 31, 2022
9bb8eb7
fix bug on setting pos
hmacdope Jun 1, 2022
138727b
change import
hmacdope Jun 1, 2022
405d55b
change refs in docs to base.Timestep to timestep.Timestep
hmacdope Jun 1, 2022
b900709
fix imports in readers that specifically import timestep
hmacdope Jun 1, 2022
1df32e0
change from attribute error in TRZwriter so that velocities can be co…
hmacdope Jun 1, 2022
90ca2a2
add explicit import for NoDataError
hmacdope Jun 1, 2022
3c89c85
move to copy api
hmacdope Jun 1, 2022
e2bfd33
iron out _frame attribute hanging around in TRZ reader
hmacdope Jun 1, 2022
3b15c8d
remove useless imports
hmacdope Jun 1, 2022
daa2c9c
add pxd and libmda imports
hmacdope Jun 1, 2022
5f709eb
move decls of C level vars to pxd file
hmacdope Jun 1, 2022
cee8860
remove header junk
hmacdope Jun 5, 2022
714c97c
add and improve comments
hmacdope Jun 5, 2022
e2f1827
change BUG to NOTE for dtype
hmacdope Jun 5, 2022
95372bf
add header int64_t
hmacdope Jun 5, 2022
32e2a80
remove __ne__
hmacdope Jun 5, 2022
9fbf8d1
change isinstance __eq__ check to return NotImplemented
hmacdope Jun 5, 2022
af3337d
add dtype tests
hmacdope Jun 5, 2022
92cad0b
add timestep API test for setting box to None
hmacdope Jun 5, 2022
8b862bb
remove try except block for repr
hmacdope Jun 6, 2022
8c735b7
add test for __repr__ with and without a box
hmacdope Jun 6, 2022
93d63d6
Merge remote-tracking branch 'upstream/develop' into CythonTimestep
hmacdope Jun 6, 2022
3525127
add alloc flags
hmacdope Jun 6, 2022
5631c33
remove dtype kwarg
hmacdope Jun 6, 2022
35c4772
remove __getattr__ special method
hmacdope Jun 6, 2022
c691ace
add __getattr__ dunder back in
hmacdope Jun 6, 2022
1829281
CHANGELOG
hmacdope Jun 6, 2022
2ca43d6
Merge branch 'develop' into CythonTimestep
richardjgowers Jun 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add __getattr__ dunder back in
hmacdope committed Jun 6, 2022

Verified

This commit was signed with the committer’s verified signature.
joshcooper Josh Cooper
commit c691ace115b83567077a972dd0e997957b2ea527
7 changes: 7 additions & 0 deletions package/MDAnalysis/coordinates/timestep.pyx
Original file line number Diff line number Diff line change
@@ -747,6 +747,13 @@ cdef class Timestep:
else:
raise TypeError

def __getattr__(self, attr):
# special-case timestep info
if attr in ('velocities', 'forces', 'positions'):
raise NoDataError('This Timestep has no ' + attr)
err = "{selfcls} object has no attribute '{attr}'"
raise AttributeError(err.format(selfcls=type(self).__name__,
attr=attr))
hmacdope marked this conversation as resolved.
Show resolved Hide resolved

def __len__(self):
return self.n_atoms