Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/nodes/angle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ AngleNode::AngleNode(Graph *parentGraph) : Node(parentGraph)
addOption("ExcludeSameSiteAC", "Whether to exclude correlations between A and C sites on the same molecule",
excludeSameSiteAC_);
addOption("Symmetric", "Whether the calculated angle should be mapped to 0 - 90 (i.e. is symmetric about 90)", symmetric_);

// Serialisables
addSerialisable("distanceHistogramAB", distanceHistogramAB_);
addSerialisable("rdfAB", rdfAB_);
addSerialisable("distanceHistogramBC", distanceHistogramBC_);
addSerialisable("rdfBC", rdfBC_);
addSerialisable("angleHistogramABC", angleHistogramABC_);
addSerialisable("angleABC", angleABC_);
addSerialisable("dAngleHistogramAB", dAngleHistogramAB_);
addSerialisable("dAngleAB", dAngleAB_);
addSerialisable("dAngleHistogramBC", dAngleHistogramBC_);
addSerialisable("dAngleBC", dAngleBC_);
addSerialisable("dDAngleHistogramABC", dDAngleHistogramABC_);
addSerialisable("dDAngleABC", dDAngleABC_);
}

/*
Expand Down
6 changes: 6 additions & 0 deletions src/nodes/averageMolecule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ AverageMoleculeNode::AverageMoleculeNode(Graph *parentGraph) : Node(parentGraph)
// Inputs
addInput("Configuration", "Set target configuration for the node", configuration_)->setFlags({ParameterBase::Required});

// Options
addOption("Site", "Target site about which to calculate average molecule geometry", targetSite_)
->setFlags({ParameterBase::Required});

// Serialisables
addSerialisable("sampledX", sampledX_);
addSerialisable("sampledY", sampledY_);
addSerialisable("sampledZ", sampledZ_);
}

/*
Expand Down
8 changes: 8 additions & 0 deletions src/nodes/axisAngle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ AxisAngleNode::AxisAngleNode(Graph *parentGraph) : Node(parentGraph)
addOption("ExcludeSameMolecule", "Whether to exclude correlations between B and C sites on the same molecule",
excludeSameMolecule_);
addOption("Symmetric", "Whether the calculated angle should be mapped to 0 - 90 (i.e. is symmetric about 90)", symmetric_);

// Serialisables
addSerialisable("distanceHistogram", distanceHistogram_);
addSerialisable("rdf", rdf_);
addSerialisable("axisAngleHistogram", axisAngleHistogram_);
addSerialisable("axisAngle", axisAngle_);
addSerialisable("dAxisAngleHistogram", dAxisAngleHistogram_);
addSerialisable("dAxisAngle", dAxisAngle_);
}

/*
Expand Down
4 changes: 3 additions & 1 deletion src/nodes/bragg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ BraggNode::BraggNode(Graph *parentGraph)
addOption("BraggQBroadening", "Broadening function to apply to Bragg reflections when generating S(Q)", braggQBroadening_);

// Serialisables
addSerialisable("weightedGR", braggReflections_);
addSerialisable("braggReflections", braggReflections_);
addSerialisable("braggReflectionHistory", braggReflectionHistory_);
// addSerialisable("braggPartials", braggPartials_);
}

/*
Expand Down
8 changes: 4 additions & 4 deletions src/nodes/bragg.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ class BraggNode : public Node
Number qMax_{1.0};
// Minimum Q value for Bragg calculation
Number qMin_{0.01};
// Unweighted S(Q)
PartialSet *unweightedSQ_{nullptr};
// Broadening function to apply to Bragg S(Q)
Function1DWrapper braggQBroadening_{Functions1D::Form::GaussianC2, {0.0, 0.02}};
// Bragg reflections
std::optional<BraggReflectionVector> braggReflections_;
// Bragg reflections history
History<BraggReflectionVector> braggReflectionHistory_;
// Bragg partials
std::optional<Array2D<Data1D>> braggPartials_;
// Unweighted S(Q)
PartialSet *unweightedSQ_{nullptr};
// Broadening function to apply to Bragg S(Q)
Function1DWrapper braggQBroadening_{Functions1D::Form::GaussianC2, {0.0, 0.02}};

public:
// Get reflections data
Expand Down
8 changes: 8 additions & 0 deletions src/nodes/dAngle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ DAngleNode::DAngleNode(Graph *parentGraph) : Node(parentGraph)
addOption("AngleRange", "Range (min, max, binwidth) of angle binning", angleRange_);
addOption("ExcludeSameMolecule", "Whether to exclude correlations between B and C sites on the same molecule",
excludeSameMolecule_);

// Serialisables
addSerialisable("distanceHistogramBC", distanceHistogramBC_);
addSerialisable("rdfBC", rdfBC_);
addSerialisable("angleHistogram", angleHistogram_);
addSerialisable("angle", angle_);
addSerialisable("distanceAngleMap", distanceAngleMap_);
addSerialisable("dAngle", dAngle_);
}

/*
Expand Down
15 changes: 13 additions & 2 deletions src/nodes/energy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ EnergyNode::EnergyNode(Graph *parentGraph) : Node(parentGraph)
stabilityThreshold_);
addOption("StabilityWindow", "Number of points over which to assess the stability of the energy (per Configuration)",
stabilityWindow_);

// Serialisables
addSerialisable("totalEnergyHistory", totalEnergyHistory_);
addSerialisable("totalPairPotentialHistory", totalPairPotentialHistory_);
addSerialisable("totalMoleculePPHistory", totalMoleculePPHistory_);
addSerialisable("totalGeometryHistory", totalGeometryHistory_);
addSerialisable("totalCohesiveHistory", totalCohesiveHistory_);
addSerialisable("bondHistory", bondHistory_);
addSerialisable("angleHistory", angleHistory_);
addSerialisable("torsionHistory", torsionHistory_);
addSerialisable("improperHistory", improperHistory_);
}

/*
Expand All @@ -44,7 +55,7 @@ void EnergyNode::clearData()
totalPairPotentialHistory_.clear();
totalMoleculePPHistory_.clear();
totalGeometryHistory_.clear();
totalCohesiveHistory.clear();
totalCohesiveHistory_.clear();
bondHistory_.clear();
angleHistory_.clear();
torsionHistory_.clear();
Expand Down Expand Up @@ -79,7 +90,7 @@ NodeConstants::ProcessResult EnergyNode::process()
totalEnergyHistory_.push(energy.pairPotential.total() + energy.geometry.total(), podHistoryLength_);
totalPairPotentialHistory_.push(energy.pairPotential.total(), podHistoryLength_);
totalMoleculePPHistory_.push(energy.pairPotential.intraMolecular, podHistoryLength_);
totalCohesiveHistory.push(energy.pairPotential.interMolecular, podHistoryLength_);
totalCohesiveHistory_.push(energy.pairPotential.interMolecular, podHistoryLength_);
totalGeometryHistory_.push(energy.geometry.total(), podHistoryLength_);
bondHistory_.push(energy.geometry.bondEnergy, podHistoryLength_);
angleHistory_.push(energy.geometry.angleEnergy, podHistoryLength_);
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/energy.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class EnergyNode : public Node
int stabilityWindow_{10};
// Energy histories
PODHistory<double> totalEnergyHistory_;
PODHistory<double> totalPairPotentialHistory_, totalMoleculePPHistory_, totalGeometryHistory_, totalCohesiveHistory;
PODHistory<double> totalPairPotentialHistory_, totalMoleculePPHistory_, totalGeometryHistory_, totalCohesiveHistory_;
PODHistory<double> bondHistory_, angleHistory_, torsionHistory_, improperHistory_;

public:
Expand Down
7 changes: 7 additions & 0 deletions src/nodes/epsr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ EPSRNode::EPSRNode(Graph *parentGraph) : Node(parentGraph)
addOption("Smoothing", "Smoothing to apply to fluctuation coefficients before summation into potential",
fluctuationSmoothing_);
addOption("OverwritePotentials", "Overwrite potentials each time rather than summing them", overwritePotentials_);

// Serialisables
// addSerialisable("potentialCoefficients", potentialCoefficients_);
addSerialisable("estimatedSQ", estimatedSQ_);
addSerialisable("estimatedGR", estimatedGR_);
addSerialisable("additionalPotentials", additionalPotentials_);
addSerialisable("phiArray", phiArray_);
}

// Return type of the node
Expand Down
12 changes: 6 additions & 6 deletions src/nodes/epsr.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ class EPSRNode : public Node
Number pSigma1_{0.01};
// Width for Poisson functions in real space
Number pSigma2_{0.01};
// Radius at which potential truncation goes to zero (-1.0 to use pair potential maximum range)
// Radius at which potential truncation goes to zero (default: use pair potential maximum range)
std::optional<Number> rMaxPT_;
// Radius at which potential truncation begins (-1.0 to set to 2.0 Angstroms under rmaxpt)
// Radius at which potential truncation begins (default: 2.0 Angstroms under rmaxpt)
std::optional<Number> rMinPT_;
// Degree of smoothing to apply to fluctuation coefficients before summation into potential
std::optional<Number> fluctuationSmoothing_;
Expand All @@ -140,6 +140,10 @@ class EPSRNode : public Node
EPSRNamedTargetWeights namedWeights_;
// Total r-factor
std::optional<Data1D> totalRFactor_;
// Ranges to calculate rFactor over
std::vector<Range> ranges_;
// Run count
std::optional<int> runCount_;
// Empirical potential coefficients
std::optional<Array2D<std::vector<double>>> potentialCoefficients_;
// S(Q) from completed scattering matrix
Expand All @@ -152,10 +156,6 @@ class EPSRNode : public Node
std::optional<Data1D> phiArray_;
// Container for process data for individual target nodes
TargetProcessDataMap targetProcessData_;
// Ranges to calculate rFactor over
std::vector<Range> ranges_;
// Run count
std::optional<int> runCount_;

public:
// Return target process data for a given node
Expand Down
8 changes: 4 additions & 4 deletions src/nodes/gr.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ class GRNode : public Node
private:
// Target configurations
Configuration *targetConfiguration_{nullptr};
// Raw simulation g(r)
std::optional<PartialSet> rawGR_;
// Historical raw g(r)
History<PartialSet> rawGRHistory_;
// Unweighted g(r)
std::optional<PartialSet> unweightedGR_;
// Number of historical partial sets to combine into final partials
Expand All @@ -68,6 +64,10 @@ class GRNode : public Node
std::optional<Number> requestedRange_;
// Histograms for RDF calculation
std::optional<HistogramSet> histograms_;
// Raw simulation g(r)
std::optional<PartialSet> rawGR_;
// Historical raw g(r)
History<PartialSet> rawGRHistory_;

public:
// Clear any local data
Expand Down
4 changes: 4 additions & 0 deletions src/nodes/histogramCN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ HistogramCNNode::HistogramCNNode(Graph *parentGraph) : Node(parentGraph)
b_);
addOption("RangeAB", "Distance range (min, max) over which to calculate coordination number from central site",
distanceRange_);

// Serialisables
addSerialisable("histogram", histogram_);
addSerialisable("cn", cn_);
}

/*
Expand Down
8 changes: 6 additions & 2 deletions src/nodes/intraAngle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ IntraAngleNode::IntraAngleNode(Graph *parentGraph) : Node(parentGraph)
// Inputs
addInput("Configuration", "Set target configuration for the node", targetConfiguration_);

// Outputs
addOutput("Configuration", "Output configuration", targetConfiguration_);

// Options
addOption("SiteA", "Specify site(s) which represent 'A' in the interaction A-B-C", a_);
addOption("SiteB", "Specify site(s) which represent 'B' in the interaction A-B-C", b_);
Expand All @@ -21,8 +24,9 @@ IntraAngleNode::IntraAngleNode(Graph *parentGraph) : Node(parentGraph)
addOption("AngleRange", "Range (min, max, binwidth) of angle binning", angleRange_);
addOption("Symmetric", "Whether the calculated angle should be mapped to 0 - 90 (i.e. is symmetric about 90)", symmetric_);

// Outputs
addOutput("Configuration", "Output configuration", targetConfiguration_);
// Serialisables
addSerialisable("intraAngleHist", intraAngleHist_);
addSerialisable("angleABC", angleABC_);
}

/*
Expand Down
4 changes: 2 additions & 2 deletions src/nodes/intraAngle.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ class IntraAngleNode : public Node
Range rangeBC_{0.0, 10.0};
// Range (min, max, binwidth) of angle axis
Vector3 angleRange_{0.0, 180.0, 1.0};
// Whether the angular range should be considered symmetric about 90
bool symmetric_{false};
// Angle(ABC)
std::optional<Histogram1D> intraAngleHist_;
Data1D angleABC_;
// Whether the angular range should be considered symmetric about 90
bool symmetric_{false};

public:
// Clear any local data
Expand Down
8 changes: 6 additions & 2 deletions src/nodes/intraDistance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ IntraDistanceNode::IntraDistanceNode(Graph *parentGraph) : Node(parentGraph)
// Inputs
addInput("Configuration", "Set target configuration for the node", targetConfiguration_);

// Outputs
addOutput("Configuration", "Output configuration", targetConfiguration_);

// Options
addOption("SiteA", "Specify site(s) which represent 'A' in the interaction A-B-C", a_);
addOption("SiteB", "Specify site(s) which represent 'B' in the interaction A-B-C", b_);
addOption("DistanceRange", "Range (min, max, delta) of distance axis", distanceRange_);

// Outputs
addOutput("Configuration", "Output configuration", targetConfiguration_);
// Serialisables
addSerialisable("histAB", histAB_);
addSerialisable("rdfAB", rdfAB_);
}

/*
Expand Down
14 changes: 14 additions & 0 deletions src/nodes/modifierOSites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ ModifierOSitesNode::ModifierOSitesNode(Graph *parentGraph) : Node(parentGraph)
addOption("DistanceRange", "Distance range (min, max) over which to calculate from the central site", distanceRange_);
addOption("ModifierDistanceRange", "Distance range (min, max) over which to calculate from the central site",
modifierDistanceRange_);

// Serialisables
addSerialisable("totalOxygensHistogram", totalOxygensHistogram_);
addSerialisable("totalOxygens", totalOxygens_);
addSerialisable("oxygenSitesHistogram", oxygenSitesHistogram_);
addSerialisable("oxygenSites", oxygenSites_);
addSerialisable("histMFO", histMFO_);
addSerialisable("distanceMFO", distanceMFO_);
addSerialisable("histMNBO", histMNBO_);
addSerialisable("distanceMNBO", distanceMNBO_);
addSerialisable("histMBO", histMBO_);
addSerialisable("distanceMBO", distanceMBO_);
addSerialisable("histMOtherO", histMOtherO_);
addSerialisable("distanceMOtherO", distanceMOtherO_);
}

/*
Expand Down
4 changes: 4 additions & 0 deletions src/nodes/moleculeTorsion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ MoleculeTorsionNode::MoleculeTorsionNode(Graph *parentGraph) : Node(parentGraph)
addOption("J", "Index of atom j in the torsion i-j-k-l", j_);
addOption("K", "Index of atom k in the torsion i-j-k-l", k_);
addOption("L", "Index of atom l in the torsion i-j-k-l", l_);

// Serialisables
addSerialisable("histogram", histogram_);
addSerialisable("frequency", frequency_);
}

/*
Expand Down
12 changes: 6 additions & 6 deletions src/nodes/neutronSQ.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ class NeutronSQNode : public Node
PartialSet *unweightedSQ_{nullptr};
// Unweighted g(r)
PartialSet *unweightedGR_{nullptr};
// Weighted S(Q)
std::optional<PartialSet> weightedSQ_;
// Weighted g(r)
std::optional<PartialSet> weightedGR_;
// Representative g(r) calculated from FT of total weighted F(Q)
Data1D representativeGR_;
// Isotopologues to use for constructing weights matrix
IsotopologueSet isotopologues_;
// Normalisation to apply to calculated total F(Q)
Expand All @@ -57,6 +51,12 @@ class NeutronSQNode : public Node
StructureFactors::NormalisationType referenceNormalisedTo_{StructureFactors::NoNormalisation};
// Window function to use when Fourier transforming reference total F(Q) into g(r)
WindowFunction::Form referenceWindowFunction_{WindowFunction::Form::Lorch0};
// Weighted S(Q)
std::optional<PartialSet> weightedSQ_;
// Weighted g(r)
std::optional<PartialSet> weightedGR_;
// Representative g(r) calculated from FT of total weighted F(Q)
Data1D representativeGR_;

public:
// Clear any local data
Expand Down
4 changes: 4 additions & 0 deletions src/nodes/orientedSDF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ OrientedSDFNode::OrientedSDFNode(Graph *parentGraph) : Node(parentGraph)
addOption("ExcludeSameMolecule", "Whether to exclude correlations between sites on the same molecule",
excludeSameMolecule_);
addOption("Symmetric", "Whether the calculated angle should be mapped to 0 - 90 (i.e. is symmetric about 90)", symmetric_);

// Serialisables
addSerialisable("histogram", histogram_);
addSerialisable("sdf", sdf_);
}

// Return type of the node
Expand Down
6 changes: 6 additions & 0 deletions src/nodes/qSpecies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ QSpeciesNode::QSpeciesNode(Graph *parentGraph) : Node(parentGraph)
"Set the site(s) 'NF' for which the distribution around the bonding oxygen sites should be calculated",
networkFormerSpeciesSites_);
addOption("DistanceRange", "Distance range (min, max) over which to calculate Q-Species from central site", distanceRange_);

// Serialisables
addSerialisable("qSpeciesHistogram", qSpeciesHistogram_);
addSerialisable("qSpecies", qSpecies_);
addSerialisable("oxygenSitesHistogram", oxygenSitesHistogram_);
addSerialisable("oxygenSites", oxygenSites_);
}

/*
Expand Down
4 changes: 4 additions & 0 deletions src/nodes/sdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ SDFNode::SDFNode(Graph *parentGraph) : Node(parentGraph)
addOption("RangeZ", "Range along Z axis", rangeZ_);
addOption("ExcludeSameMolecule", "Whether to exclude correlations between sites on the same molecule",
excludeSameMolecule_);

// Serialisables
addSerialisable("histogram", histogram_);
addSerialisable("sdf", sdf_);
}

/*
Expand Down
5 changes: 5 additions & 0 deletions src/nodes/siteRDF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ SiteRDFNode::SiteRDFNode(Graph *parentGraph) : Node(parentGraph)
addOption("RangeC", "Distance range for third coordination number", rangeC_);
addOption("Instantaneous", "Whether to calculate instantaneous coordination numbers rather than forming an average",
instantaneous_);

// Serialisables
// addSerialisable("sums", sums_);
addSerialisable("dataRDF", dataRDF_);
addSerialisable("histAB", histAB_);
}

/*
Expand Down
Loading