-
Notifications
You must be signed in to change notification settings - Fork 0
/
CBMC.cpp
43 lines (38 loc) · 1.25 KB
/
CBMC.cpp
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
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 2.31
Copyright (C) 2018 GOMC Group
A copy of the GNU General Public License can be found in the COPYRIGHT.txt
along with this program, also can be found at <http://www.gnu.org/licenses/>.
********************************************************************************/
#include "CBMC.h"
#include "MoleculeKind.h"
#include "MolSetup.h"
#include "DCLinear.h"
#include "DCGraph.h"
#include <vector>
namespace cbmc
{
CBMC* MakeCBMC(System& sys, const Forcefield& ff,
const MoleculeKind& kind, const Setup& set)
{
/*
std::vector<uint> bondCount(kind.NumAtoms(), 0);
for (uint i = 0; i < kind.bondList.count; ++i) {
bondCount[kind.bondList.part1[i]]++;
bondCount[kind.bondList.part2[i]]++;
}
bool branched = false;
for (uint i = 0; i < kind.NumAtoms(); ++i) {
if (bondCount[i] > 2)
branched = true;
}
bool cyclic = (kind.NumBonds() > kind.NumAtoms() - 1) ? true : false;
*/
//Any molecule woth 3 atoms and more will be built in DCGraph
if (kind.NumAtoms() > 2) {
return new DCGraph(sys, ff, kind, set);
} else {
return new DCLinear(sys, ff, kind, set);
}
}
}