Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented code to support the Alexandria force field.
The Alexandria Chemistry Toolkit for building force fields will be released shortly. It relies on the OpenBabel software to support it for generating atom types. In this patch the forcefieldalexandria is introduced as a child class to forcefieldgaff in an effort to change as little code as possible. There are many changes to bondtyp.txt which admittably will be hard to check. These will affect any force field typing in OpenBabel.
- Loading branch information
Showing
10 changed files
with
816 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Open Babel data files | ||
|
||
set(to_install | ||
alexandria.prm | ||
atomization-energies.txt | ||
atomtyp.txt | ||
babel_povray3.inc | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/********************************************************************** | ||
forcefieldalexandria.cpp - Alexandria force field. | ||
Copyright (C) 2009 by Frank Peters <e.a.j.f.peters@tue.nl> | ||
Copyright (C) 2006-2007 by Tim Vandermeersch <tim.vandermeersch@gmail.com> | ||
Copyright (C) 2021 by David van der Spoel <david.vanderspoel@icm.uu.se> | ||
This file is part of the Open Babel project. | ||
For more information, see <http://openbabel.org/> | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation version 2 of the License. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
***********************************************************************/ | ||
|
||
#include <openbabel/babelconfig.h> | ||
|
||
#include "forcefieldalexandria.h" | ||
|
||
#include <cstdlib> | ||
|
||
using namespace std; | ||
|
||
namespace OpenBabel | ||
{ | ||
//*********************************************** | ||
//Make a global instance | ||
OBForceFieldAlexandria theForceFieldAlexandria("Alexandria", true); | ||
//*********************************************** | ||
|
||
} // end namespace OpenBabel | ||
|
||
//! \file forcefieldalexandria.cpp | ||
//! \brief Alexandria force field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/********************************************************************** | ||
forcefieldalexandriaf.h - Alexandria force field. | ||
Copyright (C) 2009 by Frank Peters <e.a.j.f.peters@tue.nl> | ||
Copyright (C) 2006 by Tim Vandermeersch <tim.vandermeersch@gmail.com> | ||
Copyright (C) 2021 by David van der Spoel <david.vanderspoel@icm.uu.se> | ||
This file is part of the Open Babel project. | ||
For more information, see <http://openbabel.org/> | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation version 2 of the License. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
***********************************************************************/ | ||
|
||
#include <vector> | ||
#include <string> | ||
#include <map> | ||
|
||
#include <openbabel/forcefield.h> | ||
#include <openbabel/base.h> | ||
#include <openbabel/mol.h> | ||
|
||
#include "forcefieldgaff.h" | ||
|
||
namespace OpenBabel | ||
{ | ||
|
||
// Class OBForceFieldAlexandria | ||
// class introduction in forcefieldalexandria.cpp | ||
class OBForceFieldAlexandria: public OBForceFieldGaff | ||
{ | ||
public: | ||
//! Constructor | ||
explicit OBForceFieldAlexandria(const char* ID, bool IsDefault=true) : OBForceFieldGaff(ID, IsDefault) | ||
{ | ||
SetPrmFile("alexandria.prm"); | ||
} | ||
|
||
}; // class OBForceFieldAlexandria | ||
|
||
}// namespace OpenBabel | ||
|
||
//! \file forcefieldalexandria.h | ||
//! \brief Alexandria force field |
Oops, something went wrong.