Line data Source code
1 : // Copyright (C) 2015 Technische Universitaet Muenchen
2 : // This file is part of the Mamico project. For conditions of distribution
3 : // and use, please see the copyright notice in Mamico's main folder, or at
4 : // www5.in.tum.de/mamico
5 : #ifndef _MOLECULARDYNAMICS_CELLMAPPINGS_LENNARDJONESPOTENTIALENERGYMAPPING_H_
6 : #define _MOLECULARDYNAMICS_CELLMAPPINGS_LENNARDJONESPOTENTIALENERGYMAPPING_H_
7 :
8 : #include "simplemd/LinkedCell.h"
9 : #include "simplemd/services/MolecularPropertiesService.h"
10 : #include <Kokkos_Core.hpp>
11 :
12 : namespace simplemd {
13 : namespace cellmappings {
14 : class LennardJonesPotentialEnergyMapping;
15 : }
16 : } // namespace simplemd
17 :
18 : /** computes the Lennard Jones energy for all atomp pairs.
19 : * @author Philipp Neumann
20 : */
21 : class simplemd::cellmappings::LennardJonesPotentialEnergyMapping {
22 : public:
23 : LennardJonesPotentialEnergyMapping(const simplemd::services::MolecularPropertiesService& molecularPropertiesService);
24 0 : ~LennardJonesPotentialEnergyMapping() {}
25 :
26 : void beginCellIteration();
27 :
28 : void endCellIteration() {}
29 : KOKKOS_FUNCTION void handleCell(LinkedCell& cell) const;
30 : KOKKOS_FUNCTION void handleCellPair(LinkedCell& cell1, LinkedCell& cell2, const unsigned int& cellIndex1, const unsigned int& cellIndex2) const;
31 :
32 : static const bool IsParallel = true;
33 :
34 : private:
35 : /** epsilon */
36 : const double _epsilon;
37 : /** sigma^6 */
38 : const double _sigma6;
39 : /** cutOffRadius*cutOffRadius */
40 : const double _cutOffRadiusSquared;
41 :
42 : /** energy to be subtracted for truncated shifted LJ potentials */
43 : const double _cutOffEnergy;
44 : };
45 :
46 : #endif // _MOLECULARDYNAMICS_CELLMAPPINGS_LENNARDJONESPOTENTIALENERGYMAPPING_H_
|