1 | ### calculate molar mass
|
---|
2 |
|
---|
3 | AT_SETUP([Analysis - Calculate molar mass])
|
---|
4 | AT_KEYWORDS([analysis reaction calculate-molar-mass])
|
---|
5 |
|
---|
6 | # empty domain
|
---|
7 | AT_CHECK([../../molecuilder --calculate-molar-mass], 0, [stdout], [stderr])
|
---|
8 | AT_CHECK([egrep "RESULT" stdout], 0, [ignore], [ignore])
|
---|
9 | AT_CHECK([egrep "mass.* is 0 " stdout], 0, [ignore], [ignore])
|
---|
10 |
|
---|
11 | # nothing selection
|
---|
12 | AT_CHECK([../../molecuilder -l ${abs_top_srcdir}/tests/regression/Analysis/CalculateMolarMass/pre/argon.xyz --calculate-molar-mass], 0, [stdout], [stderr])
|
---|
13 | AT_CHECK([egrep "RESULT" stdout], 0, [ignore], [ignore])
|
---|
14 | AT_CHECK([egrep "mass.*is 0 " stdout], 0, [ignore], [ignore])
|
---|
15 |
|
---|
16 | # all selected
|
---|
17 | AT_CHECK([../../molecuilder -l ${abs_top_srcdir}/tests/regression/Analysis/CalculateMolarMass/pre/argon.xyz --select-all-atoms --calculate-molar-mass], 0, [stdout], [stderr])
|
---|
18 | AT_CHECK([egrep "RESULT" stdout], 0, [ignore], [ignore])
|
---|
19 | AT_CHECK([egrep "mass.*is 39.94" stdout], 0, [ignore], [ignore])
|
---|
20 |
|
---|
21 | # only hydrogen selected
|
---|
22 | AT_CHECK([../../molecuilder -l ${abs_top_srcdir}/tests/regression/Analysis/CalculateMolarMass/pre/water.xyz --select-atom-by-element 1 --calculate-molar-mass], 0, [stdout], [stderr])
|
---|
23 | AT_CHECK([egrep "RESULT" stdout], 0, [ignore], [ignore])
|
---|
24 | AT_CHECK([egrep "mass.*is 2.016" stdout], 0, [ignore], [ignore])
|
---|
25 |
|
---|
26 | AT_CLEANUP
|
---|