Add occupied fraction and PDB output to g_ana select.
authorTeemu Murtola <teemu.murtola@gmail.com>
Wed, 12 Sep 2012 18:10:59 +0000 (21:10 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 4 Oct 2012 07:02:52 +0000 (09:02 +0200)
commitea20f3e33c3e9a9d4723b38815e56d54c1c13e18
tree5b20b7e1de6d3abde1b686e9f6f538d72f00620c
parent1d45f9f29432ee75e904bf5a0d24da5a8fb4c8e8
Add occupied fraction and PDB output to g_ana select.

- Add output option -of to write out the occupied fraction.
- Add output option -ofpdb to write the same information into a PDB
  file. Option -pdbatoms can be used to control which atoms to write
  out.
- Reorganize error checking for options that only work with a single
  selection or only make sense with dynamic selections.

Supporting changes:
- Add PDB file type to FileNameOption.
- Make write_trxframe_indexed() take the index as a const array.
- Add ConstArrayRef::data() following std::vector::data() from C++11.

The PDB output can also be used to more easily check what is selected by
a selection.

Change-Id: Icabab4b2c88cc21e4d5ebb672a1471c254acb05e
19 files changed:
src/gromacs/gmxlib/confio.c
src/gromacs/gmxlib/pdbio.c
src/gromacs/gmxlib/trxio.c
src/gromacs/legacyheaders/confio.h
src/gromacs/legacyheaders/pdbio.h
src/gromacs/legacyheaders/statutil.h
src/gromacs/options/filenameoption.cpp
src/gromacs/options/optionfiletype.h
src/gromacs/trajectoryanalysis/modules/select.cpp
src/gromacs/trajectoryanalysis/modules/select.h
src/gromacs/trajectoryanalysis/tests/refdata/SelectModuleTest_BasicTest.xml
src/gromacs/trajectoryanalysis/tests/refdata/SelectModuleTest_HandlesMaxPDBOutput.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SelectModuleTest_HandlesPDBOutputWithNonPDBInput.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SelectModuleTest_HandlesPDBOutputWithPDBInput.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SelectModuleTest_HandlesSelectedPDBOutput.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/select.cpp
src/gromacs/trajectoryanalysis/tests/simple.gro
src/gromacs/trajectoryanalysis/tests/simple.pdb [new file with mode: 0644]
src/gromacs/utility/arrayref.h