From e66eccf16ff5c3ae58d72fb3f4ab6518433b6afe Mon Sep 17 00:00:00 2001 From: James Krieger Date: Sun, 28 Jul 2024 18:11:26 +0200 Subject: [PATCH] add first to goto --- prody/apps/prody_apps/prody_catdcd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/prody/apps/prody_apps/prody_catdcd.py b/prody/apps/prody_apps/prody_catdcd.py index 8ce4e378c..a71c2bbdb 100644 --- a/prody/apps/prody_apps/prody_catdcd.py +++ b/prody/apps/prody_apps/prody_catdcd.py @@ -80,8 +80,9 @@ def prody_catdcd(*dcd, **kwargs): out = prody.DCDFile(output, 'w') count = 0 stride = kwargs.get('stride', 1) - goto = stride != 1 - slc = slice(kwargs.get('first', 0), kwargs.get('last', -1), + first = kwargs.get('first', 0) + goto = stride != 1 or first != 0 + slc = slice(first, kwargs.get('last', -1), stride).indices(len(traj)+1) for i in range(*slc): if goto: