Skip to content

Commit d6ead21

Browse files
trisyoungsTristan Youngs
andauthored
refactor: Sweep through underlying AtomType-using classes (#2209)
Co-authored-by: Tristan Youngs <trisyoungs@googlemail.com>
1 parent 6d66788 commit d6ead21

122 files changed

Lines changed: 90951 additions & 49795 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

benchmark/modules/angle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ template <SpeciesType speciesType, SpeciesPopulation population> static void BM_
2626
module.keywords().set("ExcludeSameSiteAC", false);
2727
for (auto _ : state)
2828
{
29-
problemDef.configuration()->incrementContentsVersion();
29+
problemDef.configuration()->notifyAtomicPositionsChanged();
3030
module.executeProcessing(problemDef.dissolve());
3131
}
3232
}

benchmark/modules/siteRDF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ template <SpeciesType speciesType, SpeciesPopulation population> static void BM_
1818
module.keywords().set("SiteB", sites);
1919
for (auto _ : state)
2020
{
21-
problemDef.configuration()->incrementContentsVersion();
21+
problemDef.configuration()->notifyAtomicPositionsChanged();
2222
module.executeProcessing(problemDef.dissolve());
2323
}
2424
}

benchmark/modules/voxelDensity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static void BM_Module_VoxelDensity(benchmark::State &state)
1818
module.keywords().setEnumeration("TargetProperty", property);
1919
for (auto _ : state)
2020
{
21-
problemDef.configuration()->incrementContentsVersion();
21+
problemDef.configuration()->notifyAtomicPositionsChanged();
2222
module.executeProcessing(problemDef.dissolve());
2323
}
2424
}

src/classes/CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ add_library(
44
array3DIterator.cpp
55
atom.cpp
66
atomType.cpp
7-
atomTypeData.cpp
8-
atomTypeMix.cpp
97
bondFunctions.cpp
108
box.cpp
119
boxCubic.cpp
@@ -34,11 +32,10 @@ add_library(
3432
empiricalFormula.cpp
3533
fullPairIterator.cpp
3634
histogramSet.cpp
37-
isotopeData.cpp
35+
isotopeMix.cpp
3836
isotopologue.cpp
3937
isotopologues.cpp
4038
isotopologueSet.cpp
41-
isotopologueWeight.cpp
4239
kVector.cpp
4340
localMolecule.cpp
4441
molecule.cpp
@@ -81,9 +78,7 @@ add_library(
8178
angleFunctions.h
8279
array3DIterator.h
8380
atom.h
84-
atomTypeData.h
8581
atomType.h
86-
atomTypeMix.h
8782
bondFunctions.h
8883
box.h
8984
braggReflection.h
@@ -99,11 +94,10 @@ add_library(
9994
empiricalFormula.h
10095
histogramSet.h
10196
interactionPotential.h
102-
isotopeData.h
97+
isotopeMix.h
10398
isotopologue.h
10499
isotopologues.h
105100
isotopologueSet.h
106-
isotopologueWeight.h
107101
kVector.h
108102
localMolecule.h
109103
molecule.h

src/classes/atom.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ double Atom::y() const { return r_.y; }
2525
// Return z-coordinate
2626
double Atom::z() const { return r_.z; }
2727

28-
// Set local AtomType index
29-
void Atom::setLocalTypeIndex(int id) { localTypeIndex_ = id; }
28+
// Set AtomType index in parent Configuration
29+
void Atom::setConfigurationTypeIndex(int id) { configurationTypeIndex_ = id; }
3030

31-
// Return local AtomType index
32-
int Atom::localTypeIndex() const { return localTypeIndex_; }
31+
// Return AtomType index in parent Configuration
32+
int Atom::configurationTypeIndex() const { return configurationTypeIndex_; }
3333

3434
// Set master AtomType index
3535
void Atom::setMasterTypeIndex(int id) { masterTypeIndex_ = id; }

src/classes/atom.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Atom
2323
// Coordinates
2424
Vector3 r_;
2525
// Assigned AtomType index, local to Configuration (for partial indexing etc.)
26-
int localTypeIndex_{-1};
26+
int configurationTypeIndex_{-1};
2727
// Assigned master AtomType index (for pair potential indexing)
2828
int masterTypeIndex_{-1};
2929

@@ -40,10 +40,10 @@ class Atom
4040
double y() const;
4141
// Return z-coordinate
4242
double z() const;
43-
// Set local AtomType index
44-
void setLocalTypeIndex(int id);
45-
// Return local AtomType index
46-
int localTypeIndex() const;
43+
// Set AtomType index in parent Configuration
44+
void setConfigurationTypeIndex(int id);
45+
// Return AtomType index in parent Configuration
46+
int configurationTypeIndex() const;
4747
// Set master AtomType index
4848
void setMasterTypeIndex(int id);
4949
// Return master AtomType index

src/classes/atomTypeData.cpp

Lines changed: 0 additions & 130 deletions
This file was deleted.

src/classes/atomTypeData.h

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)