Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
INTBuilder
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chloe Dequeker
INTBuilder
Commits
9b241008
Commit
9b241008
authored
Dec 05, 2016
by
Chloe Dequeker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HEX rotation matrix
parent
6d203d08
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
rotation.c
src/rotation.c
+10
-6
No files found.
src/rotation.c
View file @
9b241008
...
...
@@ -72,9 +72,9 @@ struct pdb_values* rotate_HEX(struct pdb_values* pdb, struct pdb_values* pdbR, s
for
(
i
=
0
;
i
<
pdb
->
nbRes
;
i
++
){
for
(
j
=
0
;
j
<
pdb
->
residues
[
i
].
nbAtom
;
j
++
){
xi
=
pdb
->
residues
[
i
].
x
[
j
]
-
pdb
->
centerX
;
yi
=
pdb
->
residues
[
i
].
y
[
j
]
-
pdb
->
centerY
;
zi
=
pdb
->
residues
[
i
].
z
[
j
]
-
pdb
->
centerZ
;
xi
=
pdb
->
residues
[
i
].
x
[
j
]
;
//
- pdb->centerX;
yi
=
pdb
->
residues
[
i
].
y
[
j
]
;
//
- pdb->centerY;
zi
=
pdb
->
residues
[
i
].
z
[
j
]
;
//
- pdb->centerZ;
/* alpha rotation of the residue */
...
...
@@ -93,12 +93,16 @@ struct pdb_values* rotate_HEX(struct pdb_values* pdb, struct pdb_values* pdbR, s
z3i
=
(
xZ
*
zZ
*
(
1
.
0
-
c_g
)
-
yZ
*
s_g
)
*
x2i
+
(
yZ
*
zZ
*
(
1
.
0
-
c_g
)
+
xZ
*
s_g
)
*
y2i
+
(
zZ
*
zZ
+
(
1
.
0
-
zZ
*
zZ
)
*
c_g
)
*
z2i
;
x3i
=
(
c_a
*
c_b
*
c_g
-
s_a
*
s_g
)
*
xi
+
(
-
c_a
*
c_b
*
s_g
-
s_a
*
c_g
)
*
yi
+
(
c_a
*
s_b
)
*
zi
;
y3i
=
(
c_a
*
s_g
+
s_a
*
c_b
*
c_g
)
*
xi
+
(
-
s_a
*
c_b
*
s_g
+
c_a
*
c_g
)
*
yi
+
(
s_a
*
s_b
)
*
zi
;
z3i
=
(
-
s_b
*
c_g
)
*
xi
+
(
s_b
*
s_g
)
*
yi
+
(
c_b
)
*
zi
;
/* Now the residue has been rotated, and we need to translate it
* to its final destination
*/
newPDB
->
residues
[
i
].
x
[
j
]
=
x3i
+
new
X
;
newPDB
->
residues
[
i
].
y
[
j
]
=
y3i
+
new
Y
;
newPDB
->
residues
[
i
].
z
[
j
]
=
z3i
+
new
Z
;
newPDB
->
residues
[
i
].
x
[
j
]
=
x3i
+
trans_
X
;
newPDB
->
residues
[
i
].
y
[
j
]
=
y3i
+
trans_
Y
;
newPDB
->
residues
[
i
].
z
[
j
]
=
z3i
+
trans_
Z
;
/* We also translate the coordinates of the first and fifth CA, even
* though they are not used afterwards. This is for the sake of
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment