338 |
|
if( frcFile == NULL ){ |
339 |
|
|
340 |
|
sprintf( painCave.errMsg, |
341 |
< |
"Error opening the force field parameter file: %s\n" |
342 |
< |
"Have you tried setting the FORCE_PARAM_PATH environment " |
341 |
> |
"Error opening the force field parameter file:\n" |
342 |
> |
"\t%s\n" |
343 |
> |
"\tHave you tried setting the FORCE_PARAM_PATH environment " |
344 |
|
"variable?\n", |
345 |
|
fileName ); |
346 |
+ |
painCave.severity = OOPSE_ERROR; |
347 |
|
painCave.isFatal = 1; |
348 |
|
simError(); |
349 |
|
} |
646 |
|
|
647 |
|
// initialize the atoms |
648 |
|
DirectionalAtom* dAtom; |
649 |
+ |
double ji[3]; |
650 |
|
double inertialMat[3][3]; |
651 |
|
|
652 |
|
for( i=0; i<nAtoms; i++ ){ |
658 |
|
painCave.isFatal = 1; |
659 |
|
simError(); |
660 |
|
} |
658 |
– |
if( currentAtomType->isLJ ) the_atoms[i]->setLJ(); |
659 |
– |
if( currentAtomType->isCharge ) the_atoms[i]->setCharged(); |
661 |
|
the_atoms[i]->setMass( currentAtomType->mass ); |
662 |
|
the_atoms[i]->setIdent( currentAtomType->ident ); |
663 |
|
|
664 |
|
if( bigSigma < currentAtomType->sigma ) bigSigma = currentAtomType->sigma; |
665 |
|
|
666 |
+ |
the_atoms[i]->setHasCharge(currentAtomType->isCharge); |
667 |
+ |
|
668 |
|
if( currentAtomType->isDirectional ){ |
669 |
|
currentDirectionalType = |
670 |
|
headDirectionalType->find( the_atoms[i]->getType() ); |
688 |
|
|
689 |
|
dAtom = (DirectionalAtom *) the_atoms[i]; |
690 |
|
dAtom->setHasDipole( currentDirectionalType->isDipole ); |
688 |
– |
dAtom->setMu( currentDirectionalType->dipole ); |
689 |
– |
dAtom->setMu( currentDirectionalType->dipole ); |
691 |
|
|
692 |
< |
// if it's sticky then it's an SSD type |
693 |
< |
dAtom->setSSD( currentDirectionalType->isSticky ); |
694 |
< |
dAtom->setJx( 0.0 ); |
695 |
< |
dAtom->setJy( 0.0 ); |
695 |
< |
dAtom->setJz( 0.0 ); |
692 |
> |
ji[0] = 0.0; |
693 |
> |
ji[1] = 0.0; |
694 |
> |
ji[2] = 0.0; |
695 |
> |
dAtom->setJ( ji ); |
696 |
|
dAtom->setI( inertialMat ); |
697 |
|
|
698 |
|
entry_plug->n_dipoles++; |
699 |
– |
} |
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(); |
699 |
|
} |
700 |
|
} |
701 |
|
} |