NAMD
|
#include <unistd.h>
#include <stdio.h>
#include <limits.h>
#include "converse.h"
Go to the source code of this file.
Macros | |
#define | NAMD_FILENAME_BUFFER_SIZE 4096 |
#define | COULOMB 332.0636 |
#define | BOLTZMANN 0.001987191 |
#define | TIMEFACTOR 48.88821 |
#define | PRESSUREFACTOR 6.95E4 |
#define | PDBVELFACTOR 20.45482706 |
#define | PDBVELINVFACTOR (1.0/PDBVELFACTOR) |
#define | PNPERKCALMOL 69.479 |
#define | namdnearbyint(x) floor((x)+0.5) |
#define | PI 3.141592653589793 |
#define | TWOPI 2.0 * PI |
#define | ONE 1.000000000000000 |
#define | ZERO 0.000000000000000 |
#define | SMALLRAD 0.0005 |
#define | SMALLRAD2 SMALLRAD*SMALLRAD |
#define | FALSE 0 |
#define | TRUE 1 |
#define | NO 0 |
#define | YES 1 |
#define | STRINGNULL '\0' |
#define | MAX_NEIGHBORS 27 |
#define | SIMPARAMSTAG 100 |
#define | STATICPARAMSTAG 101 |
#define | MOLECULETAG 102 |
#define | FULLTAG 104 |
#define | FULLFORCETAG 105 |
#define | DPMTATAG 106 |
#define | GRIDFORCEGRIDTAG 107 |
#define | COMPUTEMAPTAG 108 |
#define | CYCLE_BARRIER 0 |
#define | PME_BARRIER 0 |
#define | STEP_BARRIER 0 |
#define | USE_BARRIER (CYCLE_BARRIER || PME_BARRIER || STEP_BARRIER) |
#define | NAMD_SeparateWaters 0 |
#define | NAMD_ComputeNonbonded_SortAtoms 1 |
#define | NAMD_ComputeNonbonded_SortAtoms_LessBranches 1 |
#define | WAT_TIP3 0 |
#define | WAT_TIP4 1 |
#define | WAT_SWM4 2 /* Drude model (5 charge sites) */ |
Typedefs | |
typedef long long | int64 |
typedef float | Real |
typedef double | BigReal |
typedef int | Bool |
Functions | |
void | NAMD_quit (const char *) |
void | NAMD_die (const char *) |
void | NAMD_err (const char *) |
void | NAMD_bug (const char *) |
int | NAMD_file_exists (const char *filename) |
void | NAMD_backup_file (const char *filename, const char *extension=0) |
int | NAMD_open_text (const char *fname, int append=0) |
void | NAMD_write (int fd, const char *buf, size_t count, const char *fname="in NAMD_write()") |
void | NAMD_close (int fd, const char *fname) |
char * | NAMD_stringdup (const char *) |
FILE * | Fopen (const char *filename, const char *mode) |
int | Fclose (FILE *fout) |
#define BOLTZMANN 0.001987191 |
Definition at line 47 of file common.h.
Referenced by Controller::adaptTempUpdate(), Controller::Controller(), HomePatch::hardWallDrude(), Controller::langevinPiston1(), Controller::langevinPiston2(), Sequencer::langevinVelocities(), Sequencer::langevinVelocitiesBBK2(), Controller::multigatorCalcEnthalpy(), Controller::multigratorPressure(), Controller::multigratorTemperature(), Controller::outputFepEnergy(), Sequencer::reassignVelocities(), Controller::receivePressure(), Sequencer::reinitVelocities(), Controller::stochRescaleCoefficient(), and Controller::writeFepEnergyData().
#define COMPUTEMAPTAG 108 |
Definition at line 159 of file common.h.
Referenced by WorkDistrib::recvComputeMapChanges(), and WorkDistrib::sendComputeMap().
#define COULOMB 332.0636 |
Definition at line 46 of file common.h.
Referenced by ComputeNonbondedUtil::calcGBIS(), ExclElem::computeForce(), ComputeMsm::ComputeMsm(), ComputePme::doWork(), ComputeNonbondedCUDA::doWork(), ComputeEwald::doWork(), HomePatch::gbisComputeAfterP2(), HomePatch::positionsReady(), ComputeMsmSerialMgr::recvCoord(), ComputeFmmSerialMgr::recvCoord(), and ComputeQMMgr::recvPntChrg().
#define FALSE 0 |
Definition at line 118 of file common.h.
Referenced by Molecule::atoms_1to4(), ParseOptions::check_consistency(), GridforceFullMainGrid::compute_b(), ComputeCylindricalBC::ComputeCylindricalBC(), ComputeSphericalBC::ComputeSphericalBC(), ConfigList::ConfigList(), WorkDistrib::createAtomLists(), ParseOptions::DataElement::DataElement(), ParseOptions::defined(), Parameters::done_reading_files(), PDBData::field(), ParseOptions::get(), Parameters::get_table_pair_params(), Parameters::get_vdw_pair_params(), Molecule::go_restricted(), GridforceFullBaseGrid::GridforceFullBaseGrid(), GridforceFullMainGrid::initialize(), GridforceFullSubGrid::initialize(), Molecule::is_atom_constorqued(), Molecule::is_atom_constrained(), Molecule::is_atom_gridforced(), Molecule::is_atom_movdragged(), Molecule::is_atom_rotdragged(), Molecule::is_atom_stirred(), MGridforceParams::MGridforceParams(), Parameters::Parameters(), Molecule::read_go_file(), Vector::set(), ParseOptions::set(), and ParseOptions::units().
#define FULLFORCETAG 105 |
Definition at line 156 of file common.h.
Referenced by ComputeFullDirect::doWork().
#define FULLTAG 104 |
Definition at line 155 of file common.h.
Referenced by ComputeFullDirect::doWork().
#define GRIDFORCEGRIDTAG 107 |
Definition at line 158 of file common.h.
Referenced by Node::reloadGridforceGrid().
#define MOLECULETAG 102 |
Definition at line 154 of file common.h.
Referenced by Node::resendMolecule().
#define NAMD_FILENAME_BUFFER_SIZE 4096 |
Definition at line 38 of file common.h.
Referenced by Molecule::build_go_arrays(), Molecule::build_go_sigmas(), Molecule::build_go_sigmas2(), and Molecule::build_gridforce_params().
Definition at line 76 of file common.h.
Referenced by Lattice::delta(), Lattice::nearest(), Parameters::read_ener_table(), Parameters::read_energy_type(), Parameters::read_energy_type_bothcubspline(), Parameters::read_energy_type_cubspline(), Lattice::wrap_delta(), and Lattice::wrap_nearest_delta().
#define PDBVELFACTOR 20.45482706 |
Definition at line 50 of file common.h.
Referenced by ParallelIOMgr::bcastMolInfo(), and Sequencer::maximumMove().
#define PDBVELINVFACTOR (1.0/PDBVELFACTOR) |
#define PI 3.141592653589793 |
Definition at line 83 of file common.h.
Referenced by calcOverlap(), ImproperElem::computeForce(), CrosstermElem::computeForce(), DihedralElem::computeForce(), crossterm_setup(), ComputeEField::doForce(), ComputeLCPO::doForce(), GromacsTopFile::GromacsTopFile(), proc_getangle(), proc_getdihedral(), and vec_rotation_matrix().
#define PRESSUREFACTOR 6.95E4 |
Definition at line 49 of file common.h.
Referenced by PressureProfileReduction::getData(), Controller::printEnergies(), Controller::receivePressure(), Controller::rescaleaccelMD(), and SimParameters::scriptSet().
#define STATICPARAMSTAG 101 |
Definition at line 153 of file common.h.
Referenced by Node::resendMolecule().
#define STRINGNULL '\0' |
Definition at line 128 of file common.h.
Referenced by ParseOptions::get(), NAMD_find_first_word(), NAMD_pad(), NAMD_read_int(), NAMD_read_line(), NAMD_remove_comment(), and NAMD_truncate().
#define TIMEFACTOR 48.88821 |
Definition at line 48 of file common.h.
Referenced by Sequencer::addForceToMomentum(), Sequencer::addForceToMomentum3(), Sequencer::addMovDragToPosition(), Sequencer::addRotDragToPosition(), Sequencer::addVelocityToPosition(), Sequencer::correctMomentum(), HomePatch::hardWallDrude(), Sequencer::maximumMove(), Sequencer::minimize(), HomePatch::minimize_rattle2(), Sequencer::newMinimizeDirection(), HomePatch::rattle1(), HomePatch::rattle1old(), HomePatch::rattle2(), ComputeQMMgr::recvPartQM(), and Sequencer::submitMinimizeReductions().
#define TRUE 1 |
Definition at line 119 of file common.h.
Referenced by Molecule::atoms_1to4(), ParseOptions::check_consistency(), GridforceFullMainGrid::compute_b(), ComputeCylindricalBC::ComputeCylindricalBC(), ComputeSphericalBC::ComputeSphericalBC(), ConfigList::ConfigList(), WorkDistrib::createAtomLists(), ParseOptions::defined(), Parameters::done_reading_files(), PDBData::field(), ParseOptions::get(), Parameters::get_table_pair_params(), Parameters::get_vdw_pair_params(), Molecule::go_restricted(), GridforceFullMainGrid::initialize(), GridforceFullSubGrid::initialize(), MGridforceParams::MGridforceParams(), ParseOptions::ParseOptions(), Parameters::read_charmm_parameter_file(), Molecule::read_go_file(), Parameters::read_parameter_file(), Parameters::receive_Parameters(), Vector::set(), ParseOptions::set(), and ParseOptions::units().
#define TWOPI 2.0 * PI |
Definition at line 87 of file common.h.
Referenced by DihedralElem::computeForce(), ImproperElem::computeForce(), and ComputeEField::doForce().
#define USE_BARRIER (CYCLE_BARRIER || PME_BARRIER || STEP_BARRIER) |
#define WAT_SWM4 2 /* Drude model (5 charge sites) */ |
Definition at line 192 of file common.h.
Referenced by HomePatch::buildRattleList(), HomePatch::minimize_rattle2(), HomePatch::rattle1old(), and HomePatch::rattle2().
#define WAT_TIP3 0 |
Definition at line 190 of file common.h.
Referenced by HomePatch::rattle1().
#define WAT_TIP4 1 |
Definition at line 191 of file common.h.
Referenced by HomePatch::buildRattleList(), HomePatch::minimize_rattle2(), Molecule::num_deg_freedom(), HomePatch::rattle1old(), and HomePatch::rattle2().
#define ZERO 0.000000000000000 |
Definition at line 95 of file common.h.
Referenced by ComputeNonbondedUtil::calcGBIS().
typedef long long int64 |
int Fclose | ( | FILE * | fout | ) |
Definition at line 367 of file common.C.
Referenced by ConfigList::ConfigList(), parm::genclose(), PDB::PDB(), read_binary_file(), and Parameters::read_parameter_file().
FILE* Fopen | ( | const char * | filename, |
const char * | mode | ||
) |
Definition at line 273 of file common.C.
Referenced by ConfigList::ConfigList(), parm::genopen(), GridforceFullMainGrid::initialize(), PDB::PDB(), read_binary_file(), and Parameters::read_parameter_file().
void NAMD_backup_file | ( | const char * | filename, |
const char * | extension = 0 |
||
) |
Definition at line 167 of file common.C.
References endi(), iERROR(), iout, and NAMD_file_exists().
Referenced by Controller::adaptTempInit(), colvarproxy_namd::backup_file(), ofstream_namd::open(), open_dcd_write(), Controller::outputExtendedSystem(), Controller::outputFepEnergy(), Controller::outputTiEnergy(), CollectionMaster::receiveDataStream(), and Controller::write_accelMDG_rest_file().
void NAMD_bug | ( | const char * | ) |
Definition at line 129 of file common.C.
Referenced by Sequencer::algorithm(), Controller::algorithm(), CollectProxyVectorInstance::append(), CudaComputeNonbonded::assignPatches(), CudaComputeNonbonded::assignPatchesOnPe(), PmePencilXYZ::backwardDone(), LdbCoordinator::barrier(), ComputeNonbondedCUDA::build_exclusions(), ComputeNonbondedCUDA::build_lj_table(), HomePatch::buildSpanningTree(), ReductionMgr::buildSpanTree(), ComputeNonbondedUtil::calc_error(), Controller::calcPressure(), ComputePmeMgr::chargeGridReady(), checkSum(), ofstream_namd::close(), Box< Patch, CompAtom >::close(), Controller::compareChecksums(), ComputeCUDAMgr::ComputeCUDAMgr(), ComputeNonbondedCUDA::ComputeNonbondedCUDA(), ComputePmeCUDAMgr::ComputePmeCUDAMgr(), ComputeTclBC::ComputeTclBC(), CudaPmeTranspose::copyDataDeviceToDevice(), CudaPmeTranspose::copyDataDeviceToHost(), CudaPmeTranspose::copyDataHostToDevice(), WorkDistrib::createAtomLists(), ComputeCUDAMgr::createCudaComputeNonbonded(), ComputePmeCUDAMgr::createDevicesAndAtomFiler(), CsmAckHandler(), CsmHandler(), cuda_check_local_progress(), cuda_check_remote_progress(), cudaNAMD_bug(), CudaPmeRealSpaceCompute::CudaPmeRealSpaceCompute(), MigrateAtomsCombinedMsg::distribute(), ComputeGridForce::doForce(), HomePatch::doGroupSizeCheck(), ComputePme::doWork(), ComputeNonbondedCUDA::doWork(), CudaComputeNonbonded::doWork(), WorkDistrib::enqueueAngles(), WorkDistrib::enqueueAniso(), WorkDistrib::enqueueBonds(), WorkDistrib::enqueueCrossterms(), WorkDistrib::enqueueDihedrals(), WorkDistrib::enqueueExcls(), WorkDistrib::enqueueGromacsPair(), WorkDistrib::enqueueImpropers(), WorkDistrib::enqueueLCPO(), WorkDistrib::enqueuePme(), WorkDistrib::enqueueSelfA1(), WorkDistrib::enqueueSelfA2(), WorkDistrib::enqueueSelfA3(), WorkDistrib::enqueueSelfB1(), WorkDistrib::enqueueSelfB2(), WorkDistrib::enqueueSelfB3(), WorkDistrib::enqueueThole(), WorkDistrib::enqueueWork(), WorkDistrib::enqueueWorkA1(), WorkDistrib::enqueueWorkA2(), WorkDistrib::enqueueWorkA3(), WorkDistrib::enqueueWorkB1(), WorkDistrib::enqueueWorkB2(), WorkDistrib::enqueueWorkB3(), WorkDistrib::enqueueWorkC(), ScriptTcl::eval(), ComputeMap::extendPtrs(), findRecipEvirPe(), CudaComputeNonbonded::finishReductions(), ofstream_namd::flush(), PmeAtomStorage::getAtomIndex(), getBlockDim(), CudaPmeTranspose::getBuffer(), ComputeCUDAMgr::getComputeCUDAMgr(), ComputeCUDAMgr::getCudaComputeNonbonded(), ComputePmeCUDAMgr::getDevice(), ComputePmeCUDAMgr::getDevicePencilY(), ComputePmeCUDAMgr::getDevicePencilZ(), ParseOptions::getfromptr(), ComputePmeCUDAMgr::getHomePencil(), Communicate::getMessage(), ComputePmeCUDAMgr::getNode(), getPencilDim(), GridforceFullBaseGrid::grid_index(), FFTCompute::init(), ComputePmeCUDA::initialize(), ComputePatch::initialize(), ComputeHomePatch::initialize(), ComputePme::initialize(), LdbCoordinator::initialize(), ParallelIOMgr::initialize(), ComputePmeMgr::initialize(), ComputePmeMgr::initialize_computes(), IRSet::insert(), ParseOptions::issetfromptr(), ParseOptions::istruefromptr(), CudaComputeNonbonded::launchWork(), LdbCoordinator::LdbCoordinator(), ScriptTcl::load(), NamdState::loadStructure(), PatchMap::makePatches(), WorkDistrib::messageEnqueueWork(), CudaComputeNonbonded::messageEnqueueWork(), WorkDistrib::messageFinishCUDA(), WorkDistrib::messageFinishMIC(), HomePatch::minimize_rattle2(), Sequencer::multigratorPressure(), NAMD_write(), Node::Node(), PmeZPencil::node_process_untrans(), PmeYPencil::node_process_untrans(), ofstream_namd::open(), Box< Patch, CompAtom >::open(), CudaComputeNonbonded::openBoxesOnPe(), PatchMap::pack(), PatchMgr::PatchMgr(), CudaComputeNonbonded::patchReady(), PmePencilX::PmePencilX(), PmePencilXY::PmePencilXY(), PmePencilXYZ::PmePencilXYZ(), PmePencilY::PmePencilY(), PmePencilZ::PmePencilZ(), PmeTranspose::PmeTranspose(), ComputePmeMgr::pollChargeGridReady(), ComputePmeMgr::pollForcesReady(), PmePencilXYZMap::populateInitial(), PmePencilXMap::populateInitial(), PmePencilXYMap::populateInitial(), PmePencilMap::populateInitial(), Controller::printEnergies(), Rebalancer::printLoads(), PmePencilXMap::procNum(), PmePencilXYMap::procNum(), ProxyMgr::ProxyMgr(), HomePatch::rattle2(), Sequencer::reassignVelocities(), ProxyPatch::receiveAll(), ProxyPatch::receiveData(), ParallelIOMgr::receiveForces(), ParallelIOMgr::receivePositions(), ParallelIOMgr::receiveVelocities(), recursive_bisect_with_curve(), recvAck(), ComputePmeMgr::recvAck(), ComputePmeCUDADevice::recvAtoms(), ComputePmeCUDADevice::recvAtomsFromNeighbor(), recvBcast(), BroadcastMgr::recvBroadcast(), PatchMgr::recvCheckpointAck(), HomePatch::recvCheckpointLoad(), PatchMgr::recvCheckpointReq(), WorkDistrib::recvComputeMapChanges(), GlobalMasterServer::recvData(), recvData(), ComputePmeCUDAMgr::recvDevices(), recvEvalCommand(), recvEvalResult(), PatchMgr::recvExchangeReq(), ComputePmeCUDADevice::recvForcesFromNeighbor(), ComputePmeMgr::recvGrid(), ComputeQMMgr::recvPartQM(), ComputePmeMgr::recvRecipEvir(), Output::recvReplicaDcdData(), ComputeGlobal::recvResults(), ProxyMgr::recvResults(), ComputePmeMgr::recvUngrid(), NodePmeMgr::recvUngrid(), ReductionSet::ReductionSet(), register_cuda_compute_pair(), register_cuda_compute_self(), AtomMapper::registerIDsCompAtomExt(), AtomMapper::registerIDsFullAtom(), registerUserEventsForAllComputeObjs(), Node::reloadGridforceGrid(), ReductionMgr::remoteSubmit(), IRSet::remove(), replica_bcast(), replica_min_double(), CollectProxyVectorInstance::reset(), CollectionMgr::CollectVectorInstance::reset(), CollectionMaster::CollectVectorInstance::reset(), ComputeGlobal::saveTotalForces(), Sequencer::scalePositionsVelocities(), ComputeNonbondedUtil::select(), PmeZPencil::send_ungrid(), PatchMgr::sendAtoms(), NodePmeMgr::sendDataHelper(), ComputePmeMgr::sendDataPart(), Communicate::sendMessage(), PatchMgr::sendMovePatches(), PatchMgr::sendOneHomePatch(), NodePmeMgr::sendPencilsHelper(), ComputePmeMgr::sendPencilsPart(), CudaPmeTranspose::setDataPtrsYZX(), CudaPmeTranspose::setDataPtrsZXY(), ComputePmeCUDADevice::setPencilProxy(), ComputePmeCUDAMgr::setupPencils(), SimpleBroadcastObject< Tensor >::SimpleBroadcastObject(), Box< Patch, CompAtom >::skip(), CudaComputeNonbonded::skipPatchesOnPe(), CudaPmeKSpaceCompute::solve(), Node::startup(), ComputeMap::storeCompute(), ComputePmeCUDA::storePmeForceMsg(), PmePencilXYZ::submitReductions(), PmePencilZ::submitReductions(), ComputePmeMgr::submitReductions(), Sync::Sync(), TopoManagerWrapper::TopoManagerWrapper(), CudaPmeTranspose::transposeXYZtoYZX(), CudaPmeTranspose::transposeXYZtoZXY(), IRSet::unchecked_insert(), ComputePme::ungridForces(), ComputeMap::unpack(), GridforceGrid::unpack_grid(), unregister_cuda_compute(), CudaComputeNonbonded::unregisterBoxesOnPe(), AtomMapper::unregisterIDsCompAtomExt(), AtomMapper::unregisterIDsFullAtom(), ComputeCUDAMgr::update(), ComputeMgr::updateComputes(), Node::updateGridScale(), WorkDistrib::WorkDistrib(), AtomMapper::~AtomMapper(), and Rebalancer::~Rebalancer().
void NAMD_close | ( | int | fd, |
const char * | fname | ||
) |
void NAMD_err | ( | const char * | ) |
Definition at line 106 of file common.C.
Referenced by after_backend_init(), ComputeQMMgr::calcMOPAC(), ComputeQMMgr::calcORCA(), ComputeQMMgr::calcUSR(), close_dcd_write(), colvarproxy_namd::error(), NAMD_close(), NAMD_open(), NAMD_open_text(), NAMD_seek(), NAMD_write(), Controller::outputExtendedSystem(), PDB::PDB(), ComputeQMMgr::recvPartQM(), Output::recvReplicaDcdData(), and PDB::write().
int NAMD_file_exists | ( | const char * | filename | ) |
int NAMD_open_text | ( | const char * | fname, |
int | append = 0 |
||
) |
Definition at line 202 of file common.C.
References NAMD_err().
Referenced by ofstream_namd::open().
void NAMD_quit | ( | const char * | ) |
char* NAMD_stringdup | ( | const char * | s | ) |
void NAMD_write | ( | int | fd, |
const char * | buf, | ||
size_t | count, | ||
const char * | fname = "in NAMD_write()" |
||
) |
Definition at line 227 of file common.C.
References endi(), iout, iWARN(), NAMD_bug(), and NAMD_err().