~ubuntu-branches/ubuntu/breezy/garlic/breezy

« back to all changes in this revision

Viewing changes to docking_refresh.c

  • Committer: Bazaar Package Importer
  • Author(s): zhaoway
  • Date: 2001-04-24 07:09:13 UTC
  • Revision ID: james.westby@ubuntu.com-20010424070913-uzpupnwdfhmliebz
Tags: upstream-1.1
ImportĀ upstreamĀ versionĀ 1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2000 Damir Zucic */
 
2
 
 
3
/*=============================================================================
 
4
 
 
5
                                docking_refresh.c
 
6
 
 
7
Purpose:
 
8
        Refresh the content of docking window.
 
9
 
 
10
Input:
 
11
        (1) Pointer to RuntimeS structure.
 
12
        (2) Pointer to GUIS structure.
 
13
 
 
14
Output:
 
15
        (1) The content of docking window refreshed.
 
16
        (2) Return value.
 
17
 
 
18
Return value:
 
19
        (1) Positive always (trivial).
 
20
 
 
21
Notes:
 
22
        (1) The index of exposed atom is of the type int, though size_t
 
23
            is used elsewhere. The reason is that int may have negative
 
24
            value,  while size_t is unsigned on many systems.  Negative
 
25
            values are used  to signal that data stored  to a given box
 
26
            are obsolete.
 
27
 
 
28
========includes:============================================================*/
 
29
 
 
30
#include <stdio.h>
 
31
 
 
32
#include <X11/Xlib.h>
 
33
#include <X11/Xutil.h>
 
34
#include <X11/Xos.h>
 
35
#include <X11/Xatom.h>
 
36
 
 
37
#include "defines.h"
 
38
#include "typedefs.h"
 
39
 
 
40
/*======function prototypes:=================================================*/
 
41
 
 
42
int             DockingProject_ (RuntimeS *, int);
 
43
int             ListExposedPolarResidues_ (RuntimeS *, int);
 
44
int             RepresentativeAtoms_ (RuntimeS *, int);
 
45
int             ExcludeDistant_ (RuntimeS *, int);
 
46
int             DrawBottom_ (GUIS *, RuntimeS *);
 
47
int             DrawTop_ (GUIS *, RuntimeS *);
 
48
 
 
49
/*======refresh docking window:==============================================*/
 
50
 
 
51
int DockingRefresh_ (RuntimeS *runtimeSP, GUIS *guiSP)
 
52
{
 
53
 
 
54
/* Prepare orthogonal projections: */
 
55
DockingProject_ (runtimeSP, 1);
 
56
DockingProject_ (runtimeSP, 2);
 
57
 
 
58
/* Prepare  two lists of  exposed  polar  residues.  Each */
 
59
/* residue may be found more than once in docking matrix: */
 
60
ListExposedPolarResidues_ (runtimeSP, 1);
 
61
ListExposedPolarResidues_ (runtimeSP, 2);
 
62
 
 
63
/* Find representative atoms: */
 
64
RepresentativeAtoms_ (runtimeSP, 1);
 
65
RepresentativeAtoms_ (runtimeSP, 2);
 
66
 
 
67
/* Exclude residues which are below the plane: */
 
68
ExcludeDistant_ (runtimeSP, 1);
 
69
ExcludeDistant_ (runtimeSP, 2);
 
70
 
 
71
/* Draw symbols: */
 
72
DrawBottom_ (guiSP, runtimeSP);
 
73
DrawTop_ (guiSP, runtimeSP);
 
74
 
 
75
/* Return positive value: */
 
76
return 1;
 
77
}
 
78
 
 
79
/*===========================================================================*/
 
80
 
 
81