The outage for Sunday 24th November has been cancelled.
Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
ApMatPDB.c
Go to the documentation of this file.
1 /************************************************************************/
2 /**
3 
4  \file ApMatPDB.c
5 
6  \version V1.1
7  \date 07.07.14
8  \brief
9 
10  \copyright (c) UCL / Dr. Andrew C. R. Martin 1993
11  \author Dr. Andrew C. R. Martin
12  \par
13  Institute of Structural & Molecular Biology,
14  University College London,
15  Gower Street,
16  London.
17  WC1E 6BT.
18  \par
19  andrew@bioinf.org.uk
20  andrew.martin@ucl.ac.uk
21 
22 **************************************************************************
23 
24  This code is NOT IN THE PUBLIC DOMAIN, but it may be copied
25  according to the conditions laid out in the accompanying file
26  COPYING.DOC.
27 
28  The code may be modified as required, but any modifications must be
29  documented so that the person responsible can be identified.
30 
31  The code may not be sold commercially or included as part of a
32  commercial product except as described in the file COPYING.DOC.
33 
34 **************************************************************************
35 
36  Description:
37  ============
38 
39 
40 **************************************************************************
41 
42  Usage:
43  ======
44 
45 **************************************************************************
46 
47  Revision History:
48  =================
49 
50 *************************************************************************/
51 /* Doxygen
52  -------
53  #GROUP Handling PDB Data
54  #SUBGROUP Moving the structure
55  #FUNCTION blApplyMatrixPDB()
56  Apply a rotation matrix to a PDB linked list.
57 */
58 /************************************************************************/
59 /* Includes
60 */
61 #include <math.h>
62 #include "MathType.h"
63 #include "pdb.h"
64 #include "matrix.h"
65 #include "macros.h"
66 
67 /************************************************************************/
68 /* Defines and macros
69 */
70 
71 /************************************************************************/
72 /* Prototypes
73 */
74 
75 /************************************************************************/
76 /* Variables global to this file only
77 */
78 
79 /************************************************************************/
80 /*>void blApplyMatrixPDB(PDB *pdb, REAL matrix[3][3])
81  --------------------------------------------------
82 *//**
83 
84  \param[in,out] *pdb PDB linked list
85  \param[in] matrix Matrix to apply
86 
87  Apply a rotation matrix to a PDB linked list.
88 
89 - 22.07.93 Original (old RotatePDB()) By: ACRM
90 - 07.07.14 Renamed to blApplyMatrixPDB() By: CTP
91 */
93  REAL matrix[3][3])
94 {
95  PDB *p;
96  VEC3F incoords,
97  outcoords;
98 
99  for(p=pdb; p!=NULL; NEXT(p))
100  {
101  if(p->x != 9999.0 && p->y != 9999.0 && p->z != 9999.0)
102  {
103  incoords.x = p->x;
104  incoords.y = p->y;
105  incoords.z = p->z;
106  blMatMult3_33(incoords,matrix,&outcoords);
107  p->x = outcoords.x;
108  p->y = outcoords.y;
109  p->z = outcoords.z;
110  }
111  }
112 }
113 
Include file for PDB routines.
REAL x
Definition: MathType.h:70
#define NULL
Definition: array2.c:99
Definition: pdb.h:298
void blMatMult3_33(VEC3F vecin, REAL matin[3][3], VEC3F *vecout)
Definition: MatMult3_33.c:100
#define NEXT(x)
Definition: macros.h:249
Useful macros.
Definition: MathType.h:69
double REAL
Definition: MathType.h:67
REAL z
Definition: pdb.h:300
Include file for matrix operations.
Type definitions for maths.
REAL z
Definition: MathType.h:70
REAL y
Definition: MathType.h:70
REAL x
Definition: pdb.h:300
REAL y
Definition: pdb.h:300
void blApplyMatrixPDB(PDB *pdb, REAL matrix[3][3])
Definition: ApMatPDB.c:92