Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
sic_dock
Rose.hh
Go to the documentation of this file.
1
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2
// vi: set ts=2 noet:
3
//
4
// (c) Copyright Rosetta Commons Member Institutions.
5
// (c) This file is part of the Rosetta software suite and is made available under license.
6
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9
10
#ifndef INCLUDED_protocols_sic_dock_Rose_hh
11
#define INCLUDED_protocols_sic_dock_Rose_hh
12
13
#include <
protocols/sic_dock/Rose.fwd.hh
>
14
15
#include <platform/types.hh>
16
#include <utility/vector1.hh>
17
#include <
core/id/AtomID_Map.fwd.hh
>
18
#include <
core/pose/Pose.fwd.hh
>
19
#include <
protocols/sic_dock/xyzStripeHashPose.hh
>
20
#include <numeric/xyzTransform.hh>
21
22
23
namespace
protocols {
24
namespace
sic_dock {
25
26
class
Rose
{
27
public
:
28
typedef
platform::Size
Size
;
29
typedef
platform::Real
Real
;
30
typedef
core::id::AtomID
AID
;
31
typedef
core::pose::Pose
Pose
;
32
typedef
core::pose::PoseCOP
PoseCOP
;
33
typedef
protocols::sic_dock::xyzStripeHashPose
Hash
;
34
typedef
protocols::sic_dock::xyzStripeHashPoseCOP
HashCOP
;
35
typedef
numeric::xyzTransform<Real>
X
;
36
typedef
numeric::xyzMatrix<Real>
M
;
37
typedef
numeric::xyzVector<Real>
V
;
38
typedef
X
const
XC
;
39
typedef
M
const
MC
;
40
typedef
V
const
VC
;
41
typedef
X
const
&
XCR
;
42
typedef
M
const
&
MCR
;
43
typedef
V
const
&
VCR
;
44
typedef
Rose
const
&
RCR
;
45
46
PoseCOP
p
;
47
HashCOP
h
;
48
X
x
;
49
50
Rose
(
PoseCOP
p
);
51
Rose
(
PoseCOP
p
,
sic_dock::PoseCoordPickMode
const
& coord_picker );
52
Rose
(
PoseCOP
p
,
core::id::AtomID_Map<Real>
const
& clash_atoms );
53
54
inline
55
Rose
(
RCR
r,
XCR
x_in) :
p
(r.
p
),
h
(r.
h
),
x
(x_in) {}
56
57
virtual
~Rose
() {}
58
59
inline
bool
clashes
(
VCR
point)
const
{
return
h
->clash(~
x
*point); }
60
bool
clashes
(
RCR
other)
const
;
61
Size
contacts
(
RCR
other)
const
;
62
63
friend
inline
bool
operator==
(
RCR
a,
RCR
b
){
return
( a.p==b.p && a.h==b.h && a.x.distance_squared(b.x) <= 0.000001 ); }
64
friend
inline
bool
operator!=
(
RCR
a,
RCR
b
){
return
( a.p!=b.p || a.h!=b.h || a.x.distance_squared(b.x) > 0.000001 ); }
65
66
// friend inline Rose operator +( RCR a, VCR b ){ return Rose( a, a.x+b ); }
67
inline
Rose
operator +
(
VCR
b
){
return
Rose
( *
this
,
x
+b ); }
// Refactoring to make it PyRosetta friendly
68
69
// friend inline Rose operator +( VCR a, RCR b ){ return Rose( b, a +b.x ); }
70
71
//friend inline Rose operator -( RCR a, VCR b ){ return Rose( a, a.x-b ); }
72
inline
Rose
operator -
(
VCR
b
){
return
Rose
( *
this
,
x
-b ); }
// Refactoring to make it PyRosetta friendly
73
74
//friend inline Rose operator *( RCR a, XCR b ){ return Rose( a, a.x*b ); }
75
inline
Rose
operator *
(
XCR
b
){
return
Rose
( *
this
,
x
*b ); }
// Refactoring to make it PyRosetta friendly
76
77
//friend inline Rose operator *( RCR a, MCR b ){ return Rose( a, a.x*b ); }
78
inline
Rose
operator *
(
MCR
b
){
return
Rose
( *
this
,
x
*b ); }
// Refactoring to make it PyRosetta friendly
79
80
// friend inline Rose operator -( VCR a, RCR b ){ return Rose( b, a -b.x ); }
81
friend
inline
Rose
operator *
(
XCR
a,
RCR
b
){
return
Rose
( b, a *b.x ); }
82
friend
inline
Rose
operator *
(
MCR
a,
RCR
b
){
return
Rose
( b, a *b.x ); }
83
84
// friend inline Rose operator /( RCR a, XCR b ){ return Rose( a, a.x/b ); }
85
// friend inline Rose operator /( XCR a, RCR b ){ return Rose( b, a /b.x ); }
86
87
inline
XC
res_anchor
(
Size
const
& ir)
const
{
return
x
*
X
(
p
->xyz(
AID
(1,ir)),
p
->xyz(
AID
(2,ir)),
p
->xyz(
AID
(3,ir)) ); }
88
inline
XC
n_anchor
()
const
{
return
res_anchor
( 1 ); }
89
inline
XC
c_anchor
()
const
{
return
res_anchor
(
p
->n_residue()); }
90
inline
void
align_n
(
XCR
a){
x
= a * ~
X
(
p
->xyz(
AID
(1, 1 )),
p
->xyz(
AID
(2, 1 )),
p
->xyz(
AID
(3, 1 )) ); }
91
inline
void
align_c
(
XCR
a){
x
= a * ~
X
(
p
->xyz(
AID
(1,
p
->n_residue())),
p
->xyz(
AID
(2,
p
->n_residue())),
p
->xyz(
AID
(3,
p
->n_residue())) ); }
92
93
void
dump_pdb
(std::ostream & out )
const
;
94
void
dump_pdb
(
std::string
const
& fname)
const
;
95
void
dump_minimal_pdb
(std::ostream & out,
char
chain=
'R'
);
96
97
PoseCOP
pose
()
const
;
98
99
//////////////// debug //////////////////
100
bool
clashes_naive
(
RCR
other)
const
;
101
Size
contacts_naive
(
RCR
other)
const
;
102
};
103
104
105
106
}
// namespace sic_dock
107
}
// namespace protocols
108
109
#endif
Generated on Sat Jun 1 2013 12:12:43 for Rosetta 3.5 by
1.8.4