| 34 |
|
|
| 35 |
|
int buildRandomBilayer( void ); |
| 36 |
|
|
| 37 |
– |
void getRandomRot( double rot[3][3] ); |
| 38 |
– |
|
| 37 |
|
int buildBilayer( int isRandom ){ |
| 38 |
|
|
| 39 |
|
if( isRandom ){ |
| 40 |
|
return buildRandomBilayer(); |
| 41 |
|
} |
| 42 |
|
else{ |
| 43 |
< |
sprintf( painCave.errMsg, |
| 44 |
< |
"Cannot currently create a non-random bilayer.\n" ); |
| 47 |
< |
painCave.isFatal = 1; |
| 48 |
< |
simError(); |
| 43 |
> |
|
| 44 |
> |
std::cerr << "unsupported feature\n"; |
| 45 |
|
return 0; |
| 46 |
|
} |
| 47 |
|
} |
| 248 |
|
|
| 249 |
|
int nCellsX, nCellsY, nCellsZ; |
| 250 |
|
|
| 251 |
< |
const double boxTargetX = 56; |
| 252 |
< |
const double boxTargetY = 41; |
| 251 |
> |
const double boxTargetX = 66.22752; |
| 252 |
> |
const double boxTargetY = 60.53088; |
| 253 |
|
|
| 254 |
|
nCellsX = (int)ceil(boxTargetX / waterCell); |
| 255 |
|
nCellsY = (int)ceil(boxTargetY / waterCell); |
| 279 |
|
double box_y = waterCell * nCellsY; |
| 280 |
|
double box_z = waterCell * nCellsZ; |
| 281 |
|
|
| 286 |
– |
|
| 287 |
– |
|
| 282 |
|
// create an fcc lattice in the water box. |
| 283 |
|
|
| 284 |
|
ndx = 0; |
| 381 |
|
|
| 382 |
|
sort(zSortArray.begin(),zSortArray.end(),SortCond()); |
| 383 |
|
|
| 384 |
< |
ofstream outFile( "./zConBead3-01.bass", ios::app); |
| 384 |
> |
ofstream outFile( "./zipper.bass", ios::app); |
| 385 |
|
|
| 386 |
|
for(i=0; i<nLipids; i++){ |
| 387 |
|
outFile << "zConstraint[" << i << "]{\n" |
| 569 |
|
// if( writer != NULL ) delete writer; |
| 570 |
|
|
| 571 |
|
return 1; |
| 578 |
– |
} |
| 579 |
– |
|
| 580 |
– |
void getRandomRot( double rot[3][3] ){ |
| 581 |
– |
|
| 582 |
– |
double theta, phi, psi; |
| 583 |
– |
double cosTheta; |
| 584 |
– |
|
| 585 |
– |
// select random phi, psi, and cosTheta |
| 586 |
– |
|
| 587 |
– |
phi = 2.0 * M_PI * drand48(); |
| 588 |
– |
psi = 2.0 * M_PI * drand48(); |
| 589 |
– |
cosTheta = (2.0 * drand48()) - 1.0; // sample cos -1 to 1 |
| 590 |
– |
|
| 591 |
– |
theta = acos( cosTheta ); |
| 592 |
– |
|
| 593 |
– |
rot[0][0] = (cos(phi) * cos(psi)) - (sin(phi) * cos(theta) * sin(psi)); |
| 594 |
– |
rot[0][1] = (sin(phi) * cos(psi)) + (cos(phi) * cos(theta) * sin(psi)); |
| 595 |
– |
rot[0][2] = sin(theta) * sin(psi); |
| 596 |
– |
|
| 597 |
– |
rot[1][0] = -(cos(phi) * sin(psi)) - (sin(phi) * cos(theta) * cos(psi)); |
| 598 |
– |
rot[1][1] = -(sin(phi) * sin(psi)) + (cos(phi) * cos(theta) * cos(psi)); |
| 599 |
– |
rot[1][2] = sin(theta) * cos(psi); |
| 600 |
– |
|
| 601 |
– |
rot[2][0] = sin(phi) * sin(theta); |
| 602 |
– |
rot[2][1] = -cos(phi) * sin(theta); |
| 603 |
– |
rot[2][2] = cos(theta); |
| 572 |
|
} |
| 605 |
– |
|
| 573 |
|
|
| 607 |
– |
|
| 574 |
|
void buildMap( double &x, double &y, double &z, |
| 575 |
|
double boxX, double boxY, double boxZ ){ |
| 576 |
|
|