File: molecularInteractions.h

package info (click to toggle)
ball 1.5.0%2Bgit20180813.37fc53c-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 239,888 kB
  • sloc: cpp: 326,149; ansic: 4,208; python: 2,303; yacc: 1,778; lex: 1,099; xml: 958; sh: 322; makefile: 95
file content (60 lines) | stat: -rw-r--r-- 1,637 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef BALL_KERNEL_MOLECULARINTERACTIONS_H
#define BALL_KERNEL_MOLECULARINTERACTIONS_H

#include <BALL/KERNEL/atom.h>
#include <BALL/DATATYPE/string.h>
#include <map>


namespace BALL
{
	class BALL_EXPORT MolecularInteractions
	{
		public:

			static bool SAVE_ONLY_SUMS;

			MolecularInteractions();

			void clear();

			void setThreshold(double threshold);

			void addInteraction(const Atom* atom, String interaction_type, double energy);

			void addInteraction(String interaction_type, double energy);

			bool hasInteraction(const Atom* atom, String interaction_type) const;

			double getInteractionEnergy(const Atom* atom, String interaction_type) const;

			double getInteractionEnergy(const Atom* atom, const list<String>& interaction_types) const;

			const std::map<const Atom*,double>* getInteractions(String interaction_type) const;

			void getInteractions(const std::list<String>& interaction_types, std::map<const Atom*,double>& interactions) const;

			double getInteractionEnergy(String interaction_type) const;

			double getInteractionEnergy(const std::list<String>& interaction_types) const;

			double getInteractionEnergy() const;


		private:

			double threshold_;

			/** Contains one map for each type of interaction (vdW,electrostatic, etc.) */
			std::map<String, std::map<const Atom*,double> > interactions_map_;

			/** Contains the total energy for each type of interaction */
			std::map<String,double> interaction_energies_;

			/** The total interaction energy, i.e. sum over all components (vdW,electrostatic, etc.) */
			double total_energy_;

	};
}

#endif // BALL_KERNEL_MOLECULARINTERACTIONS_H