| 644 |
|
|
| 645 |
|
// initialize the atoms |
| 646 |
|
DirectionalAtom* dAtom; |
| 647 |
+ |
double ji[3]; |
| 648 |
|
double inertialMat[3][3]; |
| 649 |
|
|
| 650 |
|
for( i=0; i<nAtoms; i++ ){ |
| 656 |
|
painCave.isFatal = 1; |
| 657 |
|
simError(); |
| 658 |
|
} |
| 658 |
– |
if( currentAtomType->isLJ ) the_atoms[i]->setLJ(); |
| 659 |
– |
if( currentAtomType->isCharge ) the_atoms[i]->setCharged(); |
| 659 |
|
the_atoms[i]->setMass( currentAtomType->mass ); |
| 660 |
|
the_atoms[i]->setIdent( currentAtomType->ident ); |
| 661 |
|
|
| 662 |
|
if( bigSigma < currentAtomType->sigma ) bigSigma = currentAtomType->sigma; |
| 663 |
|
|
| 664 |
+ |
the_atoms[i]->setHasCharge(currentAtomType->isCharge); |
| 665 |
+ |
|
| 666 |
|
if( currentAtomType->isDirectional ){ |
| 667 |
|
currentDirectionalType = |
| 668 |
|
headDirectionalType->find( the_atoms[i]->getType() ); |
| 686 |
|
|
| 687 |
|
dAtom = (DirectionalAtom *) the_atoms[i]; |
| 688 |
|
dAtom->setHasDipole( currentDirectionalType->isDipole ); |
| 688 |
– |
dAtom->setMu( currentDirectionalType->dipole ); |
| 689 |
– |
dAtom->setMu( currentDirectionalType->dipole ); |
| 689 |
|
|
| 690 |
< |
// if it's sticky then it's an SSD type |
| 691 |
< |
dAtom->setSSD( currentDirectionalType->isSticky ); |
| 692 |
< |
dAtom->setJx( 0.0 ); |
| 693 |
< |
dAtom->setJy( 0.0 ); |
| 695 |
< |
dAtom->setJz( 0.0 ); |
| 690 |
> |
ji[0] = 0.0; |
| 691 |
> |
ji[1] = 0.0; |
| 692 |
> |
ji[2] = 0.0; |
| 693 |
> |
dAtom->setJ( ji ); |
| 694 |
|
dAtom->setI( inertialMat ); |
| 695 |
|
|
| 696 |
|
entry_plug->n_dipoles++; |
| 697 |
|
} |
| 700 |
– |
else{ |
| 701 |
– |
sprintf( painCave.errMsg, |
| 702 |
– |
"WATER error: Atom \"%s\" is directional, yet no standard" |
| 703 |
– |
" orientation was specifed in the BASS file.\n", |
| 704 |
– |
currentAtomType->name ); |
| 705 |
– |
painCave.isFatal = 1; |
| 706 |
– |
simError(); |
| 707 |
– |
} |
| 698 |
|
} |
| 699 |
|
} |
| 700 |
|
|