13 |
|
GNU General Public License for more details. |
14 |
|
***********************************************************************/ |
15 |
|
|
16 |
< |
#include "amberformat.hpp" |
16 |
> |
#include "mol.hpp" |
17 |
> |
#include "obconversion.hpp" |
18 |
> |
#include "obmolecformat.hpp" |
19 |
|
|
20 |
|
using namespace std; |
21 |
|
namespace OpenBabel |
22 |
|
{ |
23 |
|
|
24 |
+ |
class AmberPrepFormat : public OBMoleculeFormat |
25 |
+ |
{ |
26 |
+ |
public: |
27 |
+ |
//Register this format type ID |
28 |
+ |
AmberPrepFormat() |
29 |
+ |
{ |
30 |
+ |
OBConversion::RegisterFormat("prep",this); |
31 |
+ |
} |
32 |
+ |
|
33 |
+ |
virtual const char* Description() //required |
34 |
+ |
{ |
35 |
+ |
return |
36 |
+ |
"Amber Prep format\n \ |
37 |
+ |
Read Options e.g. -as\n\ |
38 |
+ |
s Output single bonds only\n\ |
39 |
+ |
b Disable bonding entirely\n\n"; |
40 |
+ |
}; |
41 |
+ |
|
42 |
+ |
virtual const char* SpecificationURL() |
43 |
+ |
{return "http://amber.scripps.edu/doc/prep.html";}; |
44 |
+ |
|
45 |
+ |
//Flags() can return be any the following combined by | or be omitted if none apply |
46 |
+ |
// NOTREADABLE READONEONLY NOTWRITABLE WRITEONEONLY |
47 |
+ |
virtual unsigned int Flags() |
48 |
+ |
{ |
49 |
+ |
return NOTWRITABLE; |
50 |
+ |
}; |
51 |
+ |
|
52 |
+ |
//////////////////////////////////////////////////// |
53 |
+ |
/// The "API" interface functions |
54 |
+ |
virtual bool ReadMolecule(OBBase* pOb, OBConversion* pConv); |
55 |
+ |
}; |
56 |
+ |
|
57 |
+ |
//Make an instance of the format class |
58 |
+ |
AmberPrepFormat theAmberPrepFormat; |
59 |
+ |
|
60 |
+ |
///////////////////////////////////////////////////////////////// |
61 |
|
bool AmberPrepFormat::ReadMolecule(OBBase* pOb, OBConversion* pConv) |
62 |
|
{ |
63 |
|
|