forked from lijiext/lammps
2589 lines
124 KiB
C
2589 lines
124 KiB
C
|
/* Generated by Cython 0.9.8.1.1 on Thu Oct 1 16:33:24 2009 */
|
|||
|
|
|||
|
#define PY_SSIZE_T_CLEAN
|
|||
|
#include "Python.h"
|
|||
|
#include "structmember.h"
|
|||
|
#ifndef PY_LONG_LONG
|
|||
|
#define PY_LONG_LONG LONG_LONG
|
|||
|
#endif
|
|||
|
#ifndef DL_EXPORT
|
|||
|
#define DL_EXPORT(t) t
|
|||
|
#endif
|
|||
|
#if PY_VERSION_HEX < 0x02040000
|
|||
|
#define METH_COEXIST 0
|
|||
|
#endif
|
|||
|
#if PY_VERSION_HEX < 0x02050000
|
|||
|
typedef int Py_ssize_t;
|
|||
|
#define PY_SSIZE_T_MAX INT_MAX
|
|||
|
#define PY_SSIZE_T_MIN INT_MIN
|
|||
|
#define PyInt_FromSsize_t(z) PyInt_FromLong(z)
|
|||
|
#define PyInt_AsSsize_t(o) PyInt_AsLong(o)
|
|||
|
#define PyNumber_Index(o) PyNumber_Int(o)
|
|||
|
#define PyIndex_Check(o) PyNumber_Check(o)
|
|||
|
#endif
|
|||
|
#if PY_VERSION_HEX < 0x02060000
|
|||
|
#define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
|
|||
|
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
|
|||
|
#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
|
|||
|
#define PyVarObject_HEAD_INIT(type, size) \
|
|||
|
PyObject_HEAD_INIT(type) size,
|
|||
|
#define PyType_Modified(t)
|
|||
|
|
|||
|
typedef struct {
|
|||
|
void *buf;
|
|||
|
Py_ssize_t len;
|
|||
|
int readonly;
|
|||
|
const char *format;
|
|||
|
int ndim;
|
|||
|
Py_ssize_t *shape;
|
|||
|
Py_ssize_t *strides;
|
|||
|
Py_ssize_t *suboffsets;
|
|||
|
Py_ssize_t itemsize;
|
|||
|
void *internal;
|
|||
|
} Py_buffer;
|
|||
|
|
|||
|
#define PyBUF_SIMPLE 0
|
|||
|
#define PyBUF_WRITABLE 0x0001
|
|||
|
#define PyBUF_LOCK 0x0002
|
|||
|
#define PyBUF_FORMAT 0x0004
|
|||
|
#define PyBUF_ND 0x0008
|
|||
|
#define PyBUF_STRIDES (0x0010 | PyBUF_ND)
|
|||
|
#define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
|
|||
|
#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
|
|||
|
#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
|
|||
|
#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
|
|||
|
|
|||
|
#endif
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
|
|||
|
#else
|
|||
|
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
|
|||
|
#endif
|
|||
|
#if PY_MAJOR_VERSION >= 3
|
|||
|
#define Py_TPFLAGS_CHECKTYPES 0
|
|||
|
#define Py_TPFLAGS_HAVE_INDEX 0
|
|||
|
#endif
|
|||
|
#if PY_MAJOR_VERSION >= 3
|
|||
|
#define PyBaseString_Type PyUnicode_Type
|
|||
|
#define PyString_Type PyBytes_Type
|
|||
|
#define PyInt_Type PyLong_Type
|
|||
|
#define PyInt_Check(op) PyLong_Check(op)
|
|||
|
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
|
|||
|
#define PyInt_FromString PyLong_FromString
|
|||
|
#define PyInt_FromUnicode PyLong_FromUnicode
|
|||
|
#define PyInt_FromLong PyLong_FromLong
|
|||
|
#define PyInt_FromSize_t PyLong_FromSize_t
|
|||
|
#define PyInt_FromSsize_t PyLong_FromSsize_t
|
|||
|
#define PyInt_AsLong PyLong_AsLong
|
|||
|
#define PyInt_AS_LONG PyLong_AS_LONG
|
|||
|
#define PyInt_AsSsize_t PyLong_AsSsize_t
|
|||
|
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
|
|||
|
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
|
|||
|
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
|
|||
|
#else
|
|||
|
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
|
|||
|
#define PyBytes_Type PyString_Type
|
|||
|
#endif
|
|||
|
#if PY_MAJOR_VERSION >= 3
|
|||
|
#define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
|
|||
|
#endif
|
|||
|
#if !defined(WIN32) && !defined(MS_WINDOWS)
|
|||
|
#ifndef __stdcall
|
|||
|
#define __stdcall
|
|||
|
#endif
|
|||
|
#ifndef __cdecl
|
|||
|
#define __cdecl
|
|||
|
#endif
|
|||
|
#else
|
|||
|
#define _USE_MATH_DEFINES
|
|||
|
#endif
|
|||
|
#ifdef __cplusplus
|
|||
|
#define __PYX_EXTERN_C extern "C"
|
|||
|
#else
|
|||
|
#define __PYX_EXTERN_C extern
|
|||
|
#endif
|
|||
|
#include <math.h>
|
|||
|
#define __PYX_HAVE_API__lmp2radii
|
|||
|
|
|||
|
|
|||
|
#ifdef __GNUC__
|
|||
|
#define INLINE __inline__
|
|||
|
#elif _WIN32
|
|||
|
#define INLINE __inline
|
|||
|
#else
|
|||
|
#define INLINE
|
|||
|
#endif
|
|||
|
|
|||
|
typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/
|
|||
|
|
|||
|
|
|||
|
|
|||
|
static int __pyx_skip_dispatch = 0;
|
|||
|
|
|||
|
|
|||
|
/* Type Conversion Predeclarations */
|
|||
|
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
#define __Pyx_PyBytes_FromString PyString_FromString
|
|||
|
#define __Pyx_PyBytes_AsString PyString_AsString
|
|||
|
#else
|
|||
|
#define __Pyx_PyBytes_FromString PyBytes_FromString
|
|||
|
#define __Pyx_PyBytes_AsString PyBytes_AsString
|
|||
|
#endif
|
|||
|
|
|||
|
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
|
|||
|
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x);
|
|||
|
static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x);
|
|||
|
static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x);
|
|||
|
static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b);
|
|||
|
|
|||
|
#define __pyx_PyInt_AsLong(x) (PyInt_CheckExact(x) ? PyInt_AS_LONG(x) : PyInt_AsLong(x))
|
|||
|
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
|
|||
|
|
|||
|
static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x);
|
|||
|
static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x);
|
|||
|
static INLINE char __pyx_PyInt_char(PyObject* x);
|
|||
|
static INLINE short __pyx_PyInt_short(PyObject* x);
|
|||
|
static INLINE int __pyx_PyInt_int(PyObject* x);
|
|||
|
static INLINE long __pyx_PyInt_long(PyObject* x);
|
|||
|
static INLINE signed char __pyx_PyInt_signed_char(PyObject* x);
|
|||
|
static INLINE signed short __pyx_PyInt_signed_short(PyObject* x);
|
|||
|
static INLINE signed int __pyx_PyInt_signed_int(PyObject* x);
|
|||
|
static INLINE signed long __pyx_PyInt_signed_long(PyObject* x);
|
|||
|
static INLINE long double __pyx_PyInt_long_double(PyObject* x);
|
|||
|
#ifdef __GNUC__
|
|||
|
/* Test for GCC > 2.95 */
|
|||
|
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
|
|||
|
#define likely(x) __builtin_expect(!!(x), 1)
|
|||
|
#define unlikely(x) __builtin_expect(!!(x), 0)
|
|||
|
#else /* __GNUC__ > 2 ... */
|
|||
|
#define likely(x) (x)
|
|||
|
#define unlikely(x) (x)
|
|||
|
#endif /* __GNUC__ > 2 ... */
|
|||
|
#else /* __GNUC__ */
|
|||
|
#define likely(x) (x)
|
|||
|
#define unlikely(x) (x)
|
|||
|
#endif /* __GNUC__ */
|
|||
|
|
|||
|
static PyObject *__pyx_m;
|
|||
|
static PyObject *__pyx_b;
|
|||
|
static PyObject *__pyx_empty_tuple;
|
|||
|
static int __pyx_lineno;
|
|||
|
static int __pyx_clineno = 0;
|
|||
|
static const char * __pyx_cfilenm= __FILE__;
|
|||
|
static const char *__pyx_filename;
|
|||
|
static const char **__pyx_f;
|
|||
|
|
|||
|
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
|
|||
|
|
|||
|
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
|
|||
|
|
|||
|
static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
|
|||
|
static int __Pyx_EndUnpack(PyObject *); /*proto*/
|
|||
|
|
|||
|
static INLINE PyObject *__Pyx_GetItemInt(PyObject *o, Py_ssize_t i, int is_unsigned) {
|
|||
|
PyObject *r;
|
|||
|
if (PyList_CheckExact(o) && 0 <= i && i < PyList_GET_SIZE(o)) {
|
|||
|
r = PyList_GET_ITEM(o, i);
|
|||
|
Py_INCREF(r);
|
|||
|
}
|
|||
|
else if (PyTuple_CheckExact(o) && 0 <= i && i < PyTuple_GET_SIZE(o)) {
|
|||
|
r = PyTuple_GET_ITEM(o, i);
|
|||
|
Py_INCREF(r);
|
|||
|
}
|
|||
|
else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0) || !is_unsigned))
|
|||
|
r = PySequence_GetItem(o, i);
|
|||
|
else {
|
|||
|
PyObject *j = (likely(i >= 0) || !is_unsigned) ? PyInt_FromLong(i) : PyLong_FromUnsignedLongLong((sizeof(unsigned long long) > sizeof(Py_ssize_t) ? (1ULL << (sizeof(Py_ssize_t)*8)) : 0) + i);
|
|||
|
if (!j)
|
|||
|
return 0;
|
|||
|
r = PyObject_GetItem(o, j);
|
|||
|
Py_DECREF(j);
|
|||
|
}
|
|||
|
return r;
|
|||
|
}
|
|||
|
|
|||
|
static int __Pyx_Print(PyObject *, int); /*proto*/
|
|||
|
#if PY_MAJOR_VERSION >= 3
|
|||
|
static PyObject* __pyx_print = 0;
|
|||
|
static PyObject* __pyx_print_kwargs = 0;
|
|||
|
#endif
|
|||
|
|
|||
|
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
|
|||
|
|
|||
|
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
|
|||
|
|
|||
|
/* Type declarations */
|
|||
|
/* Module declarations from lmp2radii */
|
|||
|
|
|||
|
|
|||
|
|
|||
|
/* Implementation of lmp2radii */
|
|||
|
static char __pyx_k_1[] = "\nModule name: lmp2radii.py \n\nAuthor: (c) Andres Jaramillo-Botero\nCalifornia Institute of Technology\najaramil@wag.caltech.edu\nProject: pEFF\nVersion: August 2009\n\nExtracts the electron radii from a lammps trajectory dump of style custom:\n\ndump 1 all custom period dump_file id type x y z spin radius ...\n\nNOTE: The radius must be the 6th column per trajectory entry in the dump file\n\n";
|
|||
|
static char __pyx_k_5[] = "-h";
|
|||
|
static PyObject *__pyx_int_1;
|
|||
|
static PyObject *__pyx_int_7;
|
|||
|
static PyObject *__pyx_int_0;
|
|||
|
static PyObject *__pyx_int_9;
|
|||
|
static PyObject *__pyx_int_3;
|
|||
|
static char __pyx_k_Info[] = "Info";
|
|||
|
static PyObject *__pyx_kp_Info;
|
|||
|
static char __pyx_k_sys[] = "sys";
|
|||
|
static PyObject *__pyx_kp_sys;
|
|||
|
static char __pyx_k_os[] = "os";
|
|||
|
static PyObject *__pyx_kp_os;
|
|||
|
static char __pyx_k_math[] = "math";
|
|||
|
static PyObject *__pyx_kp_math;
|
|||
|
static char __pyx_k_2[] = "log10";
|
|||
|
static PyObject *__pyx_kp_2;
|
|||
|
static char __pyx_k_shutil[] = "shutil";
|
|||
|
static PyObject *__pyx_kp_shutil;
|
|||
|
static char __pyx_k_rmtree[] = "rmtree";
|
|||
|
static PyObject *__pyx_kp_rmtree;
|
|||
|
static char __pyx_k_getopt[] = "getopt";
|
|||
|
static PyObject *__pyx_kp_getopt;
|
|||
|
static char __pyx_k_gnu_getopt[] = "gnu_getopt";
|
|||
|
static PyObject *__pyx_kp_gnu_getopt;
|
|||
|
static char __pyx_k_numpy[] = "numpy";
|
|||
|
static PyObject *__pyx_kp_numpy;
|
|||
|
static char __pyx_k___name__[] = "__name__";
|
|||
|
static PyObject *__pyx_kp___name__;
|
|||
|
static char __pyx_k_3[] = "__main__";
|
|||
|
static PyObject *__pyx_kp_3;
|
|||
|
static char __pyx_k_argv[] = "argv";
|
|||
|
static PyObject *__pyx_kp_argv;
|
|||
|
static char __pyx_k_4[] = "h";
|
|||
|
static PyObject *__pyx_kp_4;
|
|||
|
static char __pyx_k_opts[] = "opts";
|
|||
|
static PyObject *__pyx_kp_opts;
|
|||
|
static char __pyx_k_printHelp[] = "printHelp";
|
|||
|
static PyObject *__pyx_kp_printHelp;
|
|||
|
static char __pyx_k_exit[] = "exit";
|
|||
|
static PyObject *__pyx_kp_exit;
|
|||
|
static char __pyx_k_infile[] = "infile";
|
|||
|
static PyObject *__pyx_kp_infile;
|
|||
|
static char __pyx_k_opt[] = "opt";
|
|||
|
static PyObject *__pyx_kp_opt;
|
|||
|
static char __pyx_k_arg[] = "arg";
|
|||
|
static PyObject *__pyx_kp_arg;
|
|||
|
static char __pyx_k_makeradii[] = "makeradii";
|
|||
|
static PyObject *__pyx_kp_makeradii;
|
|||
|
static char __pyx_k_open[] = "open";
|
|||
|
static PyObject *__pyx_kp_open;
|
|||
|
static char __pyx_k_8[] = "r";
|
|||
|
static PyObject *__pyx_kp_8;
|
|||
|
static char __pyx_k_xreadlines[] = "xreadlines";
|
|||
|
static PyObject *__pyx_kp_xreadlines;
|
|||
|
static char __pyx_k_system[] = "system";
|
|||
|
static PyObject *__pyx_kp_system;
|
|||
|
static char __pyx_k_12[] = "frames";
|
|||
|
static PyObject *__pyx_kp_12;
|
|||
|
static char __pyx_k_13[] = "r";
|
|||
|
static PyObject *__pyx_kp_13;
|
|||
|
static char __pyx_k_readline[] = "readline";
|
|||
|
static PyObject *__pyx_kp_readline;
|
|||
|
static char __pyx_k_split[] = "split";
|
|||
|
static PyObject *__pyx_kp_split;
|
|||
|
static char __pyx_k_close[] = "close";
|
|||
|
static PyObject *__pyx_kp_close;
|
|||
|
static char __pyx_k_14[] = "atoms";
|
|||
|
static PyObject *__pyx_kp_14;
|
|||
|
static char __pyx_k_15[] = "r";
|
|||
|
static PyObject *__pyx_kp_15;
|
|||
|
static char __pyx_k_readlines[] = "readlines";
|
|||
|
static PyObject *__pyx_kp_readlines;
|
|||
|
static char __pyx_k_zeros[] = "zeros";
|
|||
|
static PyObject *__pyx_kp_zeros;
|
|||
|
static char __pyx_k_dtype[] = "dtype";
|
|||
|
static PyObject *__pyx_kp_dtype;
|
|||
|
static char __pyx_k_enumerate[] = "enumerate";
|
|||
|
static PyObject *__pyx_kp_enumerate;
|
|||
|
static char __pyx_k_stdout[] = "stdout";
|
|||
|
static PyObject *__pyx_kp_stdout;
|
|||
|
static char __pyx_k_write[] = "write";
|
|||
|
static PyObject *__pyx_kp_write;
|
|||
|
static char __pyx_k_flush[] = "flush";
|
|||
|
static PyObject *__pyx_kp_flush;
|
|||
|
static char __pyx_k_23[] = "w";
|
|||
|
static PyObject *__pyx_kp_23;
|
|||
|
static char __pyx_k_range[] = "range";
|
|||
|
static PyObject *__pyx_kp_range;
|
|||
|
static char __pyx_k_writelines[] = "writelines";
|
|||
|
static PyObject *__pyx_kp_writelines;
|
|||
|
static PyObject *__pyx_kp_1;
|
|||
|
static PyObject *__pyx_kp_5;
|
|||
|
static PyObject *__pyx_builtin___name__;
|
|||
|
static PyObject *__pyx_builtin_open;
|
|||
|
static PyObject *__pyx_builtin_enumerate;
|
|||
|
static PyObject *__pyx_builtin_range;
|
|||
|
static PyObject *__pyx_kp_6;
|
|||
|
static char __pyx_k_6[] = "Usage: python lmp2radii.pyx test.lammpstrj\n";
|
|||
|
static PyObject *__pyx_kp_7;
|
|||
|
static PyObject *__pyx_kp_9;
|
|||
|
static PyObject *__pyx_kp_10;
|
|||
|
static PyObject *__pyx_kp_11;
|
|||
|
static PyObject *__pyx_kp_16;
|
|||
|
static PyObject *__pyx_kp_17;
|
|||
|
static PyObject *__pyx_kp_19;
|
|||
|
static PyObject *__pyx_kp_18;
|
|||
|
static PyObject *__pyx_kp_21;
|
|||
|
static PyObject *__pyx_kp_20;
|
|||
|
static PyObject *__pyx_kp_22;
|
|||
|
static PyObject *__pyx_kp_24;
|
|||
|
static PyObject *__pyx_kp_25;
|
|||
|
static PyObject *__pyx_kp_27;
|
|||
|
static PyObject *__pyx_kp_26;
|
|||
|
static PyObject *__pyx_kp_28;
|
|||
|
static PyObject *__pyx_kp_29;
|
|||
|
static PyObject *__pyx_kp_30;
|
|||
|
static PyObject *__pyx_kp_31;
|
|||
|
static char __pyx_k_7[] = "Reading %s ... [WAIT]";
|
|||
|
static char __pyx_k_9[] = "";
|
|||
|
static char __pyx_k_10[] = "[DONE]";
|
|||
|
static char __pyx_k_11[] = "grep TIMESTEP %s | wc -l > frames; grep -m 1 -A 1 ATOMS %s > atoms";
|
|||
|
static char __pyx_k_16[] = "rm -rf frames atoms";
|
|||
|
static char __pyx_k_17[] = "Extracting electron radii per frame from %s ... ";
|
|||
|
static char __pyx_k_18[] = "%d/%d%s";
|
|||
|
static char __pyx_k_19[] = "";
|
|||
|
static char __pyx_k_20[] = "Writing radii/frame table to %s ... ";
|
|||
|
static char __pyx_k_21[] = ".out";
|
|||
|
static char __pyx_k_22[] = ".out";
|
|||
|
static char __pyx_k_24[] = "\tF";
|
|||
|
static char __pyx_k_25[] = "\n";
|
|||
|
static char __pyx_k_26[] = "%d/%d%s";
|
|||
|
static char __pyx_k_27[] = "";
|
|||
|
static char __pyx_k_28[] = "%d\t";
|
|||
|
static char __pyx_k_29[] = "%f\t";
|
|||
|
static char __pyx_k_30[] = "\n";
|
|||
|
static char __pyx_k_31[] = "DONE .... GOODBYE !!";
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":27
|
|||
|
* import numpy
|
|||
|
*
|
|||
|
* def printHelp(): # <<<<<<<<<<<<<<
|
|||
|
* print Info
|
|||
|
* print "Usage: python lmp2radii.pyx test.lammpstrj\n"
|
|||
|
*/
|
|||
|
|
|||
|
static PyObject *__pyx_pf_9lmp2radii_printHelp(PyObject *__pyx_self, PyObject *unused); /*proto*/
|
|||
|
static PyObject *__pyx_pf_9lmp2radii_printHelp(PyObject *__pyx_self, PyObject *unused) {
|
|||
|
PyObject *__pyx_r;
|
|||
|
PyObject *__pyx_1 = 0;
|
|||
|
PyObject *__pyx_2 = 0;
|
|||
|
__pyx_self = __pyx_self;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":28
|
|||
|
*
|
|||
|
* def printHelp():
|
|||
|
* print Info # <<<<<<<<<<<<<<
|
|||
|
* print "Usage: python lmp2radii.pyx test.lammpstrj\n"
|
|||
|
* return
|
|||
|
*/
|
|||
|
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_Info); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
|
|||
|
__pyx_1 = 0;
|
|||
|
if (__Pyx_Print(((PyObject *)__pyx_2), 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":29
|
|||
|
* def printHelp():
|
|||
|
* print Info
|
|||
|
* print "Usage: python lmp2radii.pyx test.lammpstrj\n" # <<<<<<<<<<<<<<
|
|||
|
* return
|
|||
|
*
|
|||
|
*/
|
|||
|
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_kp_6);
|
|||
|
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_kp_6);
|
|||
|
if (__Pyx_Print(((PyObject *)__pyx_1), 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":30
|
|||
|
* print Info
|
|||
|
* print "Usage: python lmp2radii.pyx test.lammpstrj\n"
|
|||
|
* return # <<<<<<<<<<<<<<
|
|||
|
*
|
|||
|
* def makeradii(infile):
|
|||
|
*/
|
|||
|
__pyx_r = Py_None; Py_INCREF(Py_None);
|
|||
|
goto __pyx_L0;
|
|||
|
|
|||
|
__pyx_r = Py_None; Py_INCREF(Py_None);
|
|||
|
goto __pyx_L0;
|
|||
|
__pyx_L1_error:;
|
|||
|
Py_XDECREF(__pyx_1);
|
|||
|
Py_XDECREF(__pyx_2);
|
|||
|
__Pyx_AddTraceback("lmp2radii.printHelp");
|
|||
|
__pyx_r = NULL;
|
|||
|
__pyx_L0:;
|
|||
|
return __pyx_r;
|
|||
|
}
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":32
|
|||
|
* return
|
|||
|
*
|
|||
|
* def makeradii(infile): # <<<<<<<<<<<<<<
|
|||
|
*
|
|||
|
* print "Reading %s ... [WAIT]"%infile,
|
|||
|
*/
|
|||
|
|
|||
|
static PyObject *__pyx_pf_9lmp2radii_makeradii(PyObject *__pyx_self, PyObject *__pyx_v_infile); /*proto*/
|
|||
|
static PyObject *__pyx_pf_9lmp2radii_makeradii(PyObject *__pyx_self, PyObject *__pyx_v_infile) {
|
|||
|
PyObject *__pyx_v_fin;
|
|||
|
PyObject *__pyx_v_lines;
|
|||
|
PyObject *__pyx_v_frame;
|
|||
|
PyObject *__pyx_v_radii;
|
|||
|
PyObject *__pyx_v_tmp;
|
|||
|
PyObject *__pyx_v_frames;
|
|||
|
PyObject *__pyx_v_atoms;
|
|||
|
PyObject *__pyx_v_arry;
|
|||
|
PyObject *__pyx_v_framecnt;
|
|||
|
PyObject *__pyx_v_header;
|
|||
|
PyObject *__pyx_v_ecount;
|
|||
|
PyObject *__pyx_v_i;
|
|||
|
PyObject *__pyx_v_line;
|
|||
|
PyObject *__pyx_v_lo;
|
|||
|
PyObject *__pyx_v_hi;
|
|||
|
PyObject *__pyx_v_lparse;
|
|||
|
PyObject *__pyx_v_id;
|
|||
|
PyObject *__pyx_v_r;
|
|||
|
PyObject *__pyx_v_fout;
|
|||
|
PyObject *__pyx_v_e;
|
|||
|
PyObject *__pyx_v_a;
|
|||
|
PyObject *__pyx_v_f;
|
|||
|
PyObject *__pyx_r;
|
|||
|
PyObject *__pyx_1 = 0;
|
|||
|
PyObject *__pyx_2 = 0;
|
|||
|
PyObject *__pyx_3 = 0;
|
|||
|
PyObject *__pyx_4 = 0;
|
|||
|
Py_ssize_t __pyx_5 = 0;
|
|||
|
int __pyx_6;
|
|||
|
PyObject *__pyx_7 = 0;
|
|||
|
PyObject *__pyx_8 = 0;
|
|||
|
PyObject *__pyx_9 = 0;
|
|||
|
Py_ssize_t __pyx_10 = 0;
|
|||
|
__pyx_self = __pyx_self;
|
|||
|
__pyx_v_fin = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_lines = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_frame = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_radii = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_tmp = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_frames = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_atoms = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_arry = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_framecnt = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_header = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_ecount = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_i = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_line = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_lo = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_hi = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_lparse = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_id = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_r = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_fout = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_e = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_a = Py_None; Py_INCREF(Py_None);
|
|||
|
__pyx_v_f = Py_None; Py_INCREF(Py_None);
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":34
|
|||
|
* def makeradii(infile):
|
|||
|
*
|
|||
|
* print "Reading %s ... [WAIT]"%infile, # <<<<<<<<<<<<<<
|
|||
|
* fin = open(infile,'r')
|
|||
|
* lines = fin.xreadlines()
|
|||
|
*/
|
|||
|
__pyx_1 = PyNumber_Remainder(__pyx_kp_7, __pyx_v_infile); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
|
|||
|
__pyx_1 = 0;
|
|||
|
if (__Pyx_Print(((PyObject *)__pyx_2), 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":35
|
|||
|
*
|
|||
|
* print "Reading %s ... [WAIT]"%infile,
|
|||
|
* fin = open(infile,'r') # <<<<<<<<<<<<<<
|
|||
|
* lines = fin.xreadlines()
|
|||
|
* print 7*"\b"+"[DONE]"
|
|||
|
*/
|
|||
|
__pyx_1 = PyTuple_New(2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_infile);
|
|||
|
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_infile);
|
|||
|
Py_INCREF(__pyx_kp_8);
|
|||
|
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_kp_8);
|
|||
|
__pyx_2 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_1), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
|
|||
|
Py_DECREF(__pyx_v_fin);
|
|||
|
__pyx_v_fin = __pyx_2;
|
|||
|
__pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":36
|
|||
|
* print "Reading %s ... [WAIT]"%infile,
|
|||
|
* fin = open(infile,'r')
|
|||
|
* lines = fin.xreadlines() # <<<<<<<<<<<<<<
|
|||
|
* print 7*"\b"+"[DONE]"
|
|||
|
* frame=0
|
|||
|
*/
|
|||
|
__pyx_1 = PyObject_GetAttr(__pyx_v_fin, __pyx_kp_xreadlines); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
Py_DECREF(__pyx_v_lines);
|
|||
|
__pyx_v_lines = __pyx_2;
|
|||
|
__pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":37
|
|||
|
* fin = open(infile,'r')
|
|||
|
* lines = fin.xreadlines()
|
|||
|
* print 7*"\b"+"[DONE]" # <<<<<<<<<<<<<<
|
|||
|
* frame=0
|
|||
|
* radii=[]
|
|||
|
*/
|
|||
|
__pyx_1 = PyNumber_Multiply(__pyx_int_7, __pyx_kp_9); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyNumber_Add(__pyx_1, __pyx_kp_10); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
|
|||
|
__pyx_2 = 0;
|
|||
|
if (__Pyx_Print(((PyObject *)__pyx_1), 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":38
|
|||
|
* lines = fin.xreadlines()
|
|||
|
* print 7*"\b"+"[DONE]"
|
|||
|
* frame=0 # <<<<<<<<<<<<<<
|
|||
|
* radii=[]
|
|||
|
* # grep the number of frames and atoms/frame
|
|||
|
*/
|
|||
|
Py_INCREF(__pyx_int_0);
|
|||
|
Py_DECREF(__pyx_v_frame);
|
|||
|
__pyx_v_frame = __pyx_int_0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":39
|
|||
|
* print 7*"\b"+"[DONE]"
|
|||
|
* frame=0
|
|||
|
* radii=[] # <<<<<<<<<<<<<<
|
|||
|
* # grep the number of frames and atoms/frame
|
|||
|
* os.system("grep TIMESTEP %s | wc -l > frames; grep -m 1 -A 1 ATOMS %s > atoms"%(infile,infile))
|
|||
|
*/
|
|||
|
__pyx_2 = PyList_New(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_v_radii);
|
|||
|
__pyx_v_radii = ((PyObject *)__pyx_2);
|
|||
|
__pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":41
|
|||
|
* radii=[]
|
|||
|
* # grep the number of frames and atoms/frame
|
|||
|
* os.system("grep TIMESTEP %s | wc -l > frames; grep -m 1 -A 1 ATOMS %s > atoms"%(infile,infile)) # <<<<<<<<<<<<<<
|
|||
|
* tmp=open("frames",'r')
|
|||
|
* frames=int(tmp.readline().split()[0])
|
|||
|
*/
|
|||
|
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_os); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_system); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
__pyx_1 = PyTuple_New(2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_infile);
|
|||
|
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_infile);
|
|||
|
Py_INCREF(__pyx_v_infile);
|
|||
|
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_infile);
|
|||
|
__pyx_3 = PyNumber_Remainder(__pyx_kp_11, ((PyObject *)__pyx_1)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
|
|||
|
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
|
|||
|
__pyx_3 = 0;
|
|||
|
__pyx_3 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_1), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":42
|
|||
|
* # grep the number of frames and atoms/frame
|
|||
|
* os.system("grep TIMESTEP %s | wc -l > frames; grep -m 1 -A 1 ATOMS %s > atoms"%(infile,infile))
|
|||
|
* tmp=open("frames",'r') # <<<<<<<<<<<<<<
|
|||
|
* frames=int(tmp.readline().split()[0])
|
|||
|
* tmp.close()
|
|||
|
*/
|
|||
|
__pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_kp_12);
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_kp_12);
|
|||
|
Py_INCREF(__pyx_kp_13);
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_kp_13);
|
|||
|
__pyx_1 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
|
|||
|
Py_DECREF(__pyx_v_tmp);
|
|||
|
__pyx_v_tmp = __pyx_1;
|
|||
|
__pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":43
|
|||
|
* os.system("grep TIMESTEP %s | wc -l > frames; grep -m 1 -A 1 ATOMS %s > atoms"%(infile,infile))
|
|||
|
* tmp=open("frames",'r')
|
|||
|
* frames=int(tmp.readline().split()[0]) # <<<<<<<<<<<<<<
|
|||
|
* tmp.close()
|
|||
|
* tmp=open("atoms",'r')
|
|||
|
*/
|
|||
|
__pyx_3 = PyObject_GetAttr(__pyx_v_tmp, __pyx_kp_readline); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_Call(__pyx_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
__pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_split); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
__pyx_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
__pyx_2 = __Pyx_GetItemInt(__pyx_3, 0, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
|
|||
|
__pyx_2 = 0;
|
|||
|
__pyx_3 = PyObject_Call(((PyObject*)&PyInt_Type), ((PyObject *)__pyx_1), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
|
|||
|
Py_DECREF(__pyx_v_frames);
|
|||
|
__pyx_v_frames = __pyx_3;
|
|||
|
__pyx_3 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":44
|
|||
|
* tmp=open("frames",'r')
|
|||
|
* frames=int(tmp.readline().split()[0])
|
|||
|
* tmp.close() # <<<<<<<<<<<<<<
|
|||
|
* tmp=open("atoms",'r')
|
|||
|
* atoms=int(tmp.readlines()[1].split()[0])
|
|||
|
*/
|
|||
|
__pyx_2 = PyObject_GetAttr(__pyx_v_tmp, __pyx_kp_close); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_1 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":45
|
|||
|
* frames=int(tmp.readline().split()[0])
|
|||
|
* tmp.close()
|
|||
|
* tmp=open("atoms",'r') # <<<<<<<<<<<<<<
|
|||
|
* atoms=int(tmp.readlines()[1].split()[0])
|
|||
|
* tmp.close()
|
|||
|
*/
|
|||
|
__pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_kp_14);
|
|||
|
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_14);
|
|||
|
Py_INCREF(__pyx_kp_15);
|
|||
|
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_kp_15);
|
|||
|
__pyx_2 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
|
|||
|
Py_DECREF(__pyx_v_tmp);
|
|||
|
__pyx_v_tmp = __pyx_2;
|
|||
|
__pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":46
|
|||
|
* tmp.close()
|
|||
|
* tmp=open("atoms",'r')
|
|||
|
* atoms=int(tmp.readlines()[1].split()[0]) # <<<<<<<<<<<<<<
|
|||
|
* tmp.close()
|
|||
|
* os.system("rm -rf frames atoms")
|
|||
|
*/
|
|||
|
__pyx_1 = PyObject_GetAttr(__pyx_v_tmp, __pyx_kp_readlines); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
__pyx_2 = __Pyx_GetItemInt(__pyx_3, 1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
__pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_split); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
__pyx_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
__pyx_2 = __Pyx_GetItemInt(__pyx_3, 0, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
|
|||
|
__pyx_2 = 0;
|
|||
|
__pyx_3 = PyObject_Call(((PyObject*)&PyInt_Type), ((PyObject *)__pyx_1), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
|
|||
|
Py_DECREF(__pyx_v_atoms);
|
|||
|
__pyx_v_atoms = __pyx_3;
|
|||
|
__pyx_3 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":47
|
|||
|
* tmp=open("atoms",'r')
|
|||
|
* atoms=int(tmp.readlines()[1].split()[0])
|
|||
|
* tmp.close() # <<<<<<<<<<<<<<
|
|||
|
* os.system("rm -rf frames atoms")
|
|||
|
* arry=numpy.zeros((atoms,frames),dtype=float)
|
|||
|
*/
|
|||
|
__pyx_2 = PyObject_GetAttr(__pyx_v_tmp, __pyx_kp_close); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_1 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":48
|
|||
|
* atoms=int(tmp.readlines()[1].split()[0])
|
|||
|
* tmp.close()
|
|||
|
* os.system("rm -rf frames atoms") # <<<<<<<<<<<<<<
|
|||
|
* arry=numpy.zeros((atoms,frames),dtype=float)
|
|||
|
* framecnt=0
|
|||
|
*/
|
|||
|
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_os); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_kp_system); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_kp_16);
|
|||
|
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_kp_16);
|
|||
|
__pyx_3 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_1), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":49
|
|||
|
* tmp.close()
|
|||
|
* os.system("rm -rf frames atoms")
|
|||
|
* arry=numpy.zeros((atoms,frames),dtype=float) # <<<<<<<<<<<<<<
|
|||
|
* framecnt=0
|
|||
|
* header=9
|
|||
|
*/
|
|||
|
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_zeros); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
__pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_atoms);
|
|||
|
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_atoms);
|
|||
|
Py_INCREF(__pyx_v_frames);
|
|||
|
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_frames);
|
|||
|
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_3));
|
|||
|
__pyx_3 = 0;
|
|||
|
__pyx_3 = PyDict_New(); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyDict_SetItem(__pyx_3, __pyx_kp_dtype, ((PyObject*)&PyFloat_Type)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, ((PyObject *)__pyx_2), ((PyObject *)__pyx_3)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
|
|||
|
Py_DECREF(__pyx_v_arry);
|
|||
|
__pyx_v_arry = __pyx_4;
|
|||
|
__pyx_4 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":50
|
|||
|
* os.system("rm -rf frames atoms")
|
|||
|
* arry=numpy.zeros((atoms,frames),dtype=float)
|
|||
|
* framecnt=0 # <<<<<<<<<<<<<<
|
|||
|
* header=9
|
|||
|
* ecount=0
|
|||
|
*/
|
|||
|
Py_INCREF(__pyx_int_0);
|
|||
|
Py_DECREF(__pyx_v_framecnt);
|
|||
|
__pyx_v_framecnt = __pyx_int_0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":51
|
|||
|
* arry=numpy.zeros((atoms,frames),dtype=float)
|
|||
|
* framecnt=0
|
|||
|
* header=9 # <<<<<<<<<<<<<<
|
|||
|
* ecount=0
|
|||
|
* print "Extracting electron radii per frame from %s ... "%(infile),
|
|||
|
*/
|
|||
|
Py_INCREF(__pyx_int_9);
|
|||
|
Py_DECREF(__pyx_v_header);
|
|||
|
__pyx_v_header = __pyx_int_9;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":52
|
|||
|
* framecnt=0
|
|||
|
* header=9
|
|||
|
* ecount=0 # <<<<<<<<<<<<<<
|
|||
|
* print "Extracting electron radii per frame from %s ... "%(infile),
|
|||
|
* for i,line in enumerate(lines):
|
|||
|
*/
|
|||
|
Py_INCREF(__pyx_int_0);
|
|||
|
Py_DECREF(__pyx_v_ecount);
|
|||
|
__pyx_v_ecount = __pyx_int_0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":53
|
|||
|
* header=9
|
|||
|
* ecount=0
|
|||
|
* print "Extracting electron radii per frame from %s ... "%(infile), # <<<<<<<<<<<<<<
|
|||
|
* for i,line in enumerate(lines):
|
|||
|
* lo=(atoms+header)*framecnt+header
|
|||
|
*/
|
|||
|
__pyx_1 = PyNumber_Remainder(__pyx_kp_17, __pyx_v_infile); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
|
|||
|
__pyx_1 = 0;
|
|||
|
if (__Pyx_Print(((PyObject *)__pyx_2), 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":54
|
|||
|
* ecount=0
|
|||
|
* print "Extracting electron radii per frame from %s ... "%(infile),
|
|||
|
* for i,line in enumerate(lines): # <<<<<<<<<<<<<<
|
|||
|
* lo=(atoms+header)*framecnt+header
|
|||
|
* hi=lo+atoms
|
|||
|
*/
|
|||
|
__pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_lines);
|
|||
|
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_lines);
|
|||
|
__pyx_4 = PyObject_Call(__pyx_builtin_enumerate, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
|
|||
|
if (PyList_CheckExact(__pyx_4) || PyTuple_CheckExact(__pyx_4)) {
|
|||
|
__pyx_5 = 0; __pyx_1 = __pyx_4; Py_INCREF(__pyx_1);
|
|||
|
} else {
|
|||
|
__pyx_5 = -1; __pyx_1 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
for (;;) {
|
|||
|
if (likely(PyList_CheckExact(__pyx_1))) {
|
|||
|
if (__pyx_5 >= PyList_GET_SIZE(__pyx_1)) break;
|
|||
|
__pyx_2 = PyList_GET_ITEM(__pyx_1, __pyx_5); Py_INCREF(__pyx_2); __pyx_5++;
|
|||
|
} else if (likely(PyTuple_CheckExact(__pyx_1))) {
|
|||
|
if (__pyx_5 >= PyTuple_GET_SIZE(__pyx_1)) break;
|
|||
|
__pyx_2 = PyTuple_GET_ITEM(__pyx_1, __pyx_5); Py_INCREF(__pyx_2); __pyx_5++;
|
|||
|
} else {
|
|||
|
__pyx_2 = PyIter_Next(__pyx_1);
|
|||
|
if (!__pyx_2) {
|
|||
|
if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
if (PyTuple_CheckExact(__pyx_2) && PyTuple_GET_SIZE(__pyx_2) == 2) {
|
|||
|
PyObject* tuple = __pyx_2;
|
|||
|
__pyx_4 = PyTuple_GET_ITEM(tuple, 0);
|
|||
|
Py_INCREF(__pyx_4);
|
|||
|
Py_DECREF(__pyx_v_i);
|
|||
|
__pyx_v_i = __pyx_4;
|
|||
|
__pyx_4 = 0;
|
|||
|
__pyx_4 = PyTuple_GET_ITEM(tuple, 1);
|
|||
|
Py_INCREF(__pyx_4);
|
|||
|
Py_DECREF(__pyx_v_line);
|
|||
|
__pyx_v_line = __pyx_4;
|
|||
|
__pyx_4 = 0;
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
}
|
|||
|
else {
|
|||
|
__pyx_3 = PyObject_GetIter(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
__pyx_4 = __Pyx_UnpackItem(__pyx_3, 0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_v_i);
|
|||
|
__pyx_v_i = __pyx_4;
|
|||
|
__pyx_4 = 0;
|
|||
|
__pyx_4 = __Pyx_UnpackItem(__pyx_3, 1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_v_line);
|
|||
|
__pyx_v_line = __pyx_4;
|
|||
|
__pyx_4 = 0;
|
|||
|
if (__Pyx_EndUnpack(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
}
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":55
|
|||
|
* print "Extracting electron radii per frame from %s ... "%(infile),
|
|||
|
* for i,line in enumerate(lines):
|
|||
|
* lo=(atoms+header)*framecnt+header # <<<<<<<<<<<<<<
|
|||
|
* hi=lo+atoms
|
|||
|
* if (i<lo):
|
|||
|
*/
|
|||
|
__pyx_4 = PyNumber_Add(__pyx_v_atoms, __pyx_v_header); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyNumber_Multiply(__pyx_4, __pyx_v_framecnt); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_3 = PyNumber_Add(__pyx_2, __pyx_v_header); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(__pyx_v_lo);
|
|||
|
__pyx_v_lo = __pyx_3;
|
|||
|
__pyx_3 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":56
|
|||
|
* for i,line in enumerate(lines):
|
|||
|
* lo=(atoms+header)*framecnt+header
|
|||
|
* hi=lo+atoms # <<<<<<<<<<<<<<
|
|||
|
* if (i<lo):
|
|||
|
* continue
|
|||
|
*/
|
|||
|
__pyx_4 = PyNumber_Add(__pyx_v_lo, __pyx_v_atoms); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_v_hi);
|
|||
|
__pyx_v_hi = __pyx_4;
|
|||
|
__pyx_4 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":57
|
|||
|
* lo=(atoms+header)*framecnt+header
|
|||
|
* hi=lo+atoms
|
|||
|
* if (i<lo): # <<<<<<<<<<<<<<
|
|||
|
* continue
|
|||
|
* elif (i >= lo) and (i < hi):
|
|||
|
*/
|
|||
|
__pyx_2 = PyObject_RichCompare(__pyx_v_i, __pyx_v_lo, Py_LT); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_6 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
if (__pyx_6) {
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":58
|
|||
|
* hi=lo+atoms
|
|||
|
* if (i<lo):
|
|||
|
* continue # <<<<<<<<<<<<<<
|
|||
|
* elif (i >= lo) and (i < hi):
|
|||
|
* lparse=line.split()
|
|||
|
*/
|
|||
|
goto __pyx_L5;
|
|||
|
goto __pyx_L7;
|
|||
|
}
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":59
|
|||
|
* if (i<lo):
|
|||
|
* continue
|
|||
|
* elif (i >= lo) and (i < hi): # <<<<<<<<<<<<<<
|
|||
|
* lparse=line.split()
|
|||
|
* id=int(lparse[0])
|
|||
|
*/
|
|||
|
__pyx_3 = PyObject_RichCompare(__pyx_v_i, __pyx_v_lo, Py_GE); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_6 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (__pyx_6) {
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
__pyx_3 = PyObject_RichCompare(__pyx_v_i, __pyx_v_hi, Py_LT); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
}
|
|||
|
__pyx_6 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
if (__pyx_6) {
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":60
|
|||
|
* continue
|
|||
|
* elif (i >= lo) and (i < hi):
|
|||
|
* lparse=line.split() # <<<<<<<<<<<<<<
|
|||
|
* id=int(lparse[0])
|
|||
|
* r=float(lparse[6])
|
|||
|
*/
|
|||
|
__pyx_4 = PyObject_GetAttr(__pyx_v_line, __pyx_kp_split); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_Call(__pyx_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
Py_DECREF(__pyx_v_lparse);
|
|||
|
__pyx_v_lparse = __pyx_2;
|
|||
|
__pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":61
|
|||
|
* elif (i >= lo) and (i < hi):
|
|||
|
* lparse=line.split()
|
|||
|
* id=int(lparse[0]) # <<<<<<<<<<<<<<
|
|||
|
* r=float(lparse[6])
|
|||
|
* if (r!=0):
|
|||
|
*/
|
|||
|
__pyx_3 = __Pyx_GetItemInt(__pyx_v_lparse, 0, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
|
|||
|
__pyx_3 = 0;
|
|||
|
__pyx_2 = PyObject_Call(((PyObject*)&PyInt_Type), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
|
|||
|
Py_DECREF(__pyx_v_id);
|
|||
|
__pyx_v_id = __pyx_2;
|
|||
|
__pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":62
|
|||
|
* lparse=line.split()
|
|||
|
* id=int(lparse[0])
|
|||
|
* r=float(lparse[6]) # <<<<<<<<<<<<<<
|
|||
|
* if (r!=0):
|
|||
|
* arry[id-1][framecnt]=r
|
|||
|
*/
|
|||
|
__pyx_3 = __Pyx_GetItemInt(__pyx_v_lparse, 6, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
|
|||
|
__pyx_3 = 0;
|
|||
|
__pyx_2 = PyObject_Call(((PyObject*)&PyFloat_Type), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
|
|||
|
Py_DECREF(__pyx_v_r);
|
|||
|
__pyx_v_r = __pyx_2;
|
|||
|
__pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":63
|
|||
|
* id=int(lparse[0])
|
|||
|
* r=float(lparse[6])
|
|||
|
* if (r!=0): # <<<<<<<<<<<<<<
|
|||
|
* arry[id-1][framecnt]=r
|
|||
|
* if (framecnt==0): ecount+=1
|
|||
|
*/
|
|||
|
__pyx_3 = PyObject_RichCompare(__pyx_v_r, __pyx_int_0, Py_NE); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_6 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
if (__pyx_6) {
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":64
|
|||
|
* r=float(lparse[6])
|
|||
|
* if (r!=0):
|
|||
|
* arry[id-1][framecnt]=r # <<<<<<<<<<<<<<
|
|||
|
* if (framecnt==0): ecount+=1
|
|||
|
* if (i==lo+1):
|
|||
|
*/
|
|||
|
__pyx_4 = PyNumber_Subtract(__pyx_v_id, __pyx_int_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_GetItem(__pyx_v_arry, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
if (PyObject_SetItem(__pyx_2, __pyx_v_framecnt, __pyx_v_r) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":65
|
|||
|
* if (r!=0):
|
|||
|
* arry[id-1][framecnt]=r
|
|||
|
* if (framecnt==0): ecount+=1 # <<<<<<<<<<<<<<
|
|||
|
* if (i==lo+1):
|
|||
|
* sys.stdout.write("%d/%d%s"%(framecnt+1,frames,(int(log10(framecnt+1))+3+int(log10(frames)))*"\b"))
|
|||
|
*/
|
|||
|
__pyx_3 = PyObject_RichCompare(__pyx_v_framecnt, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_6 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
if (__pyx_6) {
|
|||
|
__pyx_4 = PyNumber_InPlaceAdd(__pyx_v_ecount, __pyx_int_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_v_ecount);
|
|||
|
__pyx_v_ecount = __pyx_4;
|
|||
|
__pyx_4 = 0;
|
|||
|
goto __pyx_L9;
|
|||
|
}
|
|||
|
__pyx_L9:;
|
|||
|
goto __pyx_L8;
|
|||
|
}
|
|||
|
__pyx_L8:;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":66
|
|||
|
* arry[id-1][framecnt]=r
|
|||
|
* if (framecnt==0): ecount+=1
|
|||
|
* if (i==lo+1): # <<<<<<<<<<<<<<
|
|||
|
* sys.stdout.write("%d/%d%s"%(framecnt+1,frames,(int(log10(framecnt+1))+3+int(log10(frames)))*"\b"))
|
|||
|
* sys.stdout.flush()
|
|||
|
*/
|
|||
|
__pyx_2 = PyNumber_Add(__pyx_v_lo, __pyx_int_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_3 = PyObject_RichCompare(__pyx_v_i, __pyx_2, Py_EQ); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
__pyx_6 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
if (__pyx_6) {
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":67
|
|||
|
* if (framecnt==0): ecount+=1
|
|||
|
* if (i==lo+1):
|
|||
|
* sys.stdout.write("%d/%d%s"%(framecnt+1,frames,(int(log10(framecnt+1))+3+int(log10(frames)))*"\b")) # <<<<<<<<<<<<<<
|
|||
|
* sys.stdout.flush()
|
|||
|
* if (i == hi+1):
|
|||
|
*/
|
|||
|
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_sys); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_kp_stdout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_write); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
__pyx_4 = PyNumber_Add(__pyx_v_framecnt, __pyx_int_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_7 = PyNumber_Add(__pyx_v_framecnt, __pyx_int_1); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_8 = PyTuple_New(1); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_8, 0, __pyx_7);
|
|||
|
__pyx_7 = 0;
|
|||
|
__pyx_7 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_8), NULL); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_8)); __pyx_8 = 0;
|
|||
|
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_7);
|
|||
|
__pyx_7 = 0;
|
|||
|
__pyx_8 = PyObject_Call(((PyObject*)&PyInt_Type), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
|
|||
|
__pyx_7 = PyNumber_Add(__pyx_8, __pyx_int_3); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_8 = PyTuple_New(1); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_frames);
|
|||
|
PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_frames);
|
|||
|
__pyx_9 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_8), NULL); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_8)); __pyx_8 = 0;
|
|||
|
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_9);
|
|||
|
__pyx_9 = 0;
|
|||
|
__pyx_8 = PyObject_Call(((PyObject*)&PyInt_Type), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
|
|||
|
__pyx_9 = PyNumber_Add(__pyx_7, __pyx_8); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_7); __pyx_7 = 0;
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
__pyx_2 = PyNumber_Multiply(__pyx_9, __pyx_kp_19); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_9); __pyx_9 = 0;
|
|||
|
__pyx_7 = PyTuple_New(3); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_7, 0, __pyx_4);
|
|||
|
Py_INCREF(__pyx_v_frames);
|
|||
|
PyTuple_SET_ITEM(__pyx_7, 1, __pyx_v_frames);
|
|||
|
PyTuple_SET_ITEM(__pyx_7, 2, __pyx_2);
|
|||
|
__pyx_4 = 0;
|
|||
|
__pyx_2 = 0;
|
|||
|
__pyx_8 = PyNumber_Remainder(__pyx_kp_18, ((PyObject *)__pyx_7)); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_7)); __pyx_7 = 0;
|
|||
|
__pyx_9 = PyTuple_New(1); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_9, 0, __pyx_8);
|
|||
|
__pyx_8 = 0;
|
|||
|
__pyx_4 = PyObject_Call(__pyx_3, ((PyObject *)__pyx_9), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_9)); __pyx_9 = 0;
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":68
|
|||
|
* if (i==lo+1):
|
|||
|
* sys.stdout.write("%d/%d%s"%(framecnt+1,frames,(int(log10(framecnt+1))+3+int(log10(frames)))*"\b"))
|
|||
|
* sys.stdout.flush() # <<<<<<<<<<<<<<
|
|||
|
* if (i == hi+1):
|
|||
|
* framecnt+=1
|
|||
|
*/
|
|||
|
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_sys); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_7 = PyObject_GetAttr(__pyx_2, __pyx_kp_stdout); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
__pyx_8 = PyObject_GetAttr(__pyx_7, __pyx_kp_flush); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_7); __pyx_7 = 0;
|
|||
|
__pyx_3 = PyObject_Call(__pyx_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
goto __pyx_L10;
|
|||
|
}
|
|||
|
__pyx_L10:;
|
|||
|
goto __pyx_L7;
|
|||
|
}
|
|||
|
__pyx_L7:;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":69
|
|||
|
* sys.stdout.write("%d/%d%s"%(framecnt+1,frames,(int(log10(framecnt+1))+3+int(log10(frames)))*"\b"))
|
|||
|
* sys.stdout.flush()
|
|||
|
* if (i == hi+1): # <<<<<<<<<<<<<<
|
|||
|
* framecnt+=1
|
|||
|
* print
|
|||
|
*/
|
|||
|
__pyx_9 = PyNumber_Add(__pyx_v_hi, __pyx_int_1); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_4 = PyObject_RichCompare(__pyx_v_i, __pyx_9, Py_EQ); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_9); __pyx_9 = 0;
|
|||
|
__pyx_6 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
if (__pyx_6) {
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":70
|
|||
|
* sys.stdout.flush()
|
|||
|
* if (i == hi+1):
|
|||
|
* framecnt+=1 # <<<<<<<<<<<<<<
|
|||
|
* print
|
|||
|
* print "Writing radii/frame table to %s ... "%(infile+'.out'),
|
|||
|
*/
|
|||
|
__pyx_2 = PyNumber_InPlaceAdd(__pyx_v_framecnt, __pyx_int_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_v_framecnt);
|
|||
|
__pyx_v_framecnt = __pyx_2;
|
|||
|
__pyx_2 = 0;
|
|||
|
goto __pyx_L11;
|
|||
|
}
|
|||
|
__pyx_L11:;
|
|||
|
__pyx_L5:;
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":71
|
|||
|
* if (i == hi+1):
|
|||
|
* framecnt+=1
|
|||
|
* print # <<<<<<<<<<<<<<
|
|||
|
* print "Writing radii/frame table to %s ... "%(infile+'.out'),
|
|||
|
* sys.stdout.flush()
|
|||
|
*/
|
|||
|
if (__Pyx_Print(((PyObject *)__pyx_empty_tuple), 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":72
|
|||
|
* framecnt+=1
|
|||
|
* print
|
|||
|
* print "Writing radii/frame table to %s ... "%(infile+'.out'), # <<<<<<<<<<<<<<
|
|||
|
* sys.stdout.flush()
|
|||
|
* fout=open(infile+'.out','w')
|
|||
|
*/
|
|||
|
__pyx_7 = PyNumber_Add(__pyx_v_infile, __pyx_kp_21); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_8 = PyNumber_Remainder(__pyx_kp_20, __pyx_7); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_7); __pyx_7 = 0;
|
|||
|
__pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_8);
|
|||
|
__pyx_8 = 0;
|
|||
|
if (__Pyx_Print(((PyObject *)__pyx_3), 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":73
|
|||
|
* print
|
|||
|
* print "Writing radii/frame table to %s ... "%(infile+'.out'),
|
|||
|
* sys.stdout.flush() # <<<<<<<<<<<<<<
|
|||
|
* fout=open(infile+'.out','w')
|
|||
|
* for i in range(frames):
|
|||
|
*/
|
|||
|
__pyx_9 = __Pyx_GetName(__pyx_m, __pyx_kp_sys); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_4 = PyObject_GetAttr(__pyx_9, __pyx_kp_stdout); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_9); __pyx_9 = 0;
|
|||
|
__pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_kp_flush); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_1 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":74
|
|||
|
* print "Writing radii/frame table to %s ... "%(infile+'.out'),
|
|||
|
* sys.stdout.flush()
|
|||
|
* fout=open(infile+'.out','w') # <<<<<<<<<<<<<<
|
|||
|
* for i in range(frames):
|
|||
|
* fout.writelines('\tF'+str(i))
|
|||
|
*/
|
|||
|
__pyx_7 = PyNumber_Add(__pyx_v_infile, __pyx_kp_22); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_8 = PyTuple_New(2); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_8, 0, __pyx_7);
|
|||
|
Py_INCREF(__pyx_kp_23);
|
|||
|
PyTuple_SET_ITEM(__pyx_8, 1, __pyx_kp_23);
|
|||
|
__pyx_7 = 0;
|
|||
|
__pyx_3 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_8), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_8)); __pyx_8 = 0;
|
|||
|
Py_DECREF(__pyx_v_fout);
|
|||
|
__pyx_v_fout = __pyx_3;
|
|||
|
__pyx_3 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":75
|
|||
|
* sys.stdout.flush()
|
|||
|
* fout=open(infile+'.out','w')
|
|||
|
* for i in range(frames): # <<<<<<<<<<<<<<
|
|||
|
* fout.writelines('\tF'+str(i))
|
|||
|
* fout.writelines("\n")
|
|||
|
*/
|
|||
|
__pyx_9 = PyTuple_New(1); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_frames);
|
|||
|
PyTuple_SET_ITEM(__pyx_9, 0, __pyx_v_frames);
|
|||
|
__pyx_4 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_9), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_9)); __pyx_9 = 0;
|
|||
|
if (PyList_CheckExact(__pyx_4) || PyTuple_CheckExact(__pyx_4)) {
|
|||
|
__pyx_5 = 0; __pyx_2 = __pyx_4; Py_INCREF(__pyx_2);
|
|||
|
} else {
|
|||
|
__pyx_5 = -1; __pyx_2 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
for (;;) {
|
|||
|
if (likely(PyList_CheckExact(__pyx_2))) {
|
|||
|
if (__pyx_5 >= PyList_GET_SIZE(__pyx_2)) break;
|
|||
|
__pyx_1 = PyList_GET_ITEM(__pyx_2, __pyx_5); Py_INCREF(__pyx_1); __pyx_5++;
|
|||
|
} else if (likely(PyTuple_CheckExact(__pyx_2))) {
|
|||
|
if (__pyx_5 >= PyTuple_GET_SIZE(__pyx_2)) break;
|
|||
|
__pyx_1 = PyTuple_GET_ITEM(__pyx_2, __pyx_5); Py_INCREF(__pyx_1); __pyx_5++;
|
|||
|
} else {
|
|||
|
__pyx_1 = PyIter_Next(__pyx_2);
|
|||
|
if (!__pyx_1) {
|
|||
|
if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_v_i);
|
|||
|
__pyx_v_i = __pyx_1;
|
|||
|
__pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":76
|
|||
|
* fout=open(infile+'.out','w')
|
|||
|
* for i in range(frames):
|
|||
|
* fout.writelines('\tF'+str(i)) # <<<<<<<<<<<<<<
|
|||
|
* fout.writelines("\n")
|
|||
|
* e=1
|
|||
|
*/
|
|||
|
__pyx_7 = PyObject_GetAttr(__pyx_v_fout, __pyx_kp_writelines); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_8 = PyTuple_New(1); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_i);
|
|||
|
PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_i);
|
|||
|
__pyx_3 = PyObject_Call(((PyObject*)&PyBytes_Type), ((PyObject *)__pyx_8), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_8)); __pyx_8 = 0;
|
|||
|
__pyx_9 = PyNumber_Add(__pyx_kp_24, __pyx_3); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
__pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_9);
|
|||
|
__pyx_9 = 0;
|
|||
|
__pyx_1 = PyObject_Call(__pyx_7, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_7); __pyx_7 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":77
|
|||
|
* for i in range(frames):
|
|||
|
* fout.writelines('\tF'+str(i))
|
|||
|
* fout.writelines("\n") # <<<<<<<<<<<<<<
|
|||
|
* e=1
|
|||
|
* for a in range(atoms):
|
|||
|
*/
|
|||
|
__pyx_8 = PyObject_GetAttr(__pyx_v_fout, __pyx_kp_writelines); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_kp_25);
|
|||
|
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_25);
|
|||
|
__pyx_9 = PyObject_Call(__pyx_8, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
|
|||
|
Py_DECREF(__pyx_9); __pyx_9 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":78
|
|||
|
* fout.writelines('\tF'+str(i))
|
|||
|
* fout.writelines("\n")
|
|||
|
* e=1 # <<<<<<<<<<<<<<
|
|||
|
* for a in range(atoms):
|
|||
|
* if arry[a][0] == 0.0: continue
|
|||
|
*/
|
|||
|
Py_INCREF(__pyx_int_1);
|
|||
|
Py_DECREF(__pyx_v_e);
|
|||
|
__pyx_v_e = __pyx_int_1;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":79
|
|||
|
* fout.writelines("\n")
|
|||
|
* e=1
|
|||
|
* for a in range(atoms): # <<<<<<<<<<<<<<
|
|||
|
* if arry[a][0] == 0.0: continue
|
|||
|
* else:
|
|||
|
*/
|
|||
|
__pyx_7 = PyTuple_New(1); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_atoms);
|
|||
|
PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_atoms);
|
|||
|
__pyx_4 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_7), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_7)); __pyx_7 = 0;
|
|||
|
if (PyList_CheckExact(__pyx_4) || PyTuple_CheckExact(__pyx_4)) {
|
|||
|
__pyx_5 = 0; __pyx_1 = __pyx_4; Py_INCREF(__pyx_1);
|
|||
|
} else {
|
|||
|
__pyx_5 = -1; __pyx_1 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
for (;;) {
|
|||
|
if (likely(PyList_CheckExact(__pyx_1))) {
|
|||
|
if (__pyx_5 >= PyList_GET_SIZE(__pyx_1)) break;
|
|||
|
__pyx_2 = PyList_GET_ITEM(__pyx_1, __pyx_5); Py_INCREF(__pyx_2); __pyx_5++;
|
|||
|
} else if (likely(PyTuple_CheckExact(__pyx_1))) {
|
|||
|
if (__pyx_5 >= PyTuple_GET_SIZE(__pyx_1)) break;
|
|||
|
__pyx_2 = PyTuple_GET_ITEM(__pyx_1, __pyx_5); Py_INCREF(__pyx_2); __pyx_5++;
|
|||
|
} else {
|
|||
|
__pyx_2 = PyIter_Next(__pyx_1);
|
|||
|
if (!__pyx_2) {
|
|||
|
if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_v_a);
|
|||
|
__pyx_v_a = __pyx_2;
|
|||
|
__pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":80
|
|||
|
* e=1
|
|||
|
* for a in range(atoms):
|
|||
|
* if arry[a][0] == 0.0: continue # <<<<<<<<<<<<<<
|
|||
|
* else:
|
|||
|
* sys.stdout.write("%d/%d%s"%(e,ecount,(int(log10(e))+int(log10(ecount))+3)*"\b"))
|
|||
|
*/
|
|||
|
__pyx_8 = PyObject_GetItem(__pyx_v_arry, __pyx_v_a); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_3 = __Pyx_GetItemInt(__pyx_8, 0, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
__pyx_9 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_7 = PyObject_RichCompare(__pyx_3, __pyx_9, Py_EQ); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
Py_DECREF(__pyx_9); __pyx_9 = 0;
|
|||
|
__pyx_6 = __Pyx_PyObject_IsTrue(__pyx_7); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_7); __pyx_7 = 0;
|
|||
|
if (__pyx_6) {
|
|||
|
goto __pyx_L14;
|
|||
|
goto __pyx_L16;
|
|||
|
}
|
|||
|
/*else*/ {
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":82
|
|||
|
* if arry[a][0] == 0.0: continue
|
|||
|
* else:
|
|||
|
* sys.stdout.write("%d/%d%s"%(e,ecount,(int(log10(e))+int(log10(ecount))+3)*"\b")) # <<<<<<<<<<<<<<
|
|||
|
* sys.stdout.flush()
|
|||
|
* e+=1
|
|||
|
*/
|
|||
|
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_sys); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_kp_stdout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_8 = PyObject_GetAttr(__pyx_2, __pyx_kp_write); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_9 = PyTuple_New(1); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_e);
|
|||
|
PyTuple_SET_ITEM(__pyx_9, 0, __pyx_v_e);
|
|||
|
__pyx_7 = PyObject_Call(__pyx_3, ((PyObject *)__pyx_9), NULL); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_9)); __pyx_9 = 0;
|
|||
|
__pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_7);
|
|||
|
__pyx_7 = 0;
|
|||
|
__pyx_2 = PyObject_Call(((PyObject*)&PyInt_Type), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
|
|||
|
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_9 = PyTuple_New(1); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_ecount);
|
|||
|
PyTuple_SET_ITEM(__pyx_9, 0, __pyx_v_ecount);
|
|||
|
__pyx_7 = PyObject_Call(__pyx_3, ((PyObject *)__pyx_9), NULL); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_9)); __pyx_9 = 0;
|
|||
|
__pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_7);
|
|||
|
__pyx_7 = 0;
|
|||
|
__pyx_3 = PyObject_Call(((PyObject*)&PyInt_Type), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
|
|||
|
__pyx_9 = PyNumber_Add(__pyx_2, __pyx_3); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
__pyx_7 = PyNumber_Add(__pyx_9, __pyx_int_3); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_9); __pyx_9 = 0;
|
|||
|
__pyx_4 = PyNumber_Multiply(__pyx_7, __pyx_kp_27); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_7); __pyx_7 = 0;
|
|||
|
__pyx_2 = PyTuple_New(3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_e);
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_e);
|
|||
|
Py_INCREF(__pyx_v_ecount);
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_ecount);
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 2, __pyx_4);
|
|||
|
__pyx_4 = 0;
|
|||
|
__pyx_3 = PyNumber_Remainder(__pyx_kp_26, ((PyObject *)__pyx_2)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
|
|||
|
__pyx_9 = PyTuple_New(1); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_9, 0, __pyx_3);
|
|||
|
__pyx_3 = 0;
|
|||
|
__pyx_7 = PyObject_Call(__pyx_8, ((PyObject *)__pyx_9), NULL); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_9)); __pyx_9 = 0;
|
|||
|
Py_DECREF(__pyx_7); __pyx_7 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":83
|
|||
|
* else:
|
|||
|
* sys.stdout.write("%d/%d%s"%(e,ecount,(int(log10(e))+int(log10(ecount))+3)*"\b"))
|
|||
|
* sys.stdout.flush() # <<<<<<<<<<<<<<
|
|||
|
* e+=1
|
|||
|
* fout.writelines("%d\t"%(a+1))
|
|||
|
*/
|
|||
|
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_sys); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_kp_stdout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_flush); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
__pyx_8 = PyObject_Call(__pyx_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":84
|
|||
|
* sys.stdout.write("%d/%d%s"%(e,ecount,(int(log10(e))+int(log10(ecount))+3)*"\b"))
|
|||
|
* sys.stdout.flush()
|
|||
|
* e+=1 # <<<<<<<<<<<<<<
|
|||
|
* fout.writelines("%d\t"%(a+1))
|
|||
|
* for f in range(frames):
|
|||
|
*/
|
|||
|
__pyx_9 = PyNumber_InPlaceAdd(__pyx_v_e, __pyx_int_1); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_v_e);
|
|||
|
__pyx_v_e = __pyx_9;
|
|||
|
__pyx_9 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":85
|
|||
|
* sys.stdout.flush()
|
|||
|
* e+=1
|
|||
|
* fout.writelines("%d\t"%(a+1)) # <<<<<<<<<<<<<<
|
|||
|
* for f in range(frames):
|
|||
|
* fout.writelines("%f\t"%(arry[a][f]))
|
|||
|
*/
|
|||
|
__pyx_7 = PyObject_GetAttr(__pyx_v_fout, __pyx_kp_writelines); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_4 = PyNumber_Add(__pyx_v_a, __pyx_int_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyNumber_Remainder(__pyx_kp_28, __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
|
|||
|
__pyx_2 = 0;
|
|||
|
__pyx_8 = PyObject_Call(__pyx_7, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_7); __pyx_7 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":86
|
|||
|
* e+=1
|
|||
|
* fout.writelines("%d\t"%(a+1))
|
|||
|
* for f in range(frames): # <<<<<<<<<<<<<<
|
|||
|
* fout.writelines("%f\t"%(arry[a][f]))
|
|||
|
* fout.writelines("\n")
|
|||
|
*/
|
|||
|
__pyx_9 = PyTuple_New(1); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_v_frames);
|
|||
|
PyTuple_SET_ITEM(__pyx_9, 0, __pyx_v_frames);
|
|||
|
__pyx_4 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_9), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_9)); __pyx_9 = 0;
|
|||
|
if (PyList_CheckExact(__pyx_4) || PyTuple_CheckExact(__pyx_4)) {
|
|||
|
__pyx_10 = 0; __pyx_2 = __pyx_4; Py_INCREF(__pyx_2);
|
|||
|
} else {
|
|||
|
__pyx_10 = -1; __pyx_2 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
for (;;) {
|
|||
|
if (likely(PyList_CheckExact(__pyx_2))) {
|
|||
|
if (__pyx_10 >= PyList_GET_SIZE(__pyx_2)) break;
|
|||
|
__pyx_7 = PyList_GET_ITEM(__pyx_2, __pyx_10); Py_INCREF(__pyx_7); __pyx_10++;
|
|||
|
} else if (likely(PyTuple_CheckExact(__pyx_2))) {
|
|||
|
if (__pyx_10 >= PyTuple_GET_SIZE(__pyx_2)) break;
|
|||
|
__pyx_7 = PyTuple_GET_ITEM(__pyx_2, __pyx_10); Py_INCREF(__pyx_7); __pyx_10++;
|
|||
|
} else {
|
|||
|
__pyx_7 = PyIter_Next(__pyx_2);
|
|||
|
if (!__pyx_7) {
|
|||
|
if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_v_f);
|
|||
|
__pyx_v_f = __pyx_7;
|
|||
|
__pyx_7 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":87
|
|||
|
* fout.writelines("%d\t"%(a+1))
|
|||
|
* for f in range(frames):
|
|||
|
* fout.writelines("%f\t"%(arry[a][f])) # <<<<<<<<<<<<<<
|
|||
|
* fout.writelines("\n")
|
|||
|
* print
|
|||
|
*/
|
|||
|
__pyx_3 = PyObject_GetAttr(__pyx_v_fout, __pyx_kp_writelines); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_8 = PyObject_GetItem(__pyx_v_arry, __pyx_v_a); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_9 = PyObject_GetItem(__pyx_8, __pyx_v_f); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
__pyx_4 = PyNumber_Remainder(__pyx_kp_29, __pyx_9); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_9); __pyx_9 = 0;
|
|||
|
__pyx_7 = PyTuple_New(1); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_7, 0, __pyx_4);
|
|||
|
__pyx_4 = 0;
|
|||
|
__pyx_8 = PyObject_Call(__pyx_3, ((PyObject *)__pyx_7), NULL); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_7)); __pyx_7 = 0;
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":88
|
|||
|
* for f in range(frames):
|
|||
|
* fout.writelines("%f\t"%(arry[a][f]))
|
|||
|
* fout.writelines("\n") # <<<<<<<<<<<<<<
|
|||
|
* print
|
|||
|
* print "DONE .... GOODBYE !!"
|
|||
|
*/
|
|||
|
__pyx_9 = PyObject_GetAttr(__pyx_v_fout, __pyx_kp_writelines); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_kp_30);
|
|||
|
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_kp_30);
|
|||
|
__pyx_3 = PyObject_Call(__pyx_9, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_9); __pyx_9 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
|
|||
|
Py_DECREF(__pyx_3); __pyx_3 = 0;
|
|||
|
}
|
|||
|
__pyx_L16:;
|
|||
|
__pyx_L14:;
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":89
|
|||
|
* fout.writelines("%f\t"%(arry[a][f]))
|
|||
|
* fout.writelines("\n")
|
|||
|
* print # <<<<<<<<<<<<<<
|
|||
|
* print "DONE .... GOODBYE !!"
|
|||
|
* fout.close()
|
|||
|
*/
|
|||
|
if (__Pyx_Print(((PyObject *)__pyx_empty_tuple), 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":90
|
|||
|
* fout.writelines("\n")
|
|||
|
* print
|
|||
|
* print "DONE .... GOODBYE !!" # <<<<<<<<<<<<<<
|
|||
|
* fout.close()
|
|||
|
* fin.close()
|
|||
|
*/
|
|||
|
__pyx_7 = PyTuple_New(1); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_kp_31);
|
|||
|
PyTuple_SET_ITEM(__pyx_7, 0, __pyx_kp_31);
|
|||
|
if (__Pyx_Print(((PyObject *)__pyx_7), 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_7)); __pyx_7 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":91
|
|||
|
* print
|
|||
|
* print "DONE .... GOODBYE !!"
|
|||
|
* fout.close() # <<<<<<<<<<<<<<
|
|||
|
* fin.close()
|
|||
|
*
|
|||
|
*/
|
|||
|
__pyx_8 = PyObject_GetAttr(__pyx_v_fout, __pyx_kp_close); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_Call(__pyx_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_8); __pyx_8 = 0;
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":92
|
|||
|
* print "DONE .... GOODBYE !!"
|
|||
|
* fout.close()
|
|||
|
* fin.close() # <<<<<<<<<<<<<<
|
|||
|
*
|
|||
|
* if __name__ == '__main__':
|
|||
|
*/
|
|||
|
__pyx_9 = PyObject_GetAttr(__pyx_v_fin, __pyx_kp_close); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_4 = PyObject_Call(__pyx_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_9); __pyx_9 = 0;
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
|
|||
|
__pyx_r = Py_None; Py_INCREF(Py_None);
|
|||
|
goto __pyx_L0;
|
|||
|
__pyx_L1_error:;
|
|||
|
Py_XDECREF(__pyx_1);
|
|||
|
Py_XDECREF(__pyx_2);
|
|||
|
Py_XDECREF(__pyx_3);
|
|||
|
Py_XDECREF(__pyx_4);
|
|||
|
Py_XDECREF(__pyx_7);
|
|||
|
Py_XDECREF(__pyx_8);
|
|||
|
Py_XDECREF(__pyx_9);
|
|||
|
__Pyx_AddTraceback("lmp2radii.makeradii");
|
|||
|
__pyx_r = NULL;
|
|||
|
__pyx_L0:;
|
|||
|
Py_DECREF(__pyx_v_fin);
|
|||
|
Py_DECREF(__pyx_v_lines);
|
|||
|
Py_DECREF(__pyx_v_frame);
|
|||
|
Py_DECREF(__pyx_v_radii);
|
|||
|
Py_DECREF(__pyx_v_tmp);
|
|||
|
Py_DECREF(__pyx_v_frames);
|
|||
|
Py_DECREF(__pyx_v_atoms);
|
|||
|
Py_DECREF(__pyx_v_arry);
|
|||
|
Py_DECREF(__pyx_v_framecnt);
|
|||
|
Py_DECREF(__pyx_v_header);
|
|||
|
Py_DECREF(__pyx_v_ecount);
|
|||
|
Py_DECREF(__pyx_v_i);
|
|||
|
Py_DECREF(__pyx_v_line);
|
|||
|
Py_DECREF(__pyx_v_lo);
|
|||
|
Py_DECREF(__pyx_v_hi);
|
|||
|
Py_DECREF(__pyx_v_lparse);
|
|||
|
Py_DECREF(__pyx_v_id);
|
|||
|
Py_DECREF(__pyx_v_r);
|
|||
|
Py_DECREF(__pyx_v_fout);
|
|||
|
Py_DECREF(__pyx_v_e);
|
|||
|
Py_DECREF(__pyx_v_a);
|
|||
|
Py_DECREF(__pyx_v_f);
|
|||
|
return __pyx_r;
|
|||
|
}
|
|||
|
|
|||
|
static struct PyMethodDef __pyx_methods[] = {
|
|||
|
{"printHelp", (PyCFunction)__pyx_pf_9lmp2radii_printHelp, METH_NOARGS, 0},
|
|||
|
{"makeradii", (PyCFunction)__pyx_pf_9lmp2radii_makeradii, METH_O, 0},
|
|||
|
{0, 0, 0, 0}
|
|||
|
};
|
|||
|
|
|||
|
static void __pyx_init_filenames(void); /*proto*/
|
|||
|
|
|||
|
#if PY_MAJOR_VERSION >= 3
|
|||
|
static struct PyModuleDef __pyx_moduledef = {
|
|||
|
PyModuleDef_HEAD_INIT,
|
|||
|
"lmp2radii",
|
|||
|
0, /* m_doc */
|
|||
|
-1, /* m_size */
|
|||
|
__pyx_methods /* m_methods */,
|
|||
|
NULL, /* m_reload */
|
|||
|
NULL, /* m_traverse */
|
|||
|
NULL, /* m_clear */
|
|||
|
NULL /* m_free */
|
|||
|
};
|
|||
|
#endif
|
|||
|
|
|||
|
static __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|||
|
{&__pyx_kp_Info, __pyx_k_Info, sizeof(__pyx_k_Info), 1, 1, 1},
|
|||
|
{&__pyx_kp_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 1, 1, 1},
|
|||
|
{&__pyx_kp_os, __pyx_k_os, sizeof(__pyx_k_os), 1, 1, 1},
|
|||
|
{&__pyx_kp_math, __pyx_k_math, sizeof(__pyx_k_math), 1, 1, 1},
|
|||
|
{&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 1, 1, 1},
|
|||
|
{&__pyx_kp_shutil, __pyx_k_shutil, sizeof(__pyx_k_shutil), 1, 1, 1},
|
|||
|
{&__pyx_kp_rmtree, __pyx_k_rmtree, sizeof(__pyx_k_rmtree), 1, 1, 1},
|
|||
|
{&__pyx_kp_getopt, __pyx_k_getopt, sizeof(__pyx_k_getopt), 1, 1, 1},
|
|||
|
{&__pyx_kp_gnu_getopt, __pyx_k_gnu_getopt, sizeof(__pyx_k_gnu_getopt), 1, 1, 1},
|
|||
|
{&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1},
|
|||
|
{&__pyx_kp___name__, __pyx_k___name__, sizeof(__pyx_k___name__), 1, 1, 1},
|
|||
|
{&__pyx_kp_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 1, 0},
|
|||
|
{&__pyx_kp_argv, __pyx_k_argv, sizeof(__pyx_k_argv), 1, 1, 1},
|
|||
|
{&__pyx_kp_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 1, 0},
|
|||
|
{&__pyx_kp_opts, __pyx_k_opts, sizeof(__pyx_k_opts), 1, 1, 1},
|
|||
|
{&__pyx_kp_printHelp, __pyx_k_printHelp, sizeof(__pyx_k_printHelp), 0, 1, 1},
|
|||
|
{&__pyx_kp_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 1, 1, 1},
|
|||
|
{&__pyx_kp_infile, __pyx_k_infile, sizeof(__pyx_k_infile), 1, 1, 1},
|
|||
|
{&__pyx_kp_opt, __pyx_k_opt, sizeof(__pyx_k_opt), 1, 1, 1},
|
|||
|
{&__pyx_kp_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 1, 1, 1},
|
|||
|
{&__pyx_kp_makeradii, __pyx_k_makeradii, sizeof(__pyx_k_makeradii), 0, 1, 1},
|
|||
|
{&__pyx_kp_open, __pyx_k_open, sizeof(__pyx_k_open), 1, 1, 1},
|
|||
|
{&__pyx_kp_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 1, 0},
|
|||
|
{&__pyx_kp_xreadlines, __pyx_k_xreadlines, sizeof(__pyx_k_xreadlines), 1, 1, 1},
|
|||
|
{&__pyx_kp_system, __pyx_k_system, sizeof(__pyx_k_system), 1, 1, 1},
|
|||
|
{&__pyx_kp_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 1, 0},
|
|||
|
{&__pyx_kp_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 1, 0},
|
|||
|
{&__pyx_kp_readline, __pyx_k_readline, sizeof(__pyx_k_readline), 1, 1, 1},
|
|||
|
{&__pyx_kp_split, __pyx_k_split, sizeof(__pyx_k_split), 1, 1, 1},
|
|||
|
{&__pyx_kp_close, __pyx_k_close, sizeof(__pyx_k_close), 1, 1, 1},
|
|||
|
{&__pyx_kp_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 1, 0},
|
|||
|
{&__pyx_kp_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 1, 0},
|
|||
|
{&__pyx_kp_readlines, __pyx_k_readlines, sizeof(__pyx_k_readlines), 1, 1, 1},
|
|||
|
{&__pyx_kp_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 1, 1, 1},
|
|||
|
{&__pyx_kp_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 1, 1, 1},
|
|||
|
{&__pyx_kp_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 1, 1, 1},
|
|||
|
{&__pyx_kp_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 1, 1, 1},
|
|||
|
{&__pyx_kp_write, __pyx_k_write, sizeof(__pyx_k_write), 1, 1, 1},
|
|||
|
{&__pyx_kp_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 1, 1, 1},
|
|||
|
{&__pyx_kp_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 1, 0},
|
|||
|
{&__pyx_kp_range, __pyx_k_range, sizeof(__pyx_k_range), 1, 1, 1},
|
|||
|
{&__pyx_kp_writelines, __pyx_k_writelines, sizeof(__pyx_k_writelines), 1, 1, 1},
|
|||
|
{&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0},
|
|||
|
{&__pyx_kp_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 0},
|
|||
|
{&__pyx_kp_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 0},
|
|||
|
{&__pyx_kp_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 0},
|
|||
|
{&__pyx_kp_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 0},
|
|||
|
{&__pyx_kp_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 0},
|
|||
|
{&__pyx_kp_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 0},
|
|||
|
{&__pyx_kp_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 0},
|
|||
|
{&__pyx_kp_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 0},
|
|||
|
{&__pyx_kp_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 0},
|
|||
|
{&__pyx_kp_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 0},
|
|||
|
{&__pyx_kp_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 0},
|
|||
|
{&__pyx_kp_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 0},
|
|||
|
{&__pyx_kp_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 0},
|
|||
|
{&__pyx_kp_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 0},
|
|||
|
{&__pyx_kp_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 0},
|
|||
|
{&__pyx_kp_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 0},
|
|||
|
{&__pyx_kp_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 0},
|
|||
|
{&__pyx_kp_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 0},
|
|||
|
{&__pyx_kp_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 0},
|
|||
|
{&__pyx_kp_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 0},
|
|||
|
{&__pyx_kp_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 0},
|
|||
|
{0, 0, 0, 0, 0, 0}
|
|||
|
};
|
|||
|
static int __Pyx_InitCachedBuiltins(void) {
|
|||
|
__pyx_builtin___name__ = __Pyx_GetName(__pyx_b, __pyx_kp___name__); if (!__pyx_builtin___name__) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_builtin_open = __Pyx_GetName(__pyx_b, __pyx_kp_open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_kp_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_kp_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
return 0;
|
|||
|
__pyx_L1_error:;
|
|||
|
return -1;
|
|||
|
}
|
|||
|
|
|||
|
static int __Pyx_InitGlobals(void) {
|
|||
|
__pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|||
|
__pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|||
|
__pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|||
|
__pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|||
|
__pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|||
|
if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|||
|
return 0;
|
|||
|
__pyx_L1_error:;
|
|||
|
return -1;
|
|||
|
}
|
|||
|
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
PyMODINIT_FUNC initlmp2radii(void); /*proto*/
|
|||
|
PyMODINIT_FUNC initlmp2radii(void)
|
|||
|
#else
|
|||
|
PyMODINIT_FUNC PyInit_lmp2radii(void); /*proto*/
|
|||
|
PyMODINIT_FUNC PyInit_lmp2radii(void)
|
|||
|
#endif
|
|||
|
{
|
|||
|
PyObject *__pyx_1 = 0;
|
|||
|
PyObject *__pyx_2 = 0;
|
|||
|
int __pyx_3;
|
|||
|
PyObject *__pyx_4 = 0;
|
|||
|
Py_ssize_t __pyx_5 = 0;
|
|||
|
PyObject *__pyx_6 = 0;
|
|||
|
__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
/*--- Libary function declarations ---*/
|
|||
|
__pyx_init_filenames();
|
|||
|
/*--- Initialize various global constants etc. ---*/
|
|||
|
if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
/*--- Module creation code ---*/
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
__pyx_m = Py_InitModule4("lmp2radii", __pyx_methods, 0, 0, PYTHON_API_VERSION);
|
|||
|
#else
|
|||
|
__pyx_m = PyModule_Create(&__pyx_moduledef);
|
|||
|
#endif
|
|||
|
if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
Py_INCREF(__pyx_m);
|
|||
|
#endif
|
|||
|
__pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME);
|
|||
|
if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|||
|
if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|||
|
/*--- Builtin init code ---*/
|
|||
|
if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_skip_dispatch = 0;
|
|||
|
/*--- Global init code ---*/
|
|||
|
/*--- Function export code ---*/
|
|||
|
/*--- Type init code ---*/
|
|||
|
/*--- Type import code ---*/
|
|||
|
/*--- Function import code ---*/
|
|||
|
/*--- Execution code ---*/
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":3
|
|||
|
* #!/usr/local/bin/python-2.5/bin/python
|
|||
|
*
|
|||
|
* Info=""" # <<<<<<<<<<<<<<
|
|||
|
* Module name: lmp2radii.py
|
|||
|
*
|
|||
|
*/
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_Info, __pyx_kp_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":21
|
|||
|
*
|
|||
|
* # import essentials:
|
|||
|
* import sys, os # <<<<<<<<<<<<<<
|
|||
|
* from math import log10
|
|||
|
* from shutil import rmtree
|
|||
|
*/
|
|||
|
__pyx_1 = __Pyx_Import(__pyx_kp_sys, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_sys, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
__pyx_1 = __Pyx_Import(__pyx_kp_os, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_os, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":22
|
|||
|
* # import essentials:
|
|||
|
* import sys, os
|
|||
|
* from math import log10 # <<<<<<<<<<<<<<
|
|||
|
* from shutil import rmtree
|
|||
|
* from getopt import gnu_getopt as getopt
|
|||
|
*/
|
|||
|
__pyx_1 = PyList_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_kp_2);
|
|||
|
PyList_SET_ITEM(__pyx_1, 0, __pyx_kp_2);
|
|||
|
__pyx_2 = __Pyx_Import(__pyx_kp_math, ((PyObject *)__pyx_1)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
|
|||
|
__pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_2, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":23
|
|||
|
* import sys, os
|
|||
|
* from math import log10
|
|||
|
* from shutil import rmtree # <<<<<<<<<<<<<<
|
|||
|
* from getopt import gnu_getopt as getopt
|
|||
|
* import numpy
|
|||
|
*/
|
|||
|
__pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_kp_rmtree);
|
|||
|
PyList_SET_ITEM(__pyx_2, 0, __pyx_kp_rmtree);
|
|||
|
__pyx_1 = __Pyx_Import(__pyx_kp_shutil, ((PyObject *)__pyx_2)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
|
|||
|
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_rmtree); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_rmtree, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":24
|
|||
|
* from math import log10
|
|||
|
* from shutil import rmtree
|
|||
|
* from getopt import gnu_getopt as getopt # <<<<<<<<<<<<<<
|
|||
|
* import numpy
|
|||
|
*
|
|||
|
*/
|
|||
|
__pyx_1 = PyList_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_kp_gnu_getopt);
|
|||
|
PyList_SET_ITEM(__pyx_1, 0, __pyx_kp_gnu_getopt);
|
|||
|
__pyx_2 = __Pyx_Import(__pyx_kp_getopt, ((PyObject *)__pyx_1)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
|
|||
|
__pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_gnu_getopt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_getopt, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":25
|
|||
|
* from shutil import rmtree
|
|||
|
* from getopt import gnu_getopt as getopt
|
|||
|
* import numpy # <<<<<<<<<<<<<<
|
|||
|
*
|
|||
|
* def printHelp():
|
|||
|
*/
|
|||
|
__pyx_2 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_numpy, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":94
|
|||
|
* fin.close()
|
|||
|
*
|
|||
|
* if __name__ == '__main__': # <<<<<<<<<<<<<<
|
|||
|
*
|
|||
|
* # set defaults
|
|||
|
*/
|
|||
|
__pyx_1 = PyObject_RichCompare(__pyx_builtin___name__, __pyx_kp_3, Py_EQ); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_3 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
if (__pyx_3) {
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":99
|
|||
|
*
|
|||
|
* # check for input:
|
|||
|
* opts, argv = getopt(sys.argv[1:], 'h') # <<<<<<<<<<<<<<
|
|||
|
*
|
|||
|
* # if no input, print help and exit
|
|||
|
*/
|
|||
|
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_getopt); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_4 = PyObject_GetAttr(__pyx_1, __pyx_kp_argv); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
__pyx_1 = PySequence_GetSlice(__pyx_4, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
|
|||
|
Py_INCREF(__pyx_kp_4);
|
|||
|
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_kp_4);
|
|||
|
__pyx_1 = 0;
|
|||
|
__pyx_1 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
|
|||
|
if (PyTuple_CheckExact(__pyx_1) && PyTuple_GET_SIZE(__pyx_1) == 2) {
|
|||
|
PyObject* tuple = __pyx_1;
|
|||
|
__pyx_4 = PyTuple_GET_ITEM(tuple, 0);
|
|||
|
Py_INCREF(__pyx_4);
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_opts, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_4 = PyTuple_GET_ITEM(tuple, 1);
|
|||
|
Py_INCREF(__pyx_4);
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_argv, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
}
|
|||
|
else {
|
|||
|
__pyx_2 = PyObject_GetIter(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
__pyx_4 = __Pyx_UnpackItem(__pyx_2, 0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_opts, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_4 = __Pyx_UnpackItem(__pyx_2, 1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_argv, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
}
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":102
|
|||
|
*
|
|||
|
* # if no input, print help and exit
|
|||
|
* if len(argv) != 1: # <<<<<<<<<<<<<<
|
|||
|
* printHelp()
|
|||
|
* sys.exit(1)
|
|||
|
*/
|
|||
|
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_argv); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_5 = PyObject_Length(__pyx_4); if (unlikely(__pyx_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_3 = (__pyx_5 != 1);
|
|||
|
if (__pyx_3) {
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":103
|
|||
|
* # if no input, print help and exit
|
|||
|
* if len(argv) != 1:
|
|||
|
* printHelp() # <<<<<<<<<<<<<<
|
|||
|
* sys.exit(1)
|
|||
|
* else:
|
|||
|
*/
|
|||
|
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_printHelp); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":104
|
|||
|
* if len(argv) != 1:
|
|||
|
* printHelp()
|
|||
|
* sys.exit(1) # <<<<<<<<<<<<<<
|
|||
|
* else:
|
|||
|
* infile=argv[0]
|
|||
|
*/
|
|||
|
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_sys); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_kp_exit); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_INCREF(__pyx_int_1);
|
|||
|
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_int_1);
|
|||
|
__pyx_4 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
goto __pyx_L3;
|
|||
|
}
|
|||
|
/*else*/ {
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":106
|
|||
|
* sys.exit(1)
|
|||
|
* else:
|
|||
|
* infile=argv[0] # <<<<<<<<<<<<<<
|
|||
|
*
|
|||
|
* # read options
|
|||
|
*/
|
|||
|
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_argv); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = __Pyx_GetItemInt(__pyx_1, 0, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_infile, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
}
|
|||
|
__pyx_L3:;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":109
|
|||
|
*
|
|||
|
* # read options
|
|||
|
* for opt, arg in opts: # <<<<<<<<<<<<<<
|
|||
|
* if opt == '-h': # -h: print help
|
|||
|
* printHelp()
|
|||
|
*/
|
|||
|
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_opts); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyList_CheckExact(__pyx_4) || PyTuple_CheckExact(__pyx_4)) {
|
|||
|
__pyx_5 = 0; __pyx_1 = __pyx_4; Py_INCREF(__pyx_1);
|
|||
|
} else {
|
|||
|
__pyx_5 = -1; __pyx_1 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
for (;;) {
|
|||
|
if (likely(PyList_CheckExact(__pyx_1))) {
|
|||
|
if (__pyx_5 >= PyList_GET_SIZE(__pyx_1)) break;
|
|||
|
__pyx_2 = PyList_GET_ITEM(__pyx_1, __pyx_5); Py_INCREF(__pyx_2); __pyx_5++;
|
|||
|
} else if (likely(PyTuple_CheckExact(__pyx_1))) {
|
|||
|
if (__pyx_5 >= PyTuple_GET_SIZE(__pyx_1)) break;
|
|||
|
__pyx_2 = PyTuple_GET_ITEM(__pyx_1, __pyx_5); Py_INCREF(__pyx_2); __pyx_5++;
|
|||
|
} else {
|
|||
|
__pyx_2 = PyIter_Next(__pyx_1);
|
|||
|
if (!__pyx_2) {
|
|||
|
if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
if (PyTuple_CheckExact(__pyx_2) && PyTuple_GET_SIZE(__pyx_2) == 2) {
|
|||
|
PyObject* tuple = __pyx_2;
|
|||
|
__pyx_6 = PyTuple_GET_ITEM(tuple, 0);
|
|||
|
Py_INCREF(__pyx_6);
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_opt, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_6); __pyx_6 = 0;
|
|||
|
__pyx_6 = PyTuple_GET_ITEM(tuple, 1);
|
|||
|
Py_INCREF(__pyx_6);
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_arg, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_6); __pyx_6 = 0;
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
}
|
|||
|
else {
|
|||
|
__pyx_4 = PyObject_GetIter(__pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
__pyx_6 = __Pyx_UnpackItem(__pyx_4, 0); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_opt, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_6); __pyx_6 = 0;
|
|||
|
__pyx_6 = __Pyx_UnpackItem(__pyx_4, 1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
if (PyObject_SetAttr(__pyx_m, __pyx_kp_arg, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_6); __pyx_6 = 0;
|
|||
|
if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
}
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":110
|
|||
|
* # read options
|
|||
|
* for opt, arg in opts:
|
|||
|
* if opt == '-h': # -h: print help # <<<<<<<<<<<<<<
|
|||
|
* printHelp()
|
|||
|
*
|
|||
|
*/
|
|||
|
__pyx_6 = __Pyx_GetName(__pyx_m, __pyx_kp_opt); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_2 = PyObject_RichCompare(__pyx_6, __pyx_kp_5, Py_EQ); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_6); __pyx_6 = 0;
|
|||
|
__pyx_3 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
if (__pyx_3) {
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":111
|
|||
|
* for opt, arg in opts:
|
|||
|
* if opt == '-h': # -h: print help
|
|||
|
* printHelp() # <<<<<<<<<<<<<<
|
|||
|
*
|
|||
|
* makeradii(infile)
|
|||
|
*/
|
|||
|
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_printHelp); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_6 = PyObject_Call(__pyx_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_4); __pyx_4 = 0;
|
|||
|
Py_DECREF(__pyx_6); __pyx_6 = 0;
|
|||
|
goto __pyx_L6;
|
|||
|
}
|
|||
|
__pyx_L6:;
|
|||
|
}
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
|
|||
|
/* "/Users/Andres/Documents/software/MD/eFF/pEFF/tools/eff/lmp2radii.pyx":113
|
|||
|
* printHelp()
|
|||
|
*
|
|||
|
* makeradii(infile) # <<<<<<<<<<<<<<
|
|||
|
*/
|
|||
|
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_makeradii); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_infile); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
__pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_4);
|
|||
|
__pyx_4 = 0;
|
|||
|
__pyx_1 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_6), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|||
|
Py_DECREF(__pyx_2); __pyx_2 = 0;
|
|||
|
Py_DECREF(((PyObject *)__pyx_6)); __pyx_6 = 0;
|
|||
|
Py_DECREF(__pyx_1); __pyx_1 = 0;
|
|||
|
goto __pyx_L2;
|
|||
|
}
|
|||
|
__pyx_L2:;
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
return;
|
|||
|
#else
|
|||
|
return __pyx_m;
|
|||
|
#endif
|
|||
|
__pyx_L1_error:;
|
|||
|
Py_XDECREF(__pyx_1);
|
|||
|
Py_XDECREF(__pyx_2);
|
|||
|
Py_XDECREF(__pyx_4);
|
|||
|
Py_XDECREF(__pyx_6);
|
|||
|
__Pyx_AddTraceback("lmp2radii");
|
|||
|
#if PY_MAJOR_VERSION >= 3
|
|||
|
return NULL;
|
|||
|
#endif
|
|||
|
}
|
|||
|
|
|||
|
static const char *__pyx_filenames[] = {
|
|||
|
"lmp2radii.pyx",
|
|||
|
};
|
|||
|
|
|||
|
/* Runtime support code */
|
|||
|
|
|||
|
static void __pyx_init_filenames(void) {
|
|||
|
__pyx_f = __pyx_filenames;
|
|||
|
}
|
|||
|
|
|||
|
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
|
|||
|
PyObject *__import__ = 0;
|
|||
|
PyObject *empty_list = 0;
|
|||
|
PyObject *module = 0;
|
|||
|
PyObject *global_dict = 0;
|
|||
|
PyObject *empty_dict = 0;
|
|||
|
PyObject *list;
|
|||
|
__import__ = PyObject_GetAttrString(__pyx_b, "__import__");
|
|||
|
if (!__import__)
|
|||
|
goto bad;
|
|||
|
if (from_list)
|
|||
|
list = from_list;
|
|||
|
else {
|
|||
|
empty_list = PyList_New(0);
|
|||
|
if (!empty_list)
|
|||
|
goto bad;
|
|||
|
list = empty_list;
|
|||
|
}
|
|||
|
global_dict = PyModule_GetDict(__pyx_m);
|
|||
|
if (!global_dict)
|
|||
|
goto bad;
|
|||
|
empty_dict = PyDict_New();
|
|||
|
if (!empty_dict)
|
|||
|
goto bad;
|
|||
|
module = PyObject_CallFunction(__import__, "OOOO",
|
|||
|
name, global_dict, empty_dict, list);
|
|||
|
bad:
|
|||
|
Py_XDECREF(empty_list);
|
|||
|
Py_XDECREF(__import__);
|
|||
|
Py_XDECREF(empty_dict);
|
|||
|
return module;
|
|||
|
}
|
|||
|
|
|||
|
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
|
|||
|
PyObject *result;
|
|||
|
result = PyObject_GetAttr(dict, name);
|
|||
|
if (!result)
|
|||
|
PyErr_SetObject(PyExc_NameError, name);
|
|||
|
return result;
|
|||
|
}
|
|||
|
|
|||
|
static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
|
|||
|
PyObject *item;
|
|||
|
if (!(item = PyIter_Next(iter))) {
|
|||
|
if (!PyErr_Occurred()) {
|
|||
|
PyErr_Format(PyExc_ValueError,
|
|||
|
#if PY_VERSION_HEX < 0x02050000
|
|||
|
"need more than %d values to unpack", (int)index);
|
|||
|
#else
|
|||
|
"need more than %zd values to unpack", index);
|
|||
|
#endif
|
|||
|
}
|
|||
|
}
|
|||
|
return item;
|
|||
|
}
|
|||
|
|
|||
|
static int __Pyx_EndUnpack(PyObject *iter) {
|
|||
|
PyObject *item;
|
|||
|
if ((item = PyIter_Next(iter))) {
|
|||
|
Py_DECREF(item);
|
|||
|
PyErr_SetString(PyExc_ValueError, "too many values to unpack");
|
|||
|
return -1;
|
|||
|
}
|
|||
|
else if (!PyErr_Occurred())
|
|||
|
return 0;
|
|||
|
else
|
|||
|
return -1;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
static PyObject *__Pyx_GetStdout(void) {
|
|||
|
PyObject *f = PySys_GetObject("stdout");
|
|||
|
if (!f) {
|
|||
|
PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
|
|||
|
}
|
|||
|
return f;
|
|||
|
}
|
|||
|
|
|||
|
static int __Pyx_Print(PyObject *arg_tuple, int newline) {
|
|||
|
PyObject *f;
|
|||
|
PyObject* v;
|
|||
|
int i;
|
|||
|
|
|||
|
if (!(f = __Pyx_GetStdout()))
|
|||
|
return -1;
|
|||
|
for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
|
|||
|
if (PyFile_SoftSpace(f, 1)) {
|
|||
|
if (PyFile_WriteString(" ", f) < 0)
|
|||
|
return -1;
|
|||
|
}
|
|||
|
v = PyTuple_GET_ITEM(arg_tuple, i);
|
|||
|
if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
|
|||
|
return -1;
|
|||
|
if (PyString_Check(v)) {
|
|||
|
char *s = PyString_AsString(v);
|
|||
|
Py_ssize_t len = PyString_Size(v);
|
|||
|
if (len > 0 &&
|
|||
|
isspace(Py_CHARMASK(s[len-1])) &&
|
|||
|
s[len-1] != ' ')
|
|||
|
PyFile_SoftSpace(f, 0);
|
|||
|
}
|
|||
|
}
|
|||
|
if (newline) {
|
|||
|
if (PyFile_WriteString("\n", f) < 0)
|
|||
|
return -1;
|
|||
|
PyFile_SoftSpace(f, 0);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
#else /* Python 3 has a print function */
|
|||
|
static int __Pyx_Print(PyObject *arg_tuple, int newline) {
|
|||
|
PyObject* kwargs = 0;
|
|||
|
PyObject* result = 0;
|
|||
|
PyObject* end_string;
|
|||
|
if (!__pyx_print) {
|
|||
|
__pyx_print = PyObject_GetAttrString(__pyx_b, "print");
|
|||
|
if (!__pyx_print)
|
|||
|
return -1;
|
|||
|
}
|
|||
|
if (!newline) {
|
|||
|
if (!__pyx_print_kwargs) {
|
|||
|
__pyx_print_kwargs = PyDict_New();
|
|||
|
if (!__pyx_print_kwargs)
|
|||
|
return -1;
|
|||
|
end_string = PyUnicode_FromStringAndSize(" ", 1);
|
|||
|
if (!end_string)
|
|||
|
return -1;
|
|||
|
if (PyDict_SetItemString(__pyx_print_kwargs, "end", end_string) < 0) {
|
|||
|
Py_DECREF(end_string);
|
|||
|
return -1;
|
|||
|
}
|
|||
|
Py_DECREF(end_string);
|
|||
|
}
|
|||
|
kwargs = __pyx_print_kwargs;
|
|||
|
}
|
|||
|
result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
|
|||
|
if (!result)
|
|||
|
return -1;
|
|||
|
Py_DECREF(result);
|
|||
|
return 0;
|
|||
|
}
|
|||
|
#endif
|
|||
|
|
|||
|
#include "compile.h"
|
|||
|
#include "frameobject.h"
|
|||
|
#include "traceback.h"
|
|||
|
|
|||
|
static void __Pyx_AddTraceback(const char *funcname) {
|
|||
|
PyObject *py_srcfile = 0;
|
|||
|
PyObject *py_funcname = 0;
|
|||
|
PyObject *py_globals = 0;
|
|||
|
PyObject *empty_string = 0;
|
|||
|
PyCodeObject *py_code = 0;
|
|||
|
PyFrameObject *py_frame = 0;
|
|||
|
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
py_srcfile = PyString_FromString(__pyx_filename);
|
|||
|
#else
|
|||
|
py_srcfile = PyUnicode_FromString(__pyx_filename);
|
|||
|
#endif
|
|||
|
if (!py_srcfile) goto bad;
|
|||
|
if (__pyx_clineno) {
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
|
|||
|
#else
|
|||
|
py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
|
|||
|
#endif
|
|||
|
}
|
|||
|
else {
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
py_funcname = PyString_FromString(funcname);
|
|||
|
#else
|
|||
|
py_funcname = PyUnicode_FromString(funcname);
|
|||
|
#endif
|
|||
|
}
|
|||
|
if (!py_funcname) goto bad;
|
|||
|
py_globals = PyModule_GetDict(__pyx_m);
|
|||
|
if (!py_globals) goto bad;
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
empty_string = PyString_FromStringAndSize("", 0);
|
|||
|
#else
|
|||
|
empty_string = PyBytes_FromStringAndSize("", 0);
|
|||
|
#endif
|
|||
|
if (!empty_string) goto bad;
|
|||
|
py_code = PyCode_New(
|
|||
|
0, /*int argcount,*/
|
|||
|
#if PY_MAJOR_VERSION >= 3
|
|||
|
0, /*int kwonlyargcount,*/
|
|||
|
#endif
|
|||
|
0, /*int nlocals,*/
|
|||
|
0, /*int stacksize,*/
|
|||
|
0, /*int flags,*/
|
|||
|
empty_string, /*PyObject *code,*/
|
|||
|
__pyx_empty_tuple, /*PyObject *consts,*/
|
|||
|
__pyx_empty_tuple, /*PyObject *names,*/
|
|||
|
__pyx_empty_tuple, /*PyObject *varnames,*/
|
|||
|
__pyx_empty_tuple, /*PyObject *freevars,*/
|
|||
|
__pyx_empty_tuple, /*PyObject *cellvars,*/
|
|||
|
py_srcfile, /*PyObject *filename,*/
|
|||
|
py_funcname, /*PyObject *name,*/
|
|||
|
__pyx_lineno, /*int firstlineno,*/
|
|||
|
empty_string /*PyObject *lnotab*/
|
|||
|
);
|
|||
|
if (!py_code) goto bad;
|
|||
|
py_frame = PyFrame_New(
|
|||
|
PyThreadState_Get(), /*PyThreadState *tstate,*/
|
|||
|
py_code, /*PyCodeObject *code,*/
|
|||
|
py_globals, /*PyObject *globals,*/
|
|||
|
0 /*PyObject *locals*/
|
|||
|
);
|
|||
|
if (!py_frame) goto bad;
|
|||
|
py_frame->f_lineno = __pyx_lineno;
|
|||
|
PyTraceBack_Here(py_frame);
|
|||
|
bad:
|
|||
|
Py_XDECREF(py_srcfile);
|
|||
|
Py_XDECREF(py_funcname);
|
|||
|
Py_XDECREF(empty_string);
|
|||
|
Py_XDECREF(py_code);
|
|||
|
Py_XDECREF(py_frame);
|
|||
|
}
|
|||
|
|
|||
|
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
|
|||
|
while (t->p) {
|
|||
|
#if PY_MAJOR_VERSION < 3
|
|||
|
if (t->is_unicode && (!t->is_identifier)) {
|
|||
|
*t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
|
|||
|
} else if (t->intern) {
|
|||
|
*t->p = PyString_InternFromString(t->s);
|
|||
|
} else {
|
|||
|
*t->p = PyString_FromStringAndSize(t->s, t->n - 1);
|
|||
|
}
|
|||
|
#else /* Python 3+ has unicode identifiers */
|
|||
|
if (t->is_identifier || (t->is_unicode && t->intern)) {
|
|||
|
*t->p = PyUnicode_InternFromString(t->s);
|
|||
|
} else if (t->is_unicode) {
|
|||
|
*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
|
|||
|
} else {
|
|||
|
*t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
|
|||
|
}
|
|||
|
#endif
|
|||
|
if (!*t->p)
|
|||
|
return -1;
|
|||
|
++t;
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
/* Type Conversion Functions */
|
|||
|
|
|||
|
static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b) {
|
|||
|
Py_ssize_t ival;
|
|||
|
PyObject* x = PyNumber_Index(b);
|
|||
|
if (!x) return -1;
|
|||
|
ival = PyInt_AsSsize_t(x);
|
|||
|
Py_DECREF(x);
|
|||
|
return ival;
|
|||
|
}
|
|||
|
|
|||
|
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
|
|||
|
if (x == Py_True) return 1;
|
|||
|
else if (x == Py_False) return 0;
|
|||
|
else return PyObject_IsTrue(x);
|
|||
|
}
|
|||
|
|
|||
|
static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x) {
|
|||
|
if (PyInt_CheckExact(x)) {
|
|||
|
return PyInt_AS_LONG(x);
|
|||
|
}
|
|||
|
else if (PyLong_CheckExact(x)) {
|
|||
|
return PyLong_AsLongLong(x);
|
|||
|
}
|
|||
|
else {
|
|||
|
PY_LONG_LONG val;
|
|||
|
PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
|
|||
|
val = __pyx_PyInt_AsLongLong(tmp);
|
|||
|
Py_DECREF(tmp);
|
|||
|
return val;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
|
|||
|
if (PyInt_CheckExact(x)) {
|
|||
|
long val = PyInt_AS_LONG(x);
|
|||
|
if (unlikely(val < 0)) {
|
|||
|
PyErr_SetString(PyExc_TypeError, "Negative assignment to unsigned type.");
|
|||
|
return (unsigned PY_LONG_LONG)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else if (PyLong_CheckExact(x)) {
|
|||
|
return PyLong_AsUnsignedLongLong(x);
|
|||
|
}
|
|||
|
else {
|
|||
|
PY_LONG_LONG val;
|
|||
|
PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
|
|||
|
val = __pyx_PyInt_AsUnsignedLongLong(tmp);
|
|||
|
Py_DECREF(tmp);
|
|||
|
return val;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x) {
|
|||
|
if (sizeof(unsigned char) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
unsigned char val = (unsigned char)long_val;
|
|||
|
if (unlikely((val != long_val) || (long_val < 0))) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned char");
|
|||
|
return (unsigned char)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x) {
|
|||
|
if (sizeof(unsigned short) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
unsigned short val = (unsigned short)long_val;
|
|||
|
if (unlikely((val != long_val) || (long_val < 0))) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned short");
|
|||
|
return (unsigned short)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE char __pyx_PyInt_char(PyObject* x) {
|
|||
|
if (sizeof(char) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
char val = (char)long_val;
|
|||
|
if (unlikely((val != long_val) )) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to char");
|
|||
|
return (char)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE short __pyx_PyInt_short(PyObject* x) {
|
|||
|
if (sizeof(short) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
short val = (short)long_val;
|
|||
|
if (unlikely((val != long_val) )) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to short");
|
|||
|
return (short)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE int __pyx_PyInt_int(PyObject* x) {
|
|||
|
if (sizeof(int) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
int val = (int)long_val;
|
|||
|
if (unlikely((val != long_val) )) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to int");
|
|||
|
return (int)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE long __pyx_PyInt_long(PyObject* x) {
|
|||
|
if (sizeof(long) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
long val = (long)long_val;
|
|||
|
if (unlikely((val != long_val) )) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to long");
|
|||
|
return (long)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE signed char __pyx_PyInt_signed_char(PyObject* x) {
|
|||
|
if (sizeof(signed char) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
signed char val = (signed char)long_val;
|
|||
|
if (unlikely((val != long_val) )) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed char");
|
|||
|
return (signed char)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE signed short __pyx_PyInt_signed_short(PyObject* x) {
|
|||
|
if (sizeof(signed short) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
signed short val = (signed short)long_val;
|
|||
|
if (unlikely((val != long_val) )) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed short");
|
|||
|
return (signed short)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE signed int __pyx_PyInt_signed_int(PyObject* x) {
|
|||
|
if (sizeof(signed int) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
signed int val = (signed int)long_val;
|
|||
|
if (unlikely((val != long_val) )) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed int");
|
|||
|
return (signed int)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE signed long __pyx_PyInt_signed_long(PyObject* x) {
|
|||
|
if (sizeof(signed long) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
signed long val = (signed long)long_val;
|
|||
|
if (unlikely((val != long_val) )) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed long");
|
|||
|
return (signed long)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
static INLINE long double __pyx_PyInt_long_double(PyObject* x) {
|
|||
|
if (sizeof(long double) < sizeof(long)) {
|
|||
|
long long_val = __pyx_PyInt_AsLong(x);
|
|||
|
long double val = (long double)long_val;
|
|||
|
if (unlikely((val != long_val) )) {
|
|||
|
PyErr_SetString(PyExc_OverflowError, "value too large to convert to long double");
|
|||
|
return (long double)-1;
|
|||
|
}
|
|||
|
return val;
|
|||
|
}
|
|||
|
else {
|
|||
|
return __pyx_PyInt_AsLong(x);
|
|||
|
}
|
|||
|
}
|
|||
|
|