CoordSet.h (pymol-v2.1.0.tar.bz2) | : | CoordSet.h (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
skipping to change at line 29 | skipping to change at line 29 | |||
#include"os_python.h" | #include"os_python.h" | |||
#include"Rep.h" | #include"Rep.h" | |||
#include"Symmetry.h" | #include"Symmetry.h" | |||
#include"Word.h" | #include"Word.h" | |||
#include"Setting.h" | #include"Setting.h" | |||
#include"ObjectMolecule.h" | #include"ObjectMolecule.h" | |||
#define COORD_SET_HAS_ANISOU 0x01 | #define COORD_SET_HAS_ANISOU 0x01 | |||
enum mmpymolx_prop_state_t { | ||||
MMPYMOLX_PROP_STATE_NULL = 0, // invalidated | ||||
MMPYMOLX_PROP_STATE_AUTO, // auto-assigned (libmmpymolx) | ||||
MMPYMOLX_PROP_STATE_USER, // user-assigned (cmd.alter) | ||||
}; | ||||
typedef struct CoordSet { | typedef struct CoordSet { | |||
// methods (not fully refactored yet) | // methods (not fully refactored yet) | |||
void fFree(); | void fFree(); | |||
// methods | // methods | |||
void update(int state); | void update(int state); | |||
void render(RenderInfo * info); | void render(RenderInfo * info); | |||
void enumIndices(); | void enumIndices(); | |||
void appendIndices(int offset); | void appendIndices(int offset); | |||
int extendIndices(int nAtom); | int extendIndices(int nAtom); | |||
skipping to change at line 111 | skipping to change at line 117 | |||
byres/bychain actions which assume such atoms to be adjancent... | byres/bychain actions which assume such atoms to be adjancent... | |||
*/ | */ | |||
CGO *SculptCGO, *SculptShaderCGO; | CGO *SculptCGO, *SculptShaderCGO; | |||
MapType *Coord2Idx; | MapType *Coord2Idx; | |||
float Coord2IdxReq, Coord2IdxDiv; | float Coord2IdxReq, Coord2IdxDiv; | |||
/* temporary / optimization */ | /* temporary / optimization */ | |||
int objMolOpInvalidated; | int objMolOpInvalidated; | |||
#ifndef NO_MMLIBS | #ifdef _PYMOL_IP_EXTRAS | |||
bool validMMStereo; | mmpymolx_prop_state_t validMMStereo; | |||
bool validTextType; | mmpymolx_prop_state_t validTextType; | |||
#endif | #endif | |||
#ifdef _PYMOL_IP_EXTRAS | #ifdef _PYMOL_IP_PROPERTIES | |||
#endif | #endif | |||
/* Atom-state Settings */ | ||||
int *atom_state_setting_id; | ||||
char *has_atom_state_settings; | ||||
} CoordSet; | } CoordSet; | |||
typedef void (*fUpdateFn) (CoordSet *, int); | typedef void (*fUpdateFn) (CoordSet *, int); | |||
#define cCSet_NoPeriodicity 0 | #define cCSet_NoPeriodicity 0 | |||
#define cCSet_Orthogonal 1 | #define cCSet_Orthogonal 1 | |||
#define cCSet_Octahedral 2 | #define cCSet_Octahedral 2 | |||
int BondInOrder(BondType * a, int b1, int b2); | int BondInOrder(BondType * a, int b1, int b2); | |||
int BondCompare(BondType * a, BondType * b); | int BondCompare(BondType * a, BondType * b); | |||
skipping to change at line 139 | skipping to change at line 149 | |||
PyObject *CoordSetAsNumPyArray(CoordSet * cs, short copy); | PyObject *CoordSetAsNumPyArray(CoordSet * cs, short copy); | |||
PyObject *CoordSetAsPyList(CoordSet * I); | PyObject *CoordSetAsPyList(CoordSet * I); | |||
int CoordSetFromPyList(PyMOLGlobals * G, PyObject * list, CoordSet ** cs); | int CoordSetFromPyList(PyMOLGlobals * G, PyObject * list, CoordSet ** cs); | |||
CoordSet *CoordSetNew(PyMOLGlobals * G); | CoordSet *CoordSetNew(PyMOLGlobals * G); | |||
void CoordSetAtomToPDBStrVLA(PyMOLGlobals * G, char **charVLA, int *c, | void CoordSetAtomToPDBStrVLA(PyMOLGlobals * G, char **charVLA, int *c, | |||
const AtomInfoType * ai, | const AtomInfoType * ai, | |||
const float *v, int cnt, | const float *v, int cnt, | |||
const PDBInfoRec * pdb_info, | const PDBInfoRec * pdb_info, | |||
const double *matrix); | const double *matrix); | |||
void CoordSetAtomToTERStrVLA(PyMOLGlobals * G, char **charVLA, int *c, AtomInfoT | ||||
ype * ai, | ||||
int cnt); | ||||
CoordSet *CoordSetCopy(const CoordSet * cs); | CoordSet *CoordSetCopy(const CoordSet * cs); | |||
void CoordSetTransform44f(CoordSet * I, const float *mat); | void CoordSetTransform44f(CoordSet * I, const float *mat); | |||
void CoordSetTransform33f(CoordSet * I, const float *mat); | void CoordSetTransform33f(CoordSet * I, const float *mat); | |||
void CoordSetRealToFrac(CoordSet * I, const CCrystal * cryst); | void CoordSetRealToFrac(CoordSet * I, const CCrystal * cryst); | |||
void CoordSetFracToReal(CoordSet * I, const CCrystal * cryst); | void CoordSetFracToReal(CoordSet * I, const CCrystal * cryst); | |||
bool CoordSetInsureOrthogonal(PyMOLGlobals * G, | bool CoordSetInsureOrthogonal(PyMOLGlobals * G, | |||
CoordSet * cset, | CoordSet * cset, | |||
const float * sca, | const float * sca, | |||
const CCrystal *cryst=NULL, | const CCrystal *cryst=NULL, | |||
bool quiet=true); | bool quiet=true); | |||
void CoordSetGetAverage(CoordSet * I, float *v0); | void CoordSetGetAverage(CoordSet * I, float *v0); | |||
PyObject *CoordSetAtomToChemPyAtom(PyMOLGlobals * G, AtomInfoType * ai, const fl oat *v, | PyObject *CoordSetAtomToChemPyAtom(PyMOLGlobals * G, AtomInfoType * ai, const fl oat *v, | |||
const float *ref, int index, const double *ma trix); | const float *ref, int index, const double *ma trix); | |||
int CoordSetGetAtomVertex(CoordSet * I, int at, float *v); | int CoordSetGetAtomVertex(CoordSet * I, int at, float *v); | |||
int CoordSetGetAtomTxfVertex(CoordSet * I, int at, float *v); | int CoordSetGetAtomTxfVertex(CoordSet * I, int at, float *v); | |||
int CoordSetSetAtomVertex(CoordSet * I, int at, const float *v); | int CoordSetSetAtomVertex(CoordSet * I, int at, const float *v); | |||
int CoordSetMoveAtom(CoordSet * I, int at, const float *v, int mode); | int CoordSetMoveAtom(CoordSet * I, int at, const float *v, int mode); | |||
int CoordSetMoveAtomLabel(CoordSet * I, int at, const float *v, int mode); | int CoordSetMoveAtomLabel(CoordSet * I, int at, const float *v, const float *dif f); | |||
int CoordSetTransformAtomTTTf(CoordSet * I, int at, const float *TTT); | int CoordSetTransformAtomTTTf(CoordSet * I, int at, const float *TTT); | |||
int CoordSetTransformAtomR44f(CoordSet * I, int at, const float *matrix); | int CoordSetTransformAtomR44f(CoordSet * I, int at, const float *matrix); | |||
int CoordSetValidateRefPos(CoordSet * I); | int CoordSetValidateRefPos(CoordSet * I); | |||
void CoordSetPurge(CoordSet * I); | void CoordSetPurge(CoordSet * I); | |||
void CoordSetAdjustAtmIdx(CoordSet * I, int *lookup, int nAtom); | void CoordSetAdjustAtmIdx(CoordSet * I, int *lookup, int nAtom); | |||
int CoordSetMerge(ObjectMolecule *OM, CoordSet * I, CoordSet * cs); /* mu st be non-overlapping */ | int CoordSetMerge(ObjectMolecule *OM, CoordSet * I, CoordSet * cs); /* mu st be non-overlapping */ | |||
void CoordSetRecordTxfApplied(CoordSet * I, const float *TTT, int homogenous); | void CoordSetRecordTxfApplied(CoordSet * I, const float *TTT, int homogenous); | |||
void CoordSetUpdateCoord2IdxMap(CoordSet * I, float cutoff); | void CoordSetUpdateCoord2IdxMap(CoordSet * I, float cutoff); | |||
typedef struct _CCoordSetUpdateThreadInfo CCoordSetUpdateThreadInfo; | typedef struct _CCoordSetUpdateThreadInfo CCoordSetUpdateThreadInfo; | |||
void CoordSetUpdateThread(CCoordSetUpdateThreadInfo * T); | void CoordSetUpdateThread(CCoordSetUpdateThreadInfo * T); | |||
void LabPosTypeCopy(const LabPosType * src, LabPosType * dst); | void LabPosTypeCopy(const LabPosType * src, LabPosType * dst); | |||
void RefPosTypeCopy(const RefPosType * src, RefPosType * dst); | void RefPosTypeCopy(const RefPosType * src, RefPosType * dst); | |||
#ifndef _PYMOL_NOPY | ||||
int CoordSetSetSettingFromPyObject(PyMOLGlobals * G, CoordSet *cs, int at, int s | ||||
etting_id, PyObject *val); | ||||
#endif | ||||
int CoordSetCheckSetting(PyMOLGlobals * G, CoordSet *cs, int at, int setting_id) | ||||
; | ||||
PyObject *SettingGetIfDefinedPyObject(PyMOLGlobals * G, CoordSet *cs, int at, in | ||||
t setting_id); | ||||
int CoordSetCheckUniqueID(PyMOLGlobals * G, CoordSet *cs, int at); | ||||
#define AtomStateGetSetting_b AtomStateGetSetting | ||||
#define AtomStateGetSetting_i AtomStateGetSetting | ||||
#define AtomStateGetSetting_f AtomStateGetSetting | ||||
#define AtomStateGetSetting_s AtomStateGetSetting | ||||
#define AtomStateGetSetting_color AtomStateGetSetting | ||||
#define ATOMSTATEGETSETTINGARGS PyMOLGlobals * G, \ | ||||
const ObjectMolecule * obj, \ | ||||
const CoordSet * cs, int idx, \ | ||||
const AtomInfoType * ai, \ | ||||
int setting_id | ||||
template <typename V> void AtomStateGetSetting(ATOMSTATEGETSETTINGARGS, V * out) | ||||
; | ||||
// atom-state level setting | ||||
template <typename V> void SettingSet(int index, V value, CoordSet *cs, int idx) | ||||
{ | ||||
auto& G = cs->State.G; | ||||
CoordSetCheckUniqueID(G, cs, idx); | ||||
cs->has_atom_state_settings[idx] = true; | ||||
SettingUniqueSet(G, cs->atom_state_setting_id[idx], index, value); | ||||
} | ||||
// object-state level setting | // object-state level setting | |||
template <typename V> void SettingSet(int index, V value, CoordSet *cs) { | template <typename V> void SettingSet(int index, V value, CoordSet *cs) { | |||
SettingSet(cs->State.G, &cs->Setting, index, value); | SettingSet(cs->State.G, &cs->Setting, index, value); | |||
} | } | |||
#endif | #endif | |||
End of changes. 7 change blocks. | ||||
8 lines changed or deleted | 49 lines changed or added |