FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
MDHistory.hpp
1#ifndef __FIBER_GRID_TYPES_MDHISTORY
2#define __FIBER_GRID_TYPES_MDHISTORY
3
4#include <algorithm>
5
6#include "Edges.hpp"
7#include "GridWithCartesianVertices.hpp"
8
9using namespace Eagle::PhysicalSpace;
10using namespace std;
11
12namespace Fiber
13{
14
19 , public Edges
20{
21public:
22typedef uint16_t AtomType_t;
23
24RefPtr<Skeleton> DihedralSkeleton;
25RefPtr<Representation> DihedralsAsVertices;
26RefPtr<Field> DihedralPositions;
27
28RefPtr<Field> AtomTypes;
29
30 MDHistory( const RefPtr<Grid>&grid )
32 , Edges( grid )
33 {
34 assign( grid );
35 }
36
37bool assign( const RefPtr<Grid>&theGrid );
38bool isValid();
39
40RefPtr<MemArray<1, Dihedral_t> > getDihedrals( const RefPtr<FragmentID> & frag = NullPtr() );
41
42void getAtomTypeNames( std::vector<string>& names, const RefPtr<FragmentID> & frag = NullPtr() ) const;
43
44static SkeletonID getDihedralSkeletonID();
45static RefPtr<Field> createDihedralPositionsField( const RefPtr<Grid>& grid );
46
47void extractChains(const std::vector<string>& atom_filter,unsigned mindepth,unsigned maxdepth,std::vector< std::list<uint32_t> >& AllChains,
49
50void recursiveChainFinder(std::list<uint32_t>& chain, const std::vector< std::list<uint32_t> >& neighbors,
53 const std::vector<string>& atom_filter) const;
54
55void extractSingleCluster(uint32_t root, const std::vector<string>& atom_filter, unsigned maxdepth, std::list<uint32_t>& cluster,
57
58void recursiveClusterFinder(std::list<uint32_t> &cluster,uint32_t node,const std::vector< std::list<uint32_t> >& neighbors,
60 const std::vector<string>& atom_filter) const;
61
62
63template<class T,class C>
64bool isMember(const T& str,const C& atom_filter) const
65{
66 //usage example: isMember<string,std::vector<string>>(dict_arr[type_arr[AllSiblings[i]]],atom_filter)
67 return (find(atom_filter.begin(),atom_filter.end(),str) != atom_filter.end());
68}
69
70
71
72};
73
74
75}
76
77
78
79#endif
constexpr _InputIterator find(_InputIterator __first, _InputIterator __last, const _Tp &__val)
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Identify the edges on a skeleton within a Grid.
Definition Edges.hpp:35
A convenience grid type for molecules.
Definition MDHistory.hpp:20
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
std::nullptr_t NullPtr
STL namespace.
Definition GridWithCartesianVertices.hpp:11