*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2019,2020 by the GROMACS development team.
+ * Copyright (c) 2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
efXPM,
efRND,
efCSV,
+ efQMI,
efNR
};
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
{ eftASC, ".cub", "pot", nullptr, "Gaussian cube file" },
{ eftASC, ".xpm", "root", nullptr, "X PixMap compatible matrix file" },
{ eftASC, "", "rundir", nullptr, "Run directory" },
- { eftASC, ".csv", "bench", nullptr, "CSV data file" }
+ { eftASC, ".csv", "bench", nullptr, "CSV data file" },
+ { eftASC, ".inp", "topol-qmmm", nullptr, "Input file for QM program" }
};
const char* ftp2ext(int ftp)
{ efEDR, "-e", nullptr, ffOPTRD },
/* This group is needed by the VMD viewer as the start configuration for IMD sessions: */
{ efGRO, "-imd", "imdgroup", ffOPTWR },
- { efTRN, "-ref", "rotref", ffOPTRW | ffALLOW_MISSING } };
+ { efTRN, "-ref", "rotref", ffOPTRW | ffALLOW_MISSING },
+ /* This group is needed by the QMMM MDModule: */
+ { efQMI, "-qmi", nullptr, ffOPTRD } };
#define NFILE asize(fnm)
/* Command line options */
// to eventual notifications during pre-processing their data
mdModules.subscribeToPreProcessingNotifications();
- // And notify MdModules of existing logger
+ // Notify MDModules of existing logger
mdModules.notifiers().preProcessingNotifier_.notify(logger);
+ // Notify QMMM MDModule of external QM input file command-line option
+ {
+ gmx::QMInputFileName qmInputFileName = { ftp2bSet(efQMI, NFILE, fnm), ftp2fn(efQMI, NFILE, fnm) };
+ mdModules.notifiers().preProcessingNotifier_.notify(qmInputFileName);
+ }
+
if (bVerbose)
{
GMX_LOG(logger.info)
};
//! Mappings from OptionFileType to file types in filetypes.h.
-constexpr EnumerationArray<OptionFileType, int> sc_fileTypeMapping = { efTPS, efTPR, efTRX,
- efEDR, efPDB, efNDX,
- efXVG, efDAT, efCSV };
+constexpr EnumerationArray<OptionFileType, int> sc_fileTypeMapping = { efTPS, efTPR, efTRX, efEDR,
+ efPDB, efNDX, efXVG, efDAT,
+ efCSV, efQMI };
/********************************************************************
* FileTypeHandler
Plot,
GenericData,
Csv,
+ QMInput,
Count
};
std::string mdRunFilename_;
};
+/*! \libinternal \brief Notification for QM program input filename
+ * provided by user as command-line argument for grompp
+ */
+struct QMInputFileName
+{
+ //! Flag if QM Input File has been provided by user
+ bool hasQMInputFileName_ = false;
+ //! The name of the QM Input file (.inp)
+ std::string qmInputFileName_;
+};
+
/*! \libinternal
* \brief Group of notifers to organize that MDModules
* can receive callbacks they subscribe to.
* IndexGroupsAndNames provides modules with atom indices and their names
* KeyValueTreeObjectBuilder enables writing of module internal data to
* .tpr files.
+ * QMInputFileName Allows QMMM module to know if user provided external QM input file
*/
BuildMDModulesNotifier<const CoordinatesAndBoxPreprocessed,
const MDLogger&,
EnergyCalculationFrequencyErrors*,
gmx_mtop_t*,
const IndexGroupsAndNames&,
- KeyValueTreeObjectBuilder>::type preProcessingNotifier_;
+ KeyValueTreeObjectBuilder,
+ QMInputFileName>::type preProcessingNotifier_;
/*! \brief Handles subscribing and calling checkpointing callback functions.
*