| •1 |
#cxx . . $ `<file>/src/Mol.h`/include <string> |
| 2 |
|
| 3 |
class MyStringcxx . . $ MyString#{ |
| 4 |
public: |
| 5 |
int lastcxx . . $ MyString#last.; |
| 6 |
char lastccxx . . $ MyString#lastc.; |
| 7 |
char *stcxx . . $ MyString#st.; |
| 8 |
MyStringcxx . . $ MyString#MyString(fda57c8427c60377).(char *_st){ |
| 9 |
lastcxx . . $ MyString#last.=-1; |
| 10 |
stcxx . . $ MyString#st.=_st; |
| 11 |
} |
| 12 |
char* subcxx . . $ MyString#sub(bd8748c684e7061c).(int a, int b){ |
| 13 |
a--; |
| 14 |
stcxx . . $ MyString#st.[lastcxx . . $ MyString#last.]=lastccxx . . $ MyString#lastc.; |
| 15 |
lastccxx . . $ MyString#lastc.=stcxx . . $ MyString#st.[b]; |
| 16 |
stcxx . . $ MyString#st.[b]=0; |
| 17 |
lastcxx . . $ MyString#last.=b; |
| 18 |
return stcxx . . $ MyString#st.+a; |
| 19 |
} |
| 20 |
}; |
| 21 |
|
| 22 |
|
| 23 |
class QAtomcxx . . $ QAtom#{ |
| 24 |
public: |
| 25 |
float pxcxx . . $ QAtom#px.,pycxx . . $ QAtom#py.,pzcxx . . $ QAtom#pz.,rcxx . . $ QAtom#r.; |
| 26 |
float crcxx . . $ QAtom#cr.,cgcxx . . $ QAtom#cg.,cbcxx . . $ QAtom#cb.; |
| 27 |
int serialcxx . . $ QAtom#serial.; |
| 28 |
|
| 29 |
int chainIndexcxx . . $ QAtom#chainIndex.; |
| 30 |
unsigned int atomColorcxx . . $ QAtom#atomColor.; |
| 31 |
|
| 32 |
float spacefillrcxx . . $ QAtom#spacefillr., covalentrcxx . . $ QAtom#covalentr.; |
| 33 |
|
| 34 |
int txcxx . . $ QAtom#tx.,tycxx . . $ QAtom#ty.; // starting places for texture |
| 35 |
|
| 36 |
bool hetatomFlagcxx . . $ QAtom#hetatomFlag.; |
| 37 |
//CubeMapSamp s; |
| 38 |
OctaMapSampcxx . . $ OctaMapSamp# scxx . . $ QAtom#s.; |
| 39 |
|
| 40 |
inline Point3fcxx . . $ vcg/Point3f# Pcxx . . $ QAtom#P(1599a330e41e2ee3).() const { |
| 41 |
return Point3fcxx . . $ vcg/Point3#Point3(ca6b6cb9f73ddfb2).(pxcxx . . $ QAtom#px., pycxx . . $ QAtom#py., pzcxx . . $ QAtom#pz.); |
| 42 |
} |
| 43 |
|
| 44 |
bool AssignNextTextPoscxx . . $ QAtom#AssignNextTextPos(83c267b20bac841a).(int texsize); |
| 45 |
|
| 46 |
void SmoothTexturecxx . . $ QAtom#SmoothTexture(1b8c9224ae40325d).(vectorcxx . . $ std/vector#<Bytecxx . . $ Byte#> &t, int siz){ |
| 47 |
/*s.Smooth( t, siz, tx, ty);*/ |
| 48 |
} |
| 49 |
void SmoothTexturecxx . . $ QAtom#SmoothTexture(c1c2f997c01591dc).(vectorcxx . . $ std/vector#<int> &t, int siz){ |
| 50 |
/*s.Smooth( t, siz, tx, ty);*/ |
| 51 |
} |
| 52 |
|
| 53 |
void FillTexturecxx . . $ QAtom#FillTexture(1b8c9224ae40325d).(vectorcxx . . $ std/vector#<Bytecxx . . $ Byte#> &texture, int textsize) { |
| 54 |
scxx . . $ QAtom#s..FillTexturecxx . . $ OctaMapSamp#FillTexture(75de56d795bd0575).(texture, textsize, txcxx . . $ QAtom#tx.,tycxx . . $ QAtom#ty., crcxx . . $ QAtom#cr.,cgcxx . . $ QAtom#cg.,cbcxx . . $ QAtom#cb.); |
| 55 |
} |
| 56 |
|
| 57 |
Point3fcxx . . $ vcg/Point3f# trpcxx . . $ QAtom#trp.; float trrcxx . . $ QAtom#trr.; // transormed pos and radius |
| 58 |
|
| 59 |
void Transformcxx . . $ QAtom#Transform(5d15d4e2ac4f9dae).(const Point3fcxx . . $ vcg/Point3f# &ax,const Point3fcxx . . $ vcg/Point3f# &ay,const Point3fcxx . . $ vcg/Point3f# &az){ |
| 60 |
Point3fcxx . . $ vcg/Point3f# pcxx . . $ vcg/Point3#Point3(ca6b6cb9f73ddfb2).(pxcxx . . $ QAtom#px.,pycxx . . $ QAtom#py.,pzcxx . . $ QAtom#pz.); |
| 61 |
trpcxx . . $ QAtom#trp.[cxx . . $ vcg/Point3#`operator[]`(7a0ef1c7079e8533).0]=p*cxx . . $ vcg/Point3#`operator*`(4a489cdb697f6e61).ax; |
| 62 |
trpcxx . . $ QAtom#trp.[cxx . . $ vcg/Point3#`operator[]`(7a0ef1c7079e8533).1]=p*cxx . . $ vcg/Point3#`operator*`(4a489cdb697f6e61).ay; |
| 63 |
trpcxx . . $ QAtom#trp.[cxx . . $ vcg/Point3#`operator[]`(7a0ef1c7079e8533).2]=p*cxx . . $ vcg/Point3#`operator*`(4a489cdb697f6e61).az; |
| 64 |
//printf("[r=%f] (%f %f %f) -> (%f %f %f)\n", r, px,py,pz, trp[0],trp[1],trp[2] ); |
| 65 |
} |
| 66 |
|
| 67 |
void ScaleTranslcxx . . $ QAtom#ScaleTransl(bd1040fe176e0786).(float dx, float dy, float scale){ |
| 68 |
trpcxx . . $ QAtom#trp.[cxx . . $ vcg/Point3#`operator[]`(7a0ef1c7079e8533).0]=(trpcxx . . $ QAtom#trp.[cxx . . $ vcg/Point3#`operator[]`(7a0ef1c7079e8533).0]+dx)*scale; |
| 69 |
trpcxx . . $ QAtom#trp.[cxx . . $ vcg/Point3#`operator[]`(7a0ef1c7079e8533).1]=(trpcxx . . $ QAtom#trp.[cxx . . $ vcg/Point3#`operator[]`(7a0ef1c7079e8533).1]+dy)*scale; |
| 70 |
trrcxx . . $ QAtom#trr.=rcxx . . $ QAtom#r.*scale; |
| 71 |
//printf("[%f*%f] -> (%f %f %f %f)\n", r, scale, trp[0],trp[1],trp[2],trr ); |
| 72 |
} |
| 73 |
|
| 74 |
// color from atom name |
| 75 |
void getColcxx . . $ QAtom#getCol(85c52e162fed56f9).(const char* st); |
| 76 |
|
| 77 |
QAtomcxx . . $ QAtom#QAtom(8d4ab0a187bf9331).(stringcxx . . $ std/string# st); |
| 78 |
static bool readErrorcxx . . $ QAtom#readError.; |
| 79 |
static char lastReadErrorcxx . . $ QAtom#lastReadError.[1024]; |
| 80 |
|
| 81 |
void UpdateColorscxx . . $ QAtom#UpdateColors(9364e6e7bff7660).(float mode); |
| 82 |
|
| 83 |
// sends impostors on screnbuffer |
| 84 |
void Drawcxx . . $ QAtom#Draw(49f6e7a06ebc5aa8).(); |
| 85 |
// sends halos on screnbuffer |
| 86 |
void DrawHalocxx . . $ QAtom#DrawHalo(49f6e7a06ebc5aa8).(); |
| 87 |
void DrawShadowmapcxx . . $ QAtom#DrawShadowmap(49f6e7a06ebc5aa8).(); |
| 88 |
|
| 89 |
// for GPU ao. |
| 90 |
void DrawOnTexturecxx . . $ QAtom#DrawOnTexture(49f6e7a06ebc5aa8).(); |
| 91 |
|
| 92 |
/* |
| 93 |
bool operator < (const QAtom& a) const { |
| 94 |
return trp[2]>a.trp[2]; |
| 95 |
} |
| 96 |
*/ |
| 97 |
|
| 98 |
static unsigned int VBOsizecxx . . $ QAtom#VBOsize(db52760e79bf9054).(); |
| 99 |
void VBOfillcxx . . $ QAtom#VBOfill(e6881f009d13a851).(float * f); |
| 100 |
static void VBOsetupcxx . . $ QAtom#VBOsetup(e6881f009d13a851).(float *f); |
| 101 |
|
| 102 |
//inline bool operator <= (QAtom const &a) const { return px<=a.px; }; |
| 103 |
inline bool operatorcxx . . $ QAtom#`operator<`(d10d2847a208e69c). < (QAtomcxx . . $ QAtom# const &a) const { return pxcxx . . $ QAtom#px.< a.pxcxx . . $ QAtom#px.; }; |
| 104 |
|
| 105 |
}; |
| 106 |
|
| 107 |
|
| 108 |
class Bondcxx . . $ Bond#{ |
| 109 |
public: |
| 110 |
Point3fcxx . . $ vcg/Point3f# acxx . . $ Bond#a., bcxx . . $ Bond#b.; |
| 111 |
Point3fcxx . . $ vcg/Point3f# dircxx . . $ Bond#dir.; |
| 112 |
Point3fcxx . . $ vcg/Point3f# col1cxx . . $ Bond#col1., col2cxx . . $ Bond#col2.; |
| 113 |
float lenghtcxx . . $ Bond#lenght.; |
| 114 |
Point3fcxx . . $ vcg/Point3f# startpcxx . . $ Bond#startp.; // start of parameterization |
| 115 |
|
| 116 |
const QAtomcxx . . $ QAtom# *atmAcxx . . $ Bond#atmA., *atmBcxx . . $ Bond#atmB.; |
| 117 |
|
| 118 |
bool hetatomFlagcxx . . $ Bond#hetatomFlag.; |
| 119 |
//Point3f cola, colb; |
| 120 |
void Drawcxx . . $ Bond#Draw(49f6e7a06ebc5aa8).(); |
| 121 |
void DrawHalocxx . . $ Bond#DrawHalo(49f6e7a06ebc5aa8).(); |
| 122 |
void DrawShadowmapcxx . . $ Bond#DrawShadowmap(49f6e7a06ebc5aa8).(); |
| 123 |
//Bond(Point3f a,Point3f b, float rada, float radb, Point3f col1, Point3f col2); |
| 124 |
Bondcxx . . $ Bond#Bond(af2aa09e7c59b5b6).(const QAtomcxx . . $ QAtom# &a,const QAtomcxx . . $ QAtom# &b); |
| 125 |
|
| 126 |
void UpdateColorscxx . . $ Bond#UpdateColors(49f6e7a06ebc5aa8).(); // copies color from atoms |
| 127 |
|
| 128 |
void DrawOnTexturecxx . . $ Bond#DrawOnTexture(49f6e7a06ebc5aa8).(); // for GPU ao. |
| 129 |
bool AssignNextTextPoscxx . . $ Bond#AssignNextTextPos(83c267b20bac841a).(int texsize); |
| 130 |
int txcxx . . $ Bond#tx., tycxx . . $ Bond#ty.; |
| 131 |
|
| 132 |
}; |
| 133 |
|
| 134 |
|
| 135 |
class Molcxx . . $ Mol#{ |
| 136 |
public: |
| 137 |
|
| 138 |
bool stickscxx . . $ Mol#sticks.; // true if ball_and_stick mode |
| 139 |
float colModecxx . . $ Mol#colMode.; // mode = 0 -> per atom |
| 140 |
// mode = 1 -> per chain |
| 141 |
|
| 142 |
void SetColModecxx . . $ Mol#SetColMode(9364e6e7bff7660).(float newColMode); |
| 143 |
|
| 144 |
void SetBallAndStickscxx . . $ Mol#SetBallAndSticks(9364e6e7bff7660).(float rad=0.3); |
| 145 |
void SetLicoricecxx . . $ Mol#SetLicorice(9364e6e7bff7660).(float rad=0.5); |
| 146 |
void SetSpaceFillcxx . . $ Mol#SetSpaceFill(49f6e7a06ebc5aa8).(); |
| 147 |
|
| 148 |
vectorcxx . . $ std/vector#<QAtomcxx . . $ QAtom#> atomcxx . . $ Mol#atom.; |
| 149 |
vectorcxx . . $ std/vector#<Bondcxx . . $ Bond#> bondcxx . . $ Mol#bond.; |
| 150 |
|
| 151 |
float pxcxx . . $ Mol#px.,pycxx . . $ Mol#py.,pzcxx . . $ Mol#pz.,rcxx . . $ Mol#r.; |
| 152 |
bool textureAssignedcxx . . $ Mol#textureAssigned.; |
| 153 |
|
| 154 |
void Drawcxx . . $ Mol#Draw(49f6e7a06ebc5aa8).(); |
| 155 |
void DrawShadowmapcxx . . $ Mol#DrawShadowmap(b45ddcbc8423892c).(bool invert); |
| 156 |
|
| 157 |
void DrawHaloscxx . . $ Mol#DrawHalos(49f6e7a06ebc5aa8).(); |
| 158 |
void DrawOnTexturecxx . . $ Mol#DrawOnTexture(49f6e7a06ebc5aa8).(); |
| 159 |
|
| 160 |
void FindBondscxx . . $ Mol#FindBonds(49f6e7a06ebc5aa8).(); |
| 161 |
|
| 162 |
void ComputeSizecxx . . $ Mol#ComputeSize(49f6e7a06ebc5aa8).(); |
| 163 |
bool ReadPdbcxx . . $ Mol#ReadPdb(c5f7da30cbc0f4e9).(const char *filename); |
| 164 |
|
| 165 |
float tx0cxx . . $ Mol#tx0.,ty0cxx . . $ Mol#ty0.,tx1cxx . . $ Mol#tx1.,ty1cxx . . $ Mol#ty1.; // bounding box transformed |
| 166 |
void Transformcxx . . $ Mol#Transform(5d15d4e2ac4f9dae).(const Point3fcxx . . $ vcg/Point3f# &ax,const Point3fcxx . . $ vcg/Point3f# &ay,const Point3fcxx . . $ vcg/Point3f# &az); |
| 167 |
|
| 168 |
void ScaleTranslcxx . . $ Mol#ScaleTransl(9364e6e7bff7660).(float scale){ |
| •169 |
for (int i=0; i < (int)atomcxx . . $ Mol#atom..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); i++) |
| 170 |
atomcxx . . $ Mol#atom.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i].ScaleTranslcxx . . $ QAtom#ScaleTransl(bd1040fe176e0786).( -tx0cxx . . $ Mol#tx0., -ty0cxx . . $ Mol#ty0., scale); |
| 171 |
} |
| 172 |
|
| 173 |
void SmoothTexturecxx . . $ Mol#SmoothTexture(1b8c9224ae40325d).(vectorcxx . . $ std/vector#<Bytecxx . . $ Byte#> &t, int siz){ |
| •174 |
for (int i=0; i < (int)atomcxx . . $ Mol#atom..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); i++) |
| 175 |
atomcxx . . $ Mol#atom.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i].SmoothTexturecxx . . $ QAtom#SmoothTexture(1b8c9224ae40325d).(t,siz); |
| 176 |
} |
| 177 |
|
| 178 |
void SmoothTexturecxx . . $ Mol#SmoothTexture(c1c2f997c01591dc).(vectorcxx . . $ std/vector#<int> &t, int siz){ |
| •179 |
for (int i=0; i < (int)atomcxx . . $ Mol#atom..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); i++) |
| 180 |
atomcxx . . $ Mol#atom.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i].SmoothTexturecxx . . $ QAtom#SmoothTexture(c1c2f997c01591dc).(t,siz); |
| 181 |
} |
| 182 |
|
| 183 |
void Zerocxx . . $ Mol#Zero(49f6e7a06ebc5aa8).() { |
| •184 |
for (int i=0; i < (int)atomcxx . . $ Mol#atom..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); i++) |
| 185 |
atomcxx . . $ Mol#atom.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i].scxx . . $ QAtom#s..Zerocxx . . $ OctaMapSamp#Zero(49f6e7a06ebc5aa8).(); |
| 186 |
} |
| 187 |
|
| 188 |
void DuplicateTexelscxx . . $ Mol#DuplicateTexels(1b8c9224ae40325d).(vectorcxx . . $ std/vector#<Bytecxx . . $ Byte#> &t, int size); |
| 189 |
|
| 190 |
void FillTexturecxx . . $ Mol#FillTexture(682aa932c3458127).(vectorcxx . . $ std/vector#<Bytecxx . . $ Byte#> &texture, const vectorcxx . . $ std/vector#<int> &sumtable, |
| 191 |
int texsize, float div ); |
| 192 |
|
| 193 |
bool ReassignTexturecxx . . $ Mol#ReassignTexture(83c267b20bac841a).(int textsize); // for a given texture size |
| 194 |
|
| 195 |
void ReassignTextureAutosizecxx . . $ Mol#ReassignTextureAutosize(49f6e7a06ebc5aa8).(); // autoselect texture size |
| 196 |
|
| 197 |
int NTotTexelscxx . . $ Mol#NTotTexels(b126dc7c1de90089).(){ |
| 198 |
return atomcxx . . $ Mol#atom..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).()*atomcxx . . $ Mol#atom.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0].scxx . . $ QAtom#s..TotTexSizeXcxx . . $ OctaMapSamp#TotTexSizeX(b126dc7c1de90089).()*atomcxx . . $ Mol#atom.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0].scxx . . $ QAtom#s..TotTexSizeYcxx . . $ OctaMapSamp#TotTexSizeY(b126dc7c1de90089).(); |
| 199 |
} |
| 200 |
|
| 201 |
// vertexbuffer objects |
| 202 |
unsigned int vboNormcxx . . $ Mol#vboNorm., vboShadowcxx . . $ Mol#vboShadow., vboAOcxx . . $ Mol#vboAO.; |
| 203 |
unsigned int vboNormStcxx . . $ Mol#vboNormSt., vboShadowStcxx . . $ Mol#vboShadowSt., vboAOStcxx . . $ Mol#vboAOSt.; // for the sticks |
| 204 |
|
| 205 |
Molcxx . . $ Mol#Mol(49f6e7a06ebc5aa8).(); |
| 206 |
|
| 207 |
char filenamecxx . . $ Mol#filename.[1024]; |
| 208 |
char* GetFilenameTexcxx . . $ Mol#GetFilenameTex(41208ce6ca65dd58).(); |
| 209 |
char* GetFilenameSnapcxx . . $ Mol#GetFilenameSnap(41208ce6ca65dd58).(); |
| 210 |
char* GetMolNamecxx . . $ Mol#GetMolName(41208ce6ca65dd58).(); |
| 211 |
|
| 212 |
bool PrepareAOstepcxx . . $ Mol#PrepareAOstep(83c267b20bac841a).(int nsteps=1); |
| 213 |
float PredictAOcxx . . $ Mol#PredictAO(9b8c9e39889c762c).(); |
| 214 |
|
| 215 |
void ResetAOcxx . . $ Mol#ResetAO(49f6e7a06ebc5aa8).(); |
| 216 |
|
| 217 |
bool DoingAOcxx . . $ Mol#DoingAO(c9857a73d68e59ba).(); // true if AO is being computed |
| 218 |
bool DecentAOcxx . . $ Mol#DecentAO(c9857a73d68e59ba).(); // true if AO (being computed) is "decent" |
| 219 |
|
| 220 |
// for testing purposes |
| •221 |
void PrepareAOSingleViewcxx . . $ Mol#PrepareAOSingleView(49f6e7a06ebc5aa8).(); |
| 222 |
|
| 223 |
int natmcxx . . $ Mol#natm., nhetatmcxx . . $ Mol#nhetatm.; // number of atoms of type hetatm and not ... |
| 224 |
|
| 225 |
bool IsReadycxx . . $ Mol#IsReady(c9857a73d68e59ba).(){return readycxx . . $ Mol#ready.;} |
| 226 |
|
| 227 |
void UpdateColorscxx . . $ Mol#UpdateColors(49f6e7a06ebc5aa8).(); |
| 228 |
|
| 229 |
private: |
| 230 |
|
| 231 |
// unsigned int DL_bonds, DL_atoms; // display lists (UNUSED) |
| 232 |
|
| 233 |
void AddBondcxx . . $ Mol#AddBond(3e454b8ccf442868).(int i, int j); |
| 234 |
|
| 235 |
void PrepareAOallAtOncecxx . . $ Mol#PrepareAOallAtOnce(49f6e7a06ebc5aa8).(); |
| 236 |
|
| 237 |
int AOdoneLvlcxx . . $ Mol#AOdoneLvl.; |
| 238 |
|
| 239 |
void PrepareAOstartcxx . . $ Mol#PrepareAOstart(49f6e7a06ebc5aa8).(); |
| 240 |
bool AOreadycxx . . $ Mol#AOready.; |
| 241 |
bool AOstartedcxx . . $ Mol#AOstarted.; |
| 242 |
bool readycxx . . $ Mol#ready.; |
| 243 |
}; |
| 244 |
|
| 245 |
extern float stick_radiuscxx . . $ stick_radius.; |
| 246 |
|