My favorites | Sign in
Project Home Issues Source
Checkout   Browse   Changes    
 
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/********************************************\
*
* Sire - Molecular Simulation Framework
*
* Copyright (C) 2006 Christopher Woods
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For full details of the license please see the COPYING file
* that should have come with this distribution.
*
* You can contact the authors via the developer's mailing list
* at http://siremol.org
*
\*********************************************/

#ifndef SIREVOL_CARTESIAN_H
#define SIREVOL_CARTESIAN_H

#include "space.h"

SIRE_BEGIN_HEADER

namespace SireVol
{

/** This class overloads SimVolume to provide an infinite Cartesian
(3-dimensional, orthoganol dimensions) volume. This corresponds to
a traditional gas-phase or no-boundary system.

@author Christopher Woods
*/
class SIREVOL_EXPORT Cartesian : public Siren::Implements<Cartesian,Space>
{
public:
Cartesian();
Cartesian(const Cartesian &other);

~Cartesian();

Cartesian& operator=(const Cartesian &other);

bool operator==(const Cartesian &other) const;
bool operator!=(const Cartesian &other) const;

//////////////////////////////
// Implements Siren::Object //
//////////////////////////////

void stream(Siren::Stream &s);
QString toString() const;

uint hashCode() const;
bool test(Siren::Logger &logger) const;

///////////////////////////////
// Implements SireVol::Space //
///////////////////////////////

bool isPeriodic() const;
bool isCartesian() const;

SireUnits::Dimension::Volume volume() const;
SpacePtr setVolume(SireUnits::Dimension::Volume volume) const;

double calcDist(const Vector &point0, const Vector &point1) const;
double calcDist2(const Vector &point0, const Vector &point1) const;

double calcDist(const CoordGroup &group, DistMatrix &mat) const;
double calcDist2(const CoordGroup &group, DistMatrix &mat) const;
double calcInvDist(const CoordGroup &group, DistMatrix &mat) const;
double calcInvDist2(const CoordGroup &group, DistMatrix &mat) const;

double calcDist(const CoordGroup &group1, const CoordGroup &group2,
DistMatrix &mat) const;

double calcDist2(const CoordGroup &group1, const CoordGroup &group2,
DistMatrix &mat) const;

double calcInvDist(const CoordGroup &group1, const CoordGroup &group2,
DistMatrix &mat) const;

double calcInvDist2(const CoordGroup &group1, const CoordGroup &group2,
DistMatrix &mat) const;

DistVector calcDistVector(const Vector &point0, const Vector &point1) const;

double calcDistVectors(const CoordGroup &group, DistVectorMatrix &distmat) const;
double calcDistVectors(const CoordGroup &group1, const CoordGroup &group2,
DistVectorMatrix &distmat) const;

SireUnits::Dimension::Angle calcAngle(const Vector &point0,
const Vector &point1,
const Vector &point2) const;

SireUnits::Dimension::Angle calcDihedral(const Vector &point0,
const Vector &point1,
const Vector &point2,
const Vector &point3) const;

bool beyond(double dist, const AABox &aabox0, const AABox &aabox1) const;

bool beyond(double dist, const CoordGroup &group0,
const CoordGroup &group1) const;

double minimumDistance(const CoordGroup &group0, const CoordGroup &group1) const;

double minimumDistance(const CoordGroup &group) const;

Vector getRandomPoint(const Vector &center, const RanGenerator &generator) const;

Vector getBoxCenter(const Vector &p) const;
Vector getBoxCenter(const Vector &p, const Vector &center) const;

CoordGroup getMinimumImage(const CoordGroup &group, const Vector &center) const;

CoordGroupArray getMinimumImage(const CoordGroupArray &groups,
const Vector &center,
bool translate_as_one=false) const;

AABox getMinimumImage(const AABox &aabox, const Vector &center) const;

Vector getMinimumImage(const Vector &point, const Vector &center) const;

QList< boost::tuple<double,CoordGroup> >
getCopiesWithin(const CoordGroup &group,
const CoordGroup &center, double dist) const;
};

}

Q_DECLARE_METATYPE(SireVol::Cartesian)

SIRE_EXPOSE_CLASS( SireVol::Cartesian )

SIRE_END_HEADER

#endif

Change log

r1150 by chryswoods on Jan 7, 2010   Diff
I've added the ability to run individual
tests in sirentest, have fixed some bugs
and added more
tests to SireCAS, and have begun porting
SireVol to Siren (nearly all done - just
the implementation
in coordgroup.cpp to complete)

Code is broken

Go to: 
Sign in to write a code review

Older revisions

r1066 by chryswoods on Sep 17, 2009   Diff
I've been working on the code to allow
adding and deleting of molecules from
a move
(via MolInserter and MolDeleter
classes). This has necessitated
...
r1064 by chryswoods on Sep 15, 2009   Diff
I think that I've fixed a silly bug in
the volume move code, whereby I forgot
that the
centers of neighbouring boxes would
move when the box size was changed.
...
r1001 by chryswoods on Jun 24, 2009   Diff
I've worked out how to have multiple
spaces within the same system, and
still make it all
work with the replicas. The solution
is not to hack replicas etc., but to
...
All revisions of this file

File info

Size: 5321 bytes, 150 lines
Powered by Google Project Hosting