30 |
|
using namespace std; |
31 |
|
namespace OpenBabel |
32 |
|
{ |
33 |
< |
|
34 |
< |
class OOPSEFormat : public OBMoleculeFormat |
35 |
< |
{ |
36 |
< |
public: |
37 |
< |
//Register this format type ID |
38 |
< |
OOPSEFormat() |
33 |
> |
|
34 |
> |
class OOPSEFormat : public OBMoleculeFormat |
35 |
|
{ |
36 |
< |
OBConversion::RegisterFormat("in", this, "chemical/x-in"); |
37 |
< |
} |
38 |
< |
|
36 |
> |
public: |
37 |
> |
//Register this format type ID |
38 |
> |
OOPSEFormat() { |
39 |
> |
OBConversion::RegisterFormat("md", this, "chemical/x-md"); |
40 |
> |
} |
41 |
> |
|
42 |
|
virtual const char* Description() //required |
43 |
< |
{ |
44 |
< |
return |
45 |
< |
"oopse cartesian coordinates format\n"; |
46 |
< |
}; |
43 |
> |
{ |
44 |
> |
return |
45 |
> |
"OOPSE combined meta-data / cartesian coordinates format\n"; |
46 |
> |
}; |
47 |
> |
|
48 |
> |
virtual const char* SpecificationURL() |
49 |
> |
{ return "http://www.oopse.org";}; //optional |
50 |
> |
|
51 |
> |
virtual const char* GetMIMEType() |
52 |
> |
{ return "chemical/x-md"; }; |
53 |
> |
|
54 |
> |
virtual unsigned int Flags() { return WRITEONEONLY;} |
55 |
> |
|
56 |
> |
//*** This section identical for most OBMol conversions *** |
57 |
> |
//////////////////////////////////////////////////// |
58 |
> |
/// The "API" interface functions |
59 |
> |
//virtual bool ReadMolecule(OBBase* pOb, OBConversion* pConv); |
60 |
> |
virtual bool WriteMolecule(OBBase* pOb, OBConversion* pConv); |
61 |
|
|
49 |
– |
virtual const char* SpecificationURL() |
50 |
– |
{ return "";}; //optional |
51 |
– |
|
52 |
– |
virtual const char* GetMIMEType() |
53 |
– |
{ return "chemical/x-in"; }; |
54 |
– |
|
55 |
– |
virtual unsigned int Flags() { return WRITEONEONLY;} |
56 |
– |
|
57 |
– |
//*** This section identical for most OBMol conversions *** |
58 |
– |
//////////////////////////////////////////////////// |
59 |
– |
/// The "API" interface functions |
60 |
– |
//virtual bool ReadMolecule(OBBase* pOb, OBConversion* pConv); |
61 |
– |
virtual bool WriteMolecule(OBBase* pOb, OBConversion* pConv); |
62 |
– |
|
62 |
|
private: |
63 |
< |
bool AreSameFragments(OBMol& mol, vector<int>& frag1, vector<int>& frag2); |
64 |
< |
void findAngles(OBMol& mol); |
65 |
< |
OBMol* createMolFromFragment(OBMol& mol, vector<int>& fragment); |
66 |
< |
void WriteMDFile(vector<OBMol*> mols, vector<int> numMols); |
67 |
< |
void WriteINFile(OBMol& mol, ostream& ofs, vector<int>& indices); |
69 |
< |
}; |
63 |
> |
bool AreSameFragments(OBMol& mol, vector<int>& frag1, vector<int>& frag2); |
64 |
> |
void findAngles(OBMol& mol); |
65 |
> |
OBMol* createMolFromFragment(OBMol& mol, vector<int>& fragment); |
66 |
> |
void WriteMDFile(vector<OBMol*> mols, vector<int> numMols, ostream& os, OBMol& mol, vector<int>& indices); |
67 |
> |
}; |
68 |
|
} |
69 |
|
#endif |