1
/* Copyright (C) 2000 Damir Zucic */
3
/*=============================================================================
8
Hide backbone for selected atoms: set hiddenF in each BackboneS
12
(1) Pointer to MolComplexS structure.
13
(2) The number of macromolecular complexes.
16
(1) The hiddenF set to one for selected atoms.
22
========includes:============================================================*/
27
#include <X11/Xutil.h>
29
#include <X11/Xatom.h>
34
/*======hide backbone:=======================================================*/
36
int HideBackbone_ (MolComplexS *mol_complexSP, int mol_complexesN)
39
MolComplexS *curr_mol_complexSP;
40
size_t c_alphaI, c_alphaN;
41
BackboneS *curr_backboneSP;
44
/* Scan every macromolecular complex: */
45
for (mol_complexI = 0; mol_complexI < mol_complexesN; mol_complexI++)
47
/** Pointer to the current macromolecular complex: **/
48
curr_mol_complexSP = mol_complexSP + mol_complexI;
50
/** Check is the current macromolecular complex caught: **/
51
if (curr_mol_complexSP->catchF == 0) continue;
53
/** The number of CA atoms in the current complex: **/
54
c_alphaN = curr_mol_complexSP->c_alphaN;
56
/** Scan the array of BackboneS structures: **/
57
for (c_alphaI = 0; c_alphaI < c_alphaN; c_alphaI++)
59
/*** Pointer to the current CA atom: ***/
60
curr_backboneSP = curr_mol_complexSP->backboneSP + c_alphaI;
61
curr_atomSP = curr_mol_complexSP->atomSP +
62
curr_backboneSP->c_alphaI;
64
/*** Check is the current CA atom selected and set ***/
65
/*** hiddenF. If the current CA atom is selected, ***/
66
/*** the backbone element should be unvisible. ***/
67
if (curr_atomSP->selectedF) curr_backboneSP->hiddenF = 1;
71
/* Return positive value (trivial): */
75
/*===========================================================================*/