-
Notifications
You must be signed in to change notification settings - Fork 1
/
p_ssbond.c
43 lines (31 loc) · 1022 Bytes
/
p_ssbond.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "stride.h"
int Process_SSBOND(BUFFER Buffer, CHAIN **Chain, int *ChainNumber, COMMAND *Cmd)
{
int CC, BC;
char *Field[MAX_FIELD];
BUFFER Tmp;
if( Cmd->NActive && !ChInStr(Cmd->Active,SpaceToDash(Buffer[15])) )
return(SUCCESS);
CC = 0;
if( *ChainNumber == 0 ) {
InitChain(&Chain[CC]);
Chain[CC]->Id = Buffer[15];
(*ChainNumber)++;
}
BC = Chain[CC]->NBond;
Chain[CC]->SSbond[BC] = (SSBOND *)ckalloc(sizeof(SSBOND));
strcpy(Tmp,Buffer);
Tmp[21] = ' ';
Tmp[35] = ' ';
SplitString(Tmp+17,Field,1);
strcpy(Chain[CC]->SSbond[BC]->PDB_ResNumb1,Field[0]);
SplitString(Tmp+31,Field,1);
strcpy(Chain[CC]->SSbond[BC]->PDB_ResNumb2,Field[0]);
Chain[CC]->SSbond[BC]->ChainId1 = Buffer[15];
Chain[CC]->SSbond[BC]->ChainId2 = Buffer[29];
Chain[CC]->SSbond[BC]->InsCode1 = Buffer[21];
Chain[CC]->SSbond[BC]->InsCode2 = Buffer[35];
Chain[CC]->SSbond[BC]->AsnSource = Pdb;
Chain[CC]->NBond++;
return(SUCCESS);
}