Speed and functionality improvements for 'hbond' command #485
Merged
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
dea5d06
DRR - Cpptraj: Add hbond timing info
drroe 4d65a83
DRR - Cpptraj: Test new hydrogen bond action that arranges things by …
drroe df323da
DRR - Cpptraj: Add test hbond2 action
drroe 35705f9
DRR - Cpptraj: Finish initial solute-solute hbond calculation. Seems …
drroe 4526299
DRR - Cpptraj: Ensure donor-only sites will be calculated.
drroe 78f12eb
DRR - Cpptraj: Add print code. MPI code added too but not yet working.
drroe 023e553
DRR - Cpptraj: Ensure UU hydrogen bonds in map are truely unique by u…
drroe 3005b65
DRR - Cpptraj: Try to improve insertion speed into hbond map
drroe 2a613e9
DRR - Cpptraj: Add solvent Hbond calc. Speedup in initial testing is …
drroe f91a993
DRR - Cpptraj: HBmapType to UUmapType
drroe f12ebf2
DRR - Cpptraj: Ensure solvent is ignored when solute donor or accepto…
drroe 902943e
DRR - Cpptraj: Recognize ions
drroe 2248a30
DRR - Cpptraj: Add solute/solvent hydrogen and ion count
drroe 86e1b0f
DRR - Cpptraj: Add bridging calc
drroe 3932a7a
DRR - Cpptraj: Properly init some variables. Fix spacing.
drroe cde9c40
DRR - Cpptraj: Remove unused class variable.
drroe 34c36b2
DRR - Cpptraj: Add nointramol functionality. Slows down the code a li…
drroe 256bb2f
DRR - Cpptraj: Start fixing the MPI consolidation
drroe 75cf546
DRR - Cpptraj: Add sort option for data file write. This allows compa…
drroe b5250ce
DRR - Cpptraj: Hide some debug info
drroe 88d886c
DRR - Cpptraj: Send solvent hbond data with solute hbonds. Properly f…
drroe 3028de8
DRR - Cpptraj: Remove obsolete code. Ensure UU/UV time series data pr…
drroe 34bbe56
DRR - Cpptraj: OpenMP-parallelize solute hbonds. OK speedup for now (…
drroe 9e90a6f
DRR - Cpptraj: Properly handle nointramol variable in openmp
drroe a59ea34
DRR - Cpptraj: Create AddUV function
drroe 484dae0
DRR - Cpptraj: Openmp parallelize the UV calc
drroe 0dd6010
DRR - Cpptraj: Simplify code a bit by using the numHB variable as myt…
drroe 96b7fb8
DRR - Cpptraj: Remove old code
drroe 83ef1cb
DRR - Cpptraj: Add specified solute mask tests.
drroe 645cc24
DRR - Cpptraj: Add no angle cut test
drroe f31b325
DRR - Cpptraj: Still calc angle even when cutoff is -1 so the average…
drroe 32a345c
DRR - Cpptraj: Add bridge class - not yet used. Will eventually be ne…
drroe 6763a66
DRR - Cpptraj: When 'nointramol', ignore solvent-solute bridges that …
drroe 0e017fd
DRR - Cpptraj: Add missing test file.
drroe 45afa0b
DRR - Cpptraj: Make use of new bridge class
drroe ffa6609
DRR - Cpptraj: Fix MPI compilation
drroe 271d5c8
DRR - Cpptraj: For backwards compatibility store solute donor H/accep…
drroe 094c2e2
DRR - Cpptraj: MPI data set creation use UU_Set_Idx
drroe ce65438
DRR - Cpptraj: Data set ordering for hbond UU series data can now be …
drroe 678906c
DRR - Cpptraj: Add save files for new test
drroe d4def22
DRR - Cpptraj: Use typedef
drroe f937d64
DRR - Cpptraj: Consolidate UU series set creation.
drroe 7861999
DRR - Cpptraj: Fix variable naming to better reflect what is actually…
drroe 968c1ff
DRR - Cpptraj: Start adding bridgebyatom option
drroe 10c440a
DRR - Cpptraj: Fix up output formatting.
drroe 5ed6b99
DRR - Cpptraj: Finish bridgebyatom option.
drroe 401baaf
DRR - Cpptraj: Add but do not yet enable the bridge nointramol test
drroe 765761f
DRR - Cpptraj: Version bump. New hbond functionality is different fro…
drroe 3d8b2f6
DRR - Cpptraj: Remove old hbond code.
drroe 901bb1d
DRR - Cpptraj: Enable tests for new hbond code.
drroe 49ac0a0
DRR - Cpptraj: Fix memory estimation.
drroe e65e8ae
DRR - Cpptraj: Fix up code docs.
drroe ac011ed
DRR - Cpptraj: Split nointramol functionality into two loops again; r…
drroe 98f5100
DRR - Cpptraj: Hide timing info behind ifdef
drroe dc211af
DRR - Cpptraj: Improve stability of bridge sort by comparing residues…
drroe 9f3758d
Merge branch 'master' into hbond_improve_speed
drroe 81236bd
DRR - Cpptraj: Properly initialize class variable in constructors.
drroe
Jump to file
No files found.
+0
−1,112
Action_Hbond.cpp
src/Action_Hbond.cpp
+0
−121
Action_Hbond.h
src/Action_Hbond.h
+1,386
−0
Action_HydrogenBond.cpp
src/Action_HydrogenBond.cpp
+242
−0
Action_HydrogenBond.h
src/Action_HydrogenBond.h
+2
−0
AtomMask.h
src/AtomMask.h
+2
−2
Command.cpp
src/Command.cpp
+4
−1
DataFile.cpp
src/DataFile.cpp
+1
−0
DataFile.h
src/DataFile.h
+4
−0
DataSetList.cpp
src/DataSetList.cpp
+2
−0
DataSetList.h
src/DataSetList.h
+2
−2
Version.h
src/Version.h
+2
−2
cpptrajdepend
src/cpptrajdepend
+1
−1
cpptrajfiles
src/cpptrajfiles
+48
−10
RunTest.sh
test/Test_Hbond/RunTest.sh
+414
−0
avgbridgeintermol.dat.save
test/Test_Hbond/avgbridgeintermol.dat.save
+3
−0
bridgeintermol.dat.save
test/Test_Hbond/bridgeintermol.dat.save
+6
−0
noacut.dat
test/Test_Hbond/noacut.dat
+6
−0
noacut.dat.save
test/Test_Hbond/noacut.dat.save
+781
−781
solutehb.agr.save
test/Test_Hbond/solutehb.agr.save
+32
−0
ua.dat.save
test/Test_Hbond/ua.dat.save
+45
−0
ud.dat.save
test/Test_Hbond/ud.dat.save
+21
−0
uh.dat.save
test/Test_Hbond/uh.dat.save
1,112
src/Action_Hbond.cpp
Large diffs are not rendered by default.
Oops, something went wrong.
| @@ -1,121 +0,0 @@ | ||
| -#ifndef INC_ACTION_HBOND_H | ||
| -#define INC_ACTION_HBOND_H | ||
| -#include <vector> | ||
| -#include <map> | ||
| -#include <set> | ||
| -#include "Action.h" | ||
| -#include "ImagedAction.h" | ||
| -#include "DataSet_integer.h" | ||
| -/// Action to calculate the Hbonds present in each frame. | ||
| -class Action_Hbond : public Action { | ||
| - public: | ||
| - Action_Hbond(); | ||
| - DispatchObject* Alloc() const { return (DispatchObject*)new Action_Hbond(); } | ||
| - void Help() const; | ||
| - private: | ||
| - Action::RetType Init(ArgList&, ActionInit&, int); | ||
| - Action::RetType Setup(ActionSetup&); | ||
| - Action::RetType DoAction(int, ActionFrame&); | ||
| -# ifdef MPI | ||
| - int SyncAction(); | ||
| - Parallel::Comm trajComm_; | ||
| -# endif | ||
| - void Print(); | ||
| - | ||
| - struct HbondType { | ||
| - double dist; ///< Used to calc avg distance of this hbond | ||
| - double angle; ///< Used to calc avg angle of this hbond | ||
| - DataSet_integer* data_; ///< If series, keep track of frames hbond is present. | ||
| - int A; ///< Acceptor atom# | ||
| - int H; ///< Hydrogen atom# | ||
| - int D; ///< Donor atom# | ||
| - int Frames; ///< # frames this hbond has been present | ||
| - }; | ||
| - | ||
| - ImagedAction Image_; | ||
| - Matrix_3x3 ucell_, recip_; | ||
| - int debug_; | ||
| - int Nframes_; | ||
| - CpptrajFile* avgout_; | ||
| - CpptrajFile* solvout_; | ||
| - CpptrajFile* bridgeout_; | ||
| - DataFile* UUseriesout_; | ||
| - DataFile* UVseriesout_; | ||
| - bool useAtomNum_; | ||
| - typedef std::map<int,HbondType> HBmapType; | ||
| - HBmapType HbondMap_; ///< Track all solute-solute hbonds found | ||
| - HBmapType SolventMap_; ///< Track all solute-solvent hbonds found | ||
| - typedef std::map< std::set<int>, int > BridgeType; | ||
| - BridgeType BridgeMap_; ///< Track all combos of residues bridged by solvent. | ||
| - typedef std::vector<int> HBlistType; | ||
| - HBlistType Donor_; ///< Array of hbond donor atoms (D0, H0, D1, H1, ...) | ||
| - HBlistType Acceptor_; ///< Array of hbond acceptor atoms (A0, A1, ...) | ||
| - HBlistType SolventDonor_; | ||
| - HBlistType SolventAcceptor_; | ||
| - AtomMask Mask_; | ||
| - AtomMask DonorMask_; | ||
| - AtomMask DonorHmask_; | ||
| - AtomMask AcceptorMask_; | ||
| - AtomMask SolventDonorMask_; | ||
| - AtomMask SolventAcceptorMask_; | ||
| - bool hasDonorMask_; | ||
| - bool hasDonorHmask_; | ||
| - bool hasAcceptorMask_; | ||
| - bool hasSolventDonor_; | ||
| - bool hasSolventAcceptor_; | ||
| - bool calcSolvent_; | ||
| - bool noIntramol_; | ||
| - double acut_; | ||
| - double dcut2_; | ||
| - Topology* CurrentParm_; | ||
| - | ||
| - bool series_; | ||
| - bool seriesUpdated_; | ||
| - std::string hbsetname_; | ||
| - DataSet* NumHbonds_; | ||
| - DataSet* NumSolvent_; | ||
| - DataSet* NumBridge_; | ||
| - DataSet* BridgeID_; | ||
| - // TODO: Replace these with new DataSet type | ||
| - DataSetList* masterDSL_; | ||
| - /// Return true if the first hbond has more frames than the second. | ||
| - /** If both have the same # of frames, pick something arbitrary just to | ||
| - * be sure that we have a well-defined ordering (otherwise we could get | ||
| - * spurious test failures) -- Order equivalent frames based on atom number | ||
| - * of Acceptor. | ||
| - */ | ||
| - struct hbond_cmp { | ||
| - inline bool operator()(HbondType const& first, HbondType const& second) const { | ||
| - if (first.Frames == second.Frames) | ||
| - return (first.dist < second.dist); | ||
| - else | ||
| - return (first.Frames > second.Frames); | ||
| - } | ||
| - }; | ||
| - /// Return true if first bridge has more frames than second. | ||
| - struct bridge_cmp { | ||
| - inline bool operator()(std::pair< std::set<int>, int> const& first, | ||
| - std::pair< std::set<int>, int> const& second) const | ||
| - { | ||
| - if (first.second > second.second) | ||
| - return true; | ||
| - else if (first.second < second.second) | ||
| - return false; | ||
| - else | ||
| - return (first.second < second.second); | ||
| - } | ||
| - }; | ||
| - | ||
| - void SearchAcceptor(HBlistType&,AtomMask&,bool); | ||
| - void SearchDonor(HBlistType&,AtomMask&,bool,bool); | ||
| - std::string MemoryUsage(size_t, size_t) const; | ||
| - void UpdateSeries(); | ||
| - inline int AtomsAreHbonded(Frame const&, int, int, int, int, int,bool); | ||
| - inline void HbondTypeCalcAvg(HbondType&); | ||
| - inline double ImagedAngle(const double*, const double*, const double*) const; | ||
| -# ifdef MPI | ||
| - void SyncMap(HBmapType&, std::vector<int> const&, std::vector<int> const&, | ||
| - const char*, Parallel::Comm const&) const; | ||
| -# endif | ||
| -}; | ||
| -#endif |
Oops, something went wrong.