Skip to content
Merged
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
4 changes: 3 additions & 1 deletion src/AnalysisList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ int AnalysisList::DoAnalyses() {
ret = ana->ptr_->Analyze();
} else {
mprintf("Warning: Analysis '%s' does not currently use multiple MPI processes.\n", ana->args_.Command());
if (Parallel::World().Master())
if (Parallel::TrajComm().Master())
ret = ana->ptr_->Analyze();
else
ret = Analysis::OK;
Parallel::World().MasterBcast( &ret, 1, MPI_INT );
}
int err;
Expand Down
5 changes: 2 additions & 3 deletions src/Exec_RunAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ int Exec_RunAnalysis::DoRunAnalysis(CpptrajState& State, ArgList& argIn) const {

bool run_analysis = true;
# ifdef MPI
Parallel::Comm const& analyzeComm = Parallel::World();
AnalysisSetup setup(State.DSL(), State.DFL(), analyzeComm);
AnalysisSetup setup(State.DSL(), State.DFL(), Parallel::World());
if (!ana->IsParallel()) {
mprintf("Warning: Analysis '%s' does not currently use multiple MPI processes.\n", analyzeargs.Command());
run_analysis = analyzeComm.Master();
run_analysis = Parallel::TrajComm().Master();
}
# else /* MPI */
AnalysisSetup setup(State.DSL(), State.DFL());
Expand Down
7 changes: 4 additions & 3 deletions src/MetaData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ bool MetaData::Match_Exact(MetaData const& In) const {
/** This version allows wildcards and ranges. */
bool MetaData::Match_WildCard(SearchString const& search) const
{
//mprintf("DEBUG: Input: %s[%s]:%s This Set: %s[%s]:%i\n",
// dsname.c_str(), aspect.c_str(), idxRange.RangeArg(),
// name_.c_str(), aspect_.c_str(), idx_);
//mprintf("DEBUG: Input: %s[%s]:%s%%%s This Set: %s[%s]:%i%%%i\n",
// search.NameArg().c_str(), search.AspectArg().c_str(),
// search.IdxRange().RangeArg(), search.MemberRange().RangeArg(),
// name_.c_str(), aspect_.c_str(), idx_, ensembleNum_);
// Match type if specified
if (fileName_.empty()) {
// No filename. Match name if specified.
Expand Down
2 changes: 1 addition & 1 deletion src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Whenever a number that precedes <revision> is incremented, all subsequent
* numbers should be reset to 0.
*/
#define CPPTRAJ_INTERNAL_VERSION "V6.19.4"
#define CPPTRAJ_INTERNAL_VERSION "V6.19.5"
/// PYTRAJ relies on this
#define CPPTRAJ_VERSION_STRING CPPTRAJ_INTERNAL_VERSION
#endif
6 changes: 5 additions & 1 deletion test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,9 @@ test.avgbox:
test.tordiff:
@-cd Test_TorDiff && ./RunTest.sh $(OPT)

test.calcdiffusion:
@-cd Test_CalcDiffusion && ./RunTest.sh $(OPT)

# Every test target should go here.
COMPLETETESTS=test.general \
test.strip \
Expand Down Expand Up @@ -681,7 +684,8 @@ COMPLETETESTS=test.general \
test.netcdfdata \
test.compareenergy \
test.avgbox \
test.tordiff
test.tordiff \
test.calcdiffusion

test.all:
$(MAKE) test.complete summary
Expand Down
30 changes: 29 additions & 1 deletion test/Test_Ensemble_HREMD/RunTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

. ../MasterTest.sh

CleanFiles cpptraj.in sorted.remlog.crd.? sorted.crdidx.crd.?
CleanFiles cpptraj.in sorted.remlog.crd.? sorted.crdidx.crd.? \
distances.dat.? avg.distances.dat.? \
distances.dat avg.distances.dat

TESTNAME='H-REMD sorting tests'
Requires netcdf nthreads 4
Expand Down Expand Up @@ -35,4 +37,30 @@ DoTest sorted.remlog.crd.1.save sorted.crdidx.crd.1
DoTest sorted.remlog.crd.2.save sorted.crdidx.crd.2
DoTest sorted.remlog.crd.3.save sorted.crdidx.crd.3

# FIXME distance currently only sets up first ensemble member initially.
# Should do all members.
UNITNAME='Ensemble analysis test'
cat > cpptraj.in <<EOF
parm ../tz2.nhe.parm7
ensemblesize 4
ensemble rem.crd.001 nosort
distance EndToEnd :1 :12 out distances.dat
run
runanalysis avg EndToEnd out avg.distances.dat name AvgE2E
EOF
RunCpptraj "$UNITNAME"
if [ -z "$DO_PARALLEL" ] ; then
DoTest distances.dat.save distances.dat
DoTest avg.distances.dat.save avg.distances.dat
else
DoTest distances.dat.0.save distances.dat.0
DoTest distances.dat.1.save distances.dat.1
DoTest distances.dat.2.save distances.dat.2
DoTest distances.dat.3.save distances.dat.3
DoTest avg.distances.dat.0.save avg.distances.dat.0
DoTest avg.distances.dat.1.save avg.distances.dat.1
DoTest avg.distances.dat.2.save avg.distances.dat.2
DoTest avg.distances.dat.3.save avg.distances.dat.3
fi

EndTest
2 changes: 2 additions & 0 deletions test/Test_Ensemble_HREMD/avg.distances.dat.0.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Set AvgE2E[avg]%0 AvgE2E[sd]%0 AvgE2E[ymin]%0 AvgE2E[ymax]%0 AvgE2E[yminidx]%0 AvgE2E[ymaxidx]%0 AvgE2E[names]%0
1 6.71 1.719 4.412 12.42 46 83 "EndToEnd%0"
2 changes: 2 additions & 0 deletions test/Test_Ensemble_HREMD/avg.distances.dat.1.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Set AvgE2E[avg]%1 AvgE2E[sd]%1 AvgE2E[ymin]%1 AvgE2E[ymax]%1 AvgE2E[yminidx]%1 AvgE2E[ymaxidx]%1 AvgE2E[names]%1
1 7.124 1.837 4.798 12.24 45 78 "EndToEnd%1"
2 changes: 2 additions & 0 deletions test/Test_Ensemble_HREMD/avg.distances.dat.2.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Set AvgE2E[avg]%2 AvgE2E[sd]%2 AvgE2E[ymin]%2 AvgE2E[ymax]%2 AvgE2E[yminidx]%2 AvgE2E[ymaxidx]%2 AvgE2E[names]%2
1 6.907 1.741 5.132 12.59 1 80 "EndToEnd%2"
2 changes: 2 additions & 0 deletions test/Test_Ensemble_HREMD/avg.distances.dat.3.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Set AvgE2E[avg]%3 AvgE2E[sd]%3 AvgE2E[ymin]%3 AvgE2E[ymax]%3 AvgE2E[yminidx]%3 AvgE2E[ymaxidx]%3 AvgE2E[names]%3
1 7.513 2.06 5.376 12.43 17 91 "EndToEnd%3"
5 changes: 5 additions & 0 deletions test/Test_Ensemble_HREMD/avg.distances.dat.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Set AvgE2E[avg] AvgE2E[sd] AvgE2E[ymin] AvgE2E[ymax] AvgE2E[yminidx] AvgE2E[ymaxidx] AvgE2E[names]
1 6.71 1.719 4.412 12.42 46 83 "EndToEnd%0"
2 7.124 1.837 4.798 12.24 45 78 "EndToEnd%1"
3 6.907 1.741 5.132 12.59 1 80 "EndToEnd%2"
4 7.513 2.06 5.376 12.43 17 91 "EndToEnd%3"
101 changes: 101 additions & 0 deletions test/Test_Ensemble_HREMD/distances.dat.0.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#Frame EndToEnd%0
1 5.7966
2 6.3690
3 6.4435
4 6.8597
5 6.2975
6 5.8735
7 6.2164
8 5.4665
9 5.7745
10 6.0198
11 6.0943
12 5.4964
13 5.4277
14 5.8535
15 6.5289
16 6.8410
17 7.5255
18 6.2720
19 6.0148
20 5.6015
21 8.3131
22 6.3038
23 5.9186
24 6.4592
25 6.4882
26 6.6760
27 6.6344
28 7.5033
29 6.0204
30 5.3737
31 5.4412
32 6.4022
33 5.8933
34 5.6469
35 5.1053
36 5.3809
37 6.2719
38 6.0925
39 5.8848
40 6.6080
41 5.4696
42 5.5522
43 6.5894
44 6.3383
45 6.5715
46 4.4125
47 4.8316
48 4.6848
49 5.7554
50 5.8461
51 5.4692
52 11.5370
53 11.2788
54 5.3608
55 4.6625
56 4.9654
57 5.4871
58 11.6066
59 10.8426
60 6.0373
61 4.9337
62 9.9072
63 10.3979
64 6.3897
65 5.8394
66 6.4132
67 5.9989
68 6.2911
69 6.9535
70 6.3674
71 6.3010
72 6.8054
73 5.9426
74 6.0317
75 6.8218
76 6.7436
77 6.2110
78 6.0378
79 5.9598
80 6.2930
81 6.0693
82 11.2132
83 12.4179
84 11.1789
85 8.0563
86 5.8116
87 6.3529
88 6.3890
89 6.8462
90 7.3625
91 8.5951
92 7.0932
93 6.2723
94 6.3681
95 6.2911
96 6.0728
97 6.0302
98 10.5609
99 11.6649
100 7.1869
101 changes: 101 additions & 0 deletions test/Test_Ensemble_HREMD/distances.dat.1.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#Frame EndToEnd%1
1 6.2953
2 6.1952
3 6.2957
4 6.2628
5 5.8787
6 6.3852
7 5.2022
8 5.6919
9 5.6048
10 6.0009
11 6.0649
12 6.0326
13 6.0202
14 6.1690
15 6.3950
16 6.4675
17 6.1156
18 7.0010
19 6.7385
20 5.4498
21 5.8310
22 7.6105
23 6.3672
24 6.4300
25 6.8236
26 6.7658
27 6.9062
28 6.1116
29 6.5832
30 6.9597
31 6.6915
32 6.6893
33 7.1049
34 6.5055
35 5.4674
36 6.1866
37 6.5454
38 6.4916
39 6.5837
40 6.4729
41 9.0678
42 10.4322
43 6.6472
44 5.2421
45 4.7981
46 6.2904
47 6.6765
48 7.1953
49 11.8229
50 11.2992
51 9.9475
52 6.5107
53 5.6637
54 10.7444
55 10.8806
56 10.0777
57 11.0364
58 5.5964
59 6.2756
60 9.8078
61 9.6760
62 5.5565
63 5.8586
64 10.6153
65 6.1607
66 6.2467
67 6.0958
68 6.3594
69 6.2425
70 6.0768
71 6.2614
72 5.7156
73 6.0689
74 6.7129
75 7.7202
76 7.5814
77 11.1600
78 12.2436
79 6.0579
80 6.3674
81 11.7142
82 6.1549
83 6.6561
84 6.6840
85 6.1323
86 6.0060
87 6.5423
88 6.3679
89 5.5995
90 5.5058
91 5.9339
92 5.9112
93 6.4874
94 6.9430
95 11.3869
96 10.1788
97 10.6672
98 6.3360
99 6.0896
100 10.9361
Loading