59 |
|
#include "UseTheForce/DarkSide/fElectrostaticScreeningMethod.h" |
60 |
|
#include "UseTheForce/DarkSide/fSwitchingFunctionType.h" |
61 |
|
#include "UseTheForce/doForces_interface.h" |
62 |
+ |
#include "UseTheForce/DarkSide/neighborLists_interface.h" |
63 |
|
#include "UseTheForce/DarkSide/electrostatic_interface.h" |
64 |
|
#include "UseTheForce/DarkSide/switcheroo_interface.h" |
65 |
|
#include "utils/MemoryUtils.hpp" |
68 |
|
#include "io/ForceFieldOptions.hpp" |
69 |
|
#include "UseTheForce/ForceField.hpp" |
70 |
|
|
71 |
+ |
|
72 |
|
#ifdef IS_MPI |
73 |
|
#include "UseTheForce/mpiComponentPlan.h" |
74 |
|
#include "UseTheForce/DarkSide/simParallel_interface.h" |
870 |
|
"succesfully sent the simulation information to fortran.\n"); |
871 |
|
MPIcheckPoint(); |
872 |
|
#endif // is_mpi |
873 |
+ |
|
874 |
+ |
// Setup number of neighbors in neighbor list if present |
875 |
+ |
if (simParams_->haveNeighborListNeighbors()) { |
876 |
+ |
setNeighbors(simParams_->getNeighborListNeighbors()); |
877 |
+ |
} |
878 |
+ |
|
879 |
+ |
|
880 |
|
} |
881 |
|
|
882 |
|
|
1453 |
|
|
1454 |
|
void SimInfo::setIOIndexToIntegrableObject(const std::vector<StuntDouble*>& v) { |
1455 |
|
IOIndexToIntegrableObject= v; |
1456 |
+ |
} |
1457 |
+ |
|
1458 |
+ |
/* Returns the Volume of the simulation based on a ellipsoid with semi-axes |
1459 |
+ |
based on the radius of gyration V=4/3*Pi*R_1*R_2*R_3 |
1460 |
+ |
where R_i are related to the principle inertia moments R_i = sqrt(C*I_i/N), this reduces to |
1461 |
+ |
V = 4/3*Pi*(C/N)^3/2*sqrt(det(I)). See S.E. Baltazar et. al. Comp. Mat. Sci. 37 (2006) 526-536. |
1462 |
+ |
*/ |
1463 |
+ |
void SimInfo::getGyrationalVolume(RealType &volume){ |
1464 |
+ |
Mat3x3d intTensor; |
1465 |
+ |
RealType det; |
1466 |
+ |
Vector3d dummyAngMom; |
1467 |
+ |
RealType sysconstants; |
1468 |
+ |
RealType geomCnst; |
1469 |
+ |
|
1470 |
+ |
geomCnst = 3.0/2.0; |
1471 |
+ |
/* Get the inertial tensor and angular momentum for free*/ |
1472 |
+ |
getInertiaTensor(intTensor,dummyAngMom); |
1473 |
+ |
|
1474 |
+ |
det = intTensor.determinant(); |
1475 |
+ |
sysconstants = geomCnst/(RealType)nGlobalIntegrableObjects_; |
1476 |
+ |
volume = 4.0/3.0*NumericConstant::PI*pow(sysconstants,3.0/2.0)*sqrt(det); |
1477 |
+ |
return; |
1478 |
|
} |
1479 |
|
|
1480 |
+ |
void SimInfo::getGyrationalVolume(RealType &volume, RealType &detI){ |
1481 |
+ |
Mat3x3d intTensor; |
1482 |
+ |
Vector3d dummyAngMom; |
1483 |
+ |
RealType sysconstants; |
1484 |
+ |
RealType geomCnst; |
1485 |
+ |
|
1486 |
+ |
geomCnst = 3.0/2.0; |
1487 |
+ |
/* Get the inertial tensor and angular momentum for free*/ |
1488 |
+ |
getInertiaTensor(intTensor,dummyAngMom); |
1489 |
+ |
|
1490 |
+ |
detI = intTensor.determinant(); |
1491 |
+ |
sysconstants = geomCnst/(RealType)nGlobalIntegrableObjects_; |
1492 |
+ |
volume = 4.0/3.0*NumericConstant::PI*pow(sysconstants,3.0/2.0)*sqrt(detI); |
1493 |
+ |
return; |
1494 |
+ |
} |
1495 |
|
/* |
1496 |
|
void SimInfo::setStuntDoubleFromGlobalIndex(std::vector<StuntDouble*> v) { |
1497 |
|
assert( v.size() == nAtoms_ + nRigidBodies_); |