1 2 3 /* 4 A* ------------------------------------------------------------------- 5 B* This file contains source code for the PyMOL computer program 6 C* Copyright (c) Schrodinger, LLC. 7 D* ------------------------------------------------------------------- 8 E* It is unlawful to modify or remove this copyright notice. 9 F* ------------------------------------------------------------------- 10 G* Please see the accompanying LICENSE file for further information. 11 H* ------------------------------------------------------------------- 12 I* Additional authors of this source file include: 13 -* 14 -* 15 -* 16 Z* ------------------------------------------------------------------- 17 */ 18 #ifndef _H_Isosurf 19 #define _H_Isosurf 20 21 #include"Map.h" 22 #include"MemoryDebug.h" 23 #include"Symmetry.h" 24 #include"Field.h" 25 #include"os_python.h" 26 #include"PyMOLGlobals.h" 27 #include"Setting.h" 28 29 struct Isofield { 30 int dimensions[3]{}; 31 int save_points = true; 32 pymol::copyable_ptr<CField> points; 33 pymol::copyable_ptr<CField> data; 34 pymol::cache_ptr<CField> gradients; 35 Isofield() = default; 36 Isofield(PyMOLGlobals * G, const int * const dims); 37 }; 38 39 #define F3(field,P1,P2,P3) Ffloat3(field,P1,P2,P3) 40 #define F3Ptr(field,P1,P2,P3) Ffloat3p(field,P1,P2,P3) 41 42 #define F4(field,P1,P2,P3,P4) Ffloat4(field,P1,P2,P3,P4) 43 #define F4Ptr(field,P1,P2,P3,P4) Ffloat4p(field,P1,P2,P3,P4) 44 45 int IsosurfVolume(PyMOLGlobals* G, CSetting* set1, CSetting* set2, 46 Isofield* field, float level, pymol::vla<int>& num, pymol::vla<float>& vert, 47 int* range, int mode, int skip, float alt_level); 48 49 int IsosurfGetRange(PyMOLGlobals * G, Isofield * field, CCrystal * cryst, 50 float *mn, float *mx, int *range, int clamp); 51 int IsosurfExpand(Isofield * field1, Isofield * field2, 52 CCrystal * cryst, CSymmetry * sym, int *range); 53 54 int IsosurfInit(PyMOLGlobals * G); 55 void IsosurfFree(PyMOLGlobals * G); 56 57 58 /* isofield operations -- not part of Isosurf */ 59 60 void IsofieldComputeGradients(PyMOLGlobals * G, Isofield * field); 61 PyObject *IsosurfAsPyList(PyMOLGlobals *G, Isofield * I); 62 Isofield *IsosurfNewFromPyList(PyMOLGlobals * G, PyObject * list); 63 64 void IsofieldGetCorners(PyMOLGlobals *, Isofield *, float *); 65 66 #endif 67