/usr/include/votca/csg/cgengine.h is in libvotca-csg2-dev 1.2.4-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | /*
* Copyright 2009-2011 The VOTCA Development Team (http://www.votca.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _cgengine_H
#define _cgengine_H
#include <list>
#include <map>
#include <boost/program_options.hpp>
#include "topology.h"
#include "cgmoleculedef.h"
#include <votca/tools/datacollection.h>
#include "topologymap.h"
#include "cgobserver.h"
#include <votca/tools/vec.h>
#include "cgmoleculedef.h"
#include "cgengine.h"
#include "molecule.h"
#include "topologyreader.h"
#include "trajectorywriter.h"
#include "trajectoryreader.h"
#include <votca/tools/tokenizer.h>
#include <votca/tools/matrix.h>
#include "nematicorder.h"
namespace votca { namespace csg {
using namespace votca::tools;
using namespace std;
/**
\brief coarse graining engine
This class manages the coarse graining, at the moment it does the measurement stuff
TODO: split this into an additional VotcaApplication object
*/
class CGEngine
{
public:
CGEngine();
~CGEngine();
/**
create a coarse grained topolgy based on a given topology
*/
TopologyMap *CreateCGTopology(Topology &in, Topology &out);
/**
load molecule type from file
*/
void LoadMoleculeType(string filename);
CGMoleculeDef *getMoleculeDef(string name);
/**
* \brief ignores molecule in mapping process
* \param pattern glob pattern for molecule ident
*/
void AddIgnore(string pattern) { _ignores.push_back(pattern); }
/**
* \brief checks whether molecule is ignored
* \param ident identifyier of molecule
* \return true if is ignored
*/
bool IsIgnored(string ident);
private:
map<string, CGMoleculeDef *> _molecule_defs;
std::list<string> _ignores;
};
inline CGMoleculeDef *CGEngine::getMoleculeDef(string name)
{
map<string, CGMoleculeDef*>::iterator iter;
// if there is only 1 molecule definition, don't care about the name
if(_molecule_defs.size()==1 && name == "unnamed") {
return (*(_molecule_defs.begin())).second;
}
iter = _molecule_defs.find(name);
if(iter == _molecule_defs.end()) return NULL;
return (*iter).second;
}
inline bool CGEngine::IsIgnored(string ident)
{
for(std::list<string>::iterator iter=_ignores.begin(); iter!=_ignores.end(); ++iter) {
if(wildcmp(iter->c_str(), ident.c_str()))
return true;
}
return false;
}
}}
#endif /* _cgengine_H */
|