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
630dd9b3
Commit
630dd9b3
authored
Dec 01, 2016
by
Chloe Dequeker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added rotate_global function
parent
ee5f0b18
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
rotation.c
src/rotation.c
+13
-14
No files found.
src/rotation.c
View file @
630dd9b3
...
@@ -18,12 +18,12 @@ void sphericToxyz(float *x, float *y, float *z, float x0, float y0, float z0, fl
...
@@ -18,12 +18,12 @@ void sphericToxyz(float *x, float *y, float *z, float x0, float y0, float z0, fl
struct
pdb_values
*
rotate_global
(
struct
pdb_values
*
pdb
,
struct
pdb_values
*
pdbR
,
struct
pdb_values
*
newPDB
,
float
R
,
float
theta
,
float
phi
,
float
alpha
,
float
beta
,
float
gamma
){
struct
pdb_values
*
rotate_global
(
struct
pdb_values
*
pdb
,
struct
pdb_values
*
pdbR
,
struct
pdb_values
*
newPDB
,
float
R
,
float
theta
,
float
phi
,
float
alpha
,
float
beta
,
float
gamma
){
/* This function aims at rotating the pdb parameter and gets its new coordinates
/* This function aims at rotating the pdb parameter and gets its new coordinates
* in the newPDB parameter.
* in the newPDB parameter.
* Let the N axis the rotation of the x axis a
round
the z axis by an alpha angle.
* Let the N axis the rotation of the x axis a
bout
the z axis by an alpha angle.
* Let the Z axis the rotation of the z axis a
round
the N axis by a beta angle.
* Let the Z axis the rotation of the z axis a
bout
the N axis by a beta angle.
*
*
* The xyz system is centered on the center of mass of the pdb parameter.
* The xyz system is centered on the center of mass of the pdb parameter.
* We then rotate the pdb by an alpha angle a
round
the axis z, then by a beta
* We then rotate the pdb by an alpha angle a
bout
the axis z, then by a beta
* angle a
round the axis N and finally by a gamma angle around
the axis Z.
* angle a
bout the axis N and finally by a gamma angle about
the axis Z.
* The following image available on wikipedia can help to understand the scheme :
* The following image available on wikipedia can help to understand the scheme :
* https://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/Eulerangles.svg/300px-Eulerangles.svg.png
* https://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/Eulerangles.svg/300px-Eulerangles.svg.png
*/
*/
...
@@ -38,20 +38,19 @@ struct pdb_values* rotate_global(struct pdb_values* pdb, struct pdb_values* pdbR
...
@@ -38,20 +38,19 @@ struct pdb_values* rotate_global(struct pdb_values* pdb, struct pdb_values* pdbR
float
c_g
=
cos
(
gamma
),
s_g
=
sin
(
gamma
);
float
c_g
=
cos
(
gamma
),
s_g
=
sin
(
gamma
);
/*
TODO : This needs to be updated to match global setting
s */
/*
Coordinates of the N axi
s */
float
xN
=
c_a
;
float
xN
=
c_a
;
float
yN
=
s_a
;
float
yN
=
s_a
;
float
zN
=
0
;
float
zN
=
0
;
/* The coordinates of the unit vector for the axis Z can be computed as such :
/* The coordinates of the unit vector for the axis Z can be computed as such :
* TODO : To be updated as well !
* xZ : c_b
* xZ : -s_a0 * c_b0
* yZ : c_a * s_b
* yZ : c_a0 * c_b0
* zZ : s_a * s_b
* zZ : s_b0
*/
*/
float
xZ
=
0
;
float
xZ
=
c_b
;
float
yZ
=
0
;
float
yZ
=
c_a
*
s_b
;
float
zZ
=
0
;
float
zZ
=
s_a
*
s_b
;
if
(
newPDB
==
NULL
){
if
(
newPDB
==
NULL
){
newPDB
=
allocate_pdb
(
pdb
->
nbRes
);
newPDB
=
allocate_pdb
(
pdb
->
nbRes
);
...
@@ -246,8 +245,8 @@ struct pdb_values* rotate_sophie(struct pdb_values* pdb, struct pdb_values* pdbR
...
@@ -246,8 +245,8 @@ struct pdb_values* rotate_sophie(struct pdb_values* pdb, struct pdb_values* pdbR
void
getAnglesFromCA1andCA5_sophie
(
struct
pdb_values
*
pdb
,
float
*
alpha
,
float
*
beta
,
float
*
gamma
){
void
getAnglesFromCA1andCA5_sophie
(
struct
pdb_values
*
pdb
,
float
*
alpha
,
float
*
beta
,
float
*
gamma
){
/* In this function, we first need to find the initial angles alpha and beta that correspond
/* In this function, we first need to find the initial angles alpha and beta that correspond
* to the angles alpha and beta for the first CA of the protein.
* to the angles alpha and beta for the first CA of the protein.
* Then, we need to apply a rotation alpha a
round
the axis Z, then a rotation beta
* Then, we need to apply a rotation alpha a
bout
the axis Z, then a rotation beta
* a
round
the axis X on the fifth atom CA of the protein.
* a
bout
the axis X on the fifth atom CA of the protein.
* The coordinates of the then rotated atom CA 5 will give us the initial angle gamma
* The coordinates of the then rotated atom CA 5 will give us the initial angle gamma
*/
*/
...
...
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