173 #define WRITEPDB_MAIN
182 #include <libxml/tree.h>
184 #define XMLDIE(x) do {if((x)!=NULL) { xmlFreeDoc((x)); \
185 xmlCleanupParser(); } \
186 return(FALSE);} while(FALSE)
198 static void WriteMaster(FILE *fp,
WHOLEPDB *wpdb,
int numConect,
201 static BOOL blSetPDBMLDateField(
char *pdbml_date,
char *pdb_date);
203 static char **ReadSeqresChainLabelWholePDB(
WHOLEPDB *wpdb,
int *nchains);
272 for(p = pdb ; p ;
NEXT(p))
275 if(strlen(p->
chain) > 1)
331 if(!doneTer && !strncmp(p->
record_type,
"HETATM", 6))
386 fprintf(fp,
"TER %5d %-4s%1s%4d%1s%s\n",
427 fprintf(fp,
"%-6s%5d %-4s%c%-4s%1s%4d%1s %8.3f%8.3f%8.3f%6.2f%6.2f %4s%2s%c%c\n",
483 fprintf(fp,
"%-6s%5d %-4s%-4s%1s%4d%1s %8.3f%8.3f%8.3f%6.2f%6.2f %4s%2s%c%c\n",
540 return(blDoWritePDBAsPDBML(fp, &wpdb,
FALSE));
589 xmlDocPtr doc =
NULL;
590 xmlNodePtr root_node =
NULL,
594 xmlNsPtr pdbx =
NULL,
601 char header[82] =
"",
611 int seqres_nchains = 0;
612 char **seqres_chain =
NULL;
617 if((doc = xmlNewDoc((xmlChar *)
"1.0"))==
NULL)
619 if((doc->encoding = xmlStrdup((xmlChar *)
"UTF-8"))==
NULL)
623 if((root_node=xmlNewNode(
NULL, (xmlChar *)
"datablock"))==
NULL)
625 xmlDocSetRootElement(doc, root_node);
626 if((pdbx=xmlNewNs(root_node, (xmlChar *)
"null",
627 (xmlChar *)
"PDBx"))==
NULL)
629 if((xsi =xmlNewNs(root_node, (xmlChar *)
"null",
630 (xmlChar *)
"xsi"))==
NULL)
632 xmlSetNs(root_node,pdbx);
637 chain_to_entity = blMapChainsToEntity(wpdb);
640 if((sites_node = xmlNewChild(root_node,
NULL,
641 (xmlChar *)
"atom_siteCategory",
650 if(!strncmp(
"TER",p->
resnam,3))
656 if((atom_node = xmlNewChild(sites_node,
NULL,
657 (xmlChar *)
"atom_site",
NULL))==
NULL)
660 sprintf(buffer,
"%d", p->
atnum);
661 xmlNewProp(atom_node, (xmlChar *)
"id", (xmlChar *)buffer);
666 sprintf(buffer,
"%.2f", p->
bval);
667 if((node = xmlNewChild(atom_node,
NULL,
668 (xmlChar *)
"B_iso_or_equiv",
669 (xmlChar *)buffer))==
NULL)
673 sprintf(buffer,
"%.3f", p->
x);
674 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"Cartn_x",
675 (xmlChar *)buffer))==
NULL)
678 sprintf(buffer,
"%.3f", p->
y);
679 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"Cartn_y",
680 (xmlChar *)buffer))==
NULL)
684 sprintf(buffer,
"%.3f", p->
z);
685 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"Cartn_z",
686 (xmlChar *)buffer))==
NULL)
690 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"auth_asym_id",
695 strcpy(buffer,p->
atnam);
697 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"auth_atom_id",
698 (xmlChar *)buffer))==
NULL)
704 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"auth_comp_id",
705 (xmlChar *)buffer_ptr))==
NULL)
709 sprintf(buffer,
"%d", p->
resnum);
710 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"auth_seq_id",
711 (xmlChar *)buffer))==
NULL)
718 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"group_PDB",
719 (xmlChar *)buffer))==
NULL)
724 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"label_alt_id",
730 xmlNewNsProp(node, xsi, (xmlChar *)
"nil", (xmlChar *)
"true");
736 xmlNodeSetContent(node, (xmlChar *)buffer);
739 if((node = xmlNewChild(atom_node,
NULL,
740 (xmlChar *)
"label_asym_id",
744 strcpy(buffer,p->
atnam);
746 if((node = xmlNewChild(atom_node,
NULL,
747 (xmlChar *)
"label_atom_id",
748 (xmlChar *)buffer))==
NULL)
754 if((node = xmlNewChild(atom_node,
NULL,
755 (xmlChar *)
"label_comp_id",
756 (xmlChar *)buffer_ptr))==
NULL)
768 else if(chain_to_entity !=
NULL &&
780 if((node = xmlNewChild(atom_node,
NULL,
781 (xmlChar *)
"label_entity_id",
782 (xmlChar *)buffer))==
NULL)
786 sprintf(buffer,
"%d", p->
resnum);
787 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"label_seq_id",
788 (xmlChar *)buffer))==
NULL)
792 sprintf(buffer,
"%.2f", p->
occ);
793 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"occupancy",
794 (xmlChar *)buffer))==
NULL)
803 sprintf(buffer,
"%s", p->
insert);
804 if((node = xmlNewChild(atom_node,
NULL,
805 (xmlChar *)
"pdbx_PDB_ins_code",
806 (xmlChar *)buffer))==
NULL)
814 if((node = xmlNewChild(atom_node,
NULL,
815 (xmlChar *)
"pdbx_PDB_model_num",
816 (xmlChar *)
"1"))==
NULL)
825 if((node = xmlNewChild(atom_node,
NULL,
826 (xmlChar *)
"pdbx_formal_charge",
827 (xmlChar *)buffer))==
NULL)
836 sprintf(buffer,
"%s", p->
element);
838 if(strlen(buffer_ptr))
840 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"type_symbol",
841 (xmlChar *)buffer_ptr))==
NULL)
848 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"type_symbol",
849 (xmlChar *)buffer))==
NULL)
856 if(strncmp(p->
segid,
" ", 4))
858 if((node = xmlNewChild(atom_node,
NULL,
870 xmlDocFormatDump(fp,doc,1);
888 if((sites_node = xmlNewChild(root_node,
NULL,
889 (xmlChar *)
"struct_connCategory",
901 if(!strncmp(
"TER",p->
resnam,3))
909 if((atom_node = xmlNewChild(sites_node,
NULL,
910 (xmlChar *)
"struct_conn",
NULL))==
NULL)
918 sprintf(buffer,
"%s%d",
"conect", conect_id);
919 xmlNewProp(atom_node, (xmlChar *)
"id", (xmlChar *)buffer);
922 sprintf(buffer,
"%s",
"covale");
923 if((node = xmlNewChild(atom_node,
NULL,
924 (xmlChar *)
"conn_type_id",
925 (xmlChar *)buffer))==
NULL)
929 sprintf(buffer,
"%.3f",
DIST(p,q));
930 if((node = xmlNewChild(atom_node,
NULL,
931 (xmlChar *)
"pdbx_dist_value",
932 (xmlChar *)buffer))==
NULL)
936 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"ptnr1_auth_asym_id",
943 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"ptnr1_auth_comp_id",
944 (xmlChar *)buffer_ptr))==
NULL)
947 sprintf(buffer,
"%d", p->
resnum);
948 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"ptnr1_auth_seq_id",
949 (xmlChar *)buffer))==
NULL)
955 if((node = xmlNewChild(atom_node,
NULL,
956 (xmlChar *)
"ptnr1_label_alt_id",
962 xmlNodeSetContent(node, (xmlChar *)buffer);
965 if((node = xmlNewChild(atom_node,
NULL,
966 (xmlChar *)
"ptnr1_label_asym_id",
970 strcpy(buffer,p->
atnam);
972 if((node = xmlNewChild(atom_node,
NULL,
973 (xmlChar *)
"ptnr1_label_atom_id",
974 (xmlChar *)buffer))==
NULL)
980 if((node = xmlNewChild(atom_node,
NULL,
981 (xmlChar *)
"ptnr1_label_comp_id",
982 (xmlChar *)buffer_ptr))==
NULL)
985 sprintf(buffer,
"%d", p->
resnum);
986 if((node = xmlNewChild(atom_node,
NULL,
987 (xmlChar *)
"ptnr1_label_seq_id",
988 (xmlChar *)buffer))==
NULL)
997 sprintf(buffer,
"%s", p->
insert);
998 if((node = xmlNewChild(atom_node,
NULL,
999 (xmlChar *)
"ptnr1_PDB_ins_code",
1000 (xmlChar *)buffer))==
NULL)
1006 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"ptnr2_auth_asym_id",
1010 strcpy(buffer,q->
resnam);
1013 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"ptnr2_auth_comp_id",
1014 (xmlChar *)buffer_ptr))==
NULL)
1017 sprintf(buffer,
"%d", q->
resnum);
1018 if((node = xmlNewChild(atom_node,
NULL, (xmlChar *)
"ptnr2_auth_seq_id",
1019 (xmlChar *)buffer))==
NULL)
1025 if((node = xmlNewChild(atom_node,
NULL,
1026 (xmlChar *)
"ptnr2_label_alt_id",
1032 xmlNodeSetContent(node, (xmlChar *)buffer);
1035 if((node = xmlNewChild(atom_node,
NULL,
1036 (xmlChar *)
"ptnr2_label_asym_id",
1040 strcpy(buffer,q->
atnam);
1042 if((node = xmlNewChild(atom_node,
NULL,
1043 (xmlChar *)
"ptnr2_label_atom_id",
1044 (xmlChar *)buffer))==
NULL)
1047 strcpy(buffer,q->
resnam);
1050 if((node = xmlNewChild(atom_node,
NULL,
1051 (xmlChar *)
"ptnr2_label_comp_id",
1052 (xmlChar *)buffer_ptr))==
NULL)
1055 sprintf(buffer,
"%d", q->
resnum);
1056 if((node = xmlNewChild(atom_node,
NULL,
1057 (xmlChar *)
"ptnr2_label_seq_id",
1058 (xmlChar *)buffer))==
NULL)
1066 if(strcmp(q->
insert,
" "))
1068 sprintf(buffer,
"%s", q->
insert);
1069 if((node = xmlNewChild(atom_node,
NULL,
1070 (xmlChar *)
"ptnr2_PDB_ins_code",
1071 (xmlChar *)buffer))==
NULL)
1085 if(blSetPDBMLDateField(pdbml_date, date))
1087 if((sites_node = xmlNewChild(root_node,
NULL,
1088 (xmlChar *)
"database_PDB_revCategory",
1092 if((atom_node = xmlNewChild(sites_node,
NULL,
1093 (xmlChar *)
"database_PDB_rev",
1096 xmlNewProp(atom_node, (xmlChar *)
"num", (xmlChar *)
"1");
1098 if((node = xmlNewChild(atom_node,
NULL,
1100 (xmlChar *)pdbml_date))==
NULL)
1103 if((node = xmlNewChild(atom_node,
NULL,
1104 (xmlChar *)
"date_original",
1105 (xmlChar *)pdbml_date))==
NULL)
1108 if((node = xmlNewChild(atom_node,
NULL,
1109 (xmlChar *)
"mod_type",
1110 (xmlChar *)
"0"))==
NULL)
1113 if(strlen(pdbcode) == 4)
1115 if((node = xmlNewChild(atom_node,
NULL,
1116 (xmlChar *)
"replaces",
1117 (xmlChar *)pdbcode))==
NULL)
1128 if(sites_node ==
NULL)
1131 if((sites_node = xmlNewChild(root_node,
NULL,
1132 (xmlChar *)
"entityCategory",
1137 if((atom_node = xmlNewChild(sites_node,
NULL,
1138 (xmlChar *)
"entity",
1141 sprintf(buffer,
"%d", i);
1142 xmlNewProp(atom_node, (xmlChar *)
"id", (xmlChar *)buffer);
1144 if(strlen(compound.
other))
1146 if((node = xmlNewChild(atom_node,
NULL,
1147 (xmlChar *)
"details",
1154 if((node = xmlNewChild(atom_node,
NULL,
1155 (xmlChar *)
"pdbx_description",
1160 if(strlen(compound.
ec))
1162 if((node = xmlNewChild(atom_node,
NULL,
1163 (xmlChar *)
"pdbx_ec",
1164 (xmlChar *)compound.
ec))==
NULL)
1170 if((node = xmlNewChild(atom_node,
NULL,
1171 (xmlChar *)
"pdbx_fragment",
1178 if((node = xmlNewChild(atom_node,
NULL,
1179 (xmlChar *)
"pdbx_mutation",
1185 if((node = xmlNewChild(atom_node,
NULL,
1187 (xmlChar *)
"polymer"))==
NULL)
1194 for(i=1; i <= molid; i++)
1198 if(sites_node ==
NULL)
1201 if((sites_node = xmlNewChild(root_node,
NULL,
1202 (xmlChar *)
"entity_src_genCategory",
1209 if((atom_node = xmlNewChild(sites_node,
NULL,
1210 (xmlChar *)
"entity_src_gen",
1213 sprintf(buffer,
"%d", i);
1214 xmlNewProp(atom_node,(xmlChar *)
"entity_id",(xmlChar *)buffer);
1215 sprintf(buffer,
"%d", j);
1216 xmlNewProp(atom_node,(xmlChar *)
"pdbx_src_id",(xmlChar *)buffer);
1220 if((node = xmlNewChild(atom_node,
NULL,
1221 (xmlChar *)
"pdbx_gene_src_common_name",
1226 if(strlen(species.
strain))
1228 if((node = xmlNewChild(atom_node,
NULL,
1229 (xmlChar *)
"pdbx_gene_src_strain",
1234 if(species.
taxid != 0)
1236 sprintf(buffer,
"%d", species.
taxid);
1237 if((node = xmlNewChild(atom_node,
NULL,
1238 (xmlChar *)
"pdbx_gene_src_ncbi_taxonomy_id",
1239 (xmlChar *)buffer))==
NULL)
1245 if((node = xmlNewChild(atom_node,
NULL,
1246 (xmlChar *)
"pdbx_gene_src_scientific_name",
1256 seqres_chain = ReadSeqresChainLabelWholePDB(wpdb, &seqres_nchains);
1260 seqres_residues = ReadSeqresResidueListWholePDB(wpdb,
1266 if((sites_node = xmlNewChild(root_node,
NULL,
1267 (xmlChar *)
"pdbx_poly_seq_schemeCategory",
1271 for(i=0;i<seqres_nchains;i++)
1277 if(chain_to_entity !=
NULL &&
1285 for(s=seqres_residues[i];s!=
NULL;
NEXT(s),res++)
1288 if((atom_node = xmlNewChild(sites_node,
NULL,
1289 (xmlChar *)
"pdbx_poly_seq_scheme",
NULL))
1294 xmlNewProp(atom_node, (xmlChar *)
"asym_id",
1295 (xmlChar *)seqres_chain[i]);
1297 sprintf(buffer,
"%d", entity);
1298 xmlNewProp(atom_node, (xmlChar *)
"entity_id",
1301 xmlNewProp(atom_node, (xmlChar *)
"mon_id",
1302 (xmlChar *)s->string);
1304 sprintf(buffer,
"%d", res);
1305 xmlNewProp(atom_node, (xmlChar *)
"seq_id",
1310 sprintf(buffer,
"%d", res);
1311 if((node = xmlNewChild(atom_node,
NULL,
1312 (xmlChar *)
"auth_mon_id",
1313 (xmlChar *)s->string))==
NULL)
1316 sprintf(buffer,
"%d", res);
1317 if((node = xmlNewChild(atom_node,
NULL,
1318 (xmlChar *)
"ndb_seq_num",
1319 (xmlChar *)buffer))==
NULL)
1322 sprintf(buffer,
"%d", res);
1323 if((node = xmlNewChild(atom_node,
NULL,
1324 (xmlChar *)
"pdb_mon_id",
1325 (xmlChar *)s->string))==
NULL)
1328 sprintf(buffer,
"%d", res);
1329 if((node = xmlNewChild(atom_node,
NULL,
1330 (xmlChar *)
"pdb_strand_id",
1331 (xmlChar *)seqres_chain[i]))==
NULL)
1336 free(seqres_chain[i]);
1338 free(seqres_residues);
1347 if((sites_node = xmlNewChild(root_node,
NULL,
1348 (xmlChar *)
"entryCategory",
1352 if((atom_node = xmlNewChild(sites_node,
NULL,
1354 (xmlChar *)
""))==
NULL)
1356 xmlNewProp(atom_node, (xmlChar *)
"id", (xmlChar *)pdbcode);
1360 if(title !=
NULL && strlen(pdbcode))
1362 if((sites_node = xmlNewChild(root_node,
NULL,
1363 (xmlChar *)
"structCategory",
1367 if((atom_node = xmlNewChild(sites_node,
NULL,
1368 (xmlChar *)
"struct",
1371 xmlNewProp(atom_node, (xmlChar *)
"entry_id", (xmlChar *)pdbcode);
1373 if((node = xmlNewChild(atom_node,
NULL,
1375 (xmlChar *)title))==
NULL)
1379 if(title !=
NULL){ free(title); }
1382 if(strlen(header) && strlen(pdbcode))
1384 if((sites_node = xmlNewChild(root_node,
NULL,
1385 (xmlChar *)
"struct_keywordsCategory",
1389 if((atom_node = xmlNewChild(sites_node,
NULL,
1390 (xmlChar *)
"struct_keywords",
1393 xmlNewProp(atom_node, (xmlChar *)
"entry_id", (xmlChar *)pdbcode);
1395 if((node = xmlNewChild(atom_node,
NULL,
1396 (xmlChar *)
"pdbx_keywords",
1397 (xmlChar *)header))==
NULL)
1404 xmlDocFormatDump(fp,doc,1);
1435 char buffer[] =
" ",
1439 strncpy(buffer,atom_name,2);
1444 if(strlen(buffer_ptr) == 2 && isdigit(buffer[1]))
1448 else if(strlen(buffer_ptr) == 2 && !isalpha(buffer[0]))
1454 if(strlen(buffer_ptr) == 2 && atom_name[3] !=
' ' &&
1455 (atom_name[0] ==
'H' || atom_name[0] ==
'C' ||
1456 atom_name[0] ==
'N' || atom_name[0] ==
'O' ||
1457 atom_name[0] ==
'P'))
1459 if(!isalpha(atom_name[2]) || !isalpha(atom_name[3]))
1466 strcpy(element, buffer_ptr);
1520 fprintf(fp,
"%-6s%5d %-4s%-4s%1s%4d%1s %8.3f%8.3f%8.3f%6.2f%6.2f\n",
1569 blDoWritePDBAsPDBML(fp, wpdb,
TRUE);
1662 for(i=0, nPrinted=0; i<p->
nConect; i++)
1668 fprintf(fp,
"CONECT%5d", p->
atnum);
1680 sprintf(format,
"%%%ds\n", 80-width);
1681 fprintf(fp, format,
" ");
1686 WriteMaster(fp, wpdb, nConect, numTer);
1688 fprintf(fp,
"END%77s\n",
" ");
1711 static void WriteMaster(FILE *fp,
WHOLEPDB *wpdb,
int numConect,
1731 if(!strncmp(s->
string,
"REMARK", 6))
1733 if(!strncmp(s->
string,
"HET ", 6))
1735 if(!strncmp(s->
string,
"HELIX ", 6))
1737 if(!strncmp(s->
string,
"SHEET ", 6))
1739 if(!strncmp(s->
string,
"TURN ", 6))
1741 if(!strncmp(s->
string,
"SITE ", 6))
1743 if(!strncmp(s->
string,
"ORIGX", 5))
1745 if(!strncmp(s->
string,
"SCALE", 5))
1747 if(!strncmp(s->
string,
"MTRIX", 5))
1749 if(!strncmp(s->
string,
"SEQRES", 6))
1756 fprintf(fp,
"MASTER %5d 0%5d%5d%5d%5d%5d%5d%5d%5d%5d%5d \n",
1813 char *recordLabels[] = {
"REMARK 500",
1841 for(i=0; recordLabels[i] !=
NULL; i++)
1843 if(!strncmp(s->
string, recordLabels[i], strlen(recordLabels[i])))
1869 static BOOL blSetPDBMLDateField(
char *pdbml_date,
char *pdb_date)
1871 char month_letter[12][4] = {
"JAN",
"FEB",
"MAR",
"APR",
"MAY",
"JUN",
1872 "JUL",
"AUG",
"SEP",
"OCT",
"NOV",
"DEC"};
1879 char pdb_month[4] =
"";
1882 items = sscanf(pdb_date,
"%2d-%3s-%2d", &day, pdb_month, &year);
1887 if(!strcmp(month_letter[i], pdb_month))
1897 { year = year + 2000; }
1899 { year = year + 1900; }
1903 year == 0 || month == 0 || day == 0 ||
1904 day < 1 || day > 31 ||
1905 month < 1 || month > 12 ||
1909 pdbml_date[0] =
'\0';
1914 sprintf(pdbml_date,
"%4d-%02d-%02d", year, month, day);
1938 char **chains =
NULL;
1953 fprintf(stderr,
"No memory for hash table\n");
1958 for(i=0;i<nchains;i++)
1970 for(i=0;i<nchains;i++){ free(chains[i]); }
1994 static char **ReadSeqresChainLabelWholePDB(
WHOLEPDB *wpdb,
int *nchains)
1998 char currchain[2] =
" ",
2009 if(!strncmp(s->string,
"SEQRES",6))
2026 strncpy(currchain,&(seqres->
string[11]),1);
2030 strncpy(chain,&(s->string[11]),1);
2033 strncpy(currchain,chain,1);
2041 if((chainid=(
char **)malloc((*nchains) *
sizeof(
char *)))==
NULL)
2048 for(i=0;i<(*nchains);i++)
2050 if((chainid[i] = (
char *)malloc(8*
sizeof(
char))) ==
NULL)
2060 strcpy(currchain,
"");
2063 fsscanf(s->string,
"%11x%1s",chain);
2067 strcpy(chainid[chainnum],chain);
2068 strcpy(currchain,chain);
2102 **residuelist =
NULL;
2103 char currchain[2] =
" ",
2115 if(!strncmp(s->string,
"SEQRES",6))
2132 strncpy(currchain,&(seqres->
string[11]),1);
2136 strncpy(chain,&(s->string[11]),1);
2139 strncpy(currchain,chain,1);
2153 for(i=0;i<(*nchains);i++)
2155 residuelist[i] =
NULL;
2160 strncpy(currchain,&(seqres->
string[11]),1);
2163 fsscanf(s->string,
"%11x%1s%7x%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s",
2164 chain,res[0],res[1],res[2],res[3],res[4],res[5],res[6],
2165 res[7],res[8],res[9],res[10],res[11],res[12]);
2169 strcpy(currchain,chain);
2177 if(!strncmp(res[i],
" ",4))
2181 residuelist[chainnum] =
blStoreString(residuelist[chainnum],
2188 return(residuelist);
char * blGetTitleWholePDB(WHOLEPDB *wpdb)
int blWritePDB(FILE *fp, PDB *pdb)
BOOL blGetCompoundWholePDBMolID(WHOLEPDB *wpdb, int molid, COMPND *compnd)
BOOL blGetSpeciesWholePDBMolID(WHOLEPDB *wpdb, int molid, PDBSOURCE *source)
char strain[MAXPDBANNOTATION]
Include file for PDB routines.
char fragment[MAXPDBANNOTATION]
#define KILLTRAILSPACES(x)
Defines for using hash functions.
void blWriteWholePDBHeader(FILE *fp, WHOLEPDB *wpdb)
BOOL blGetCompoundWholePDBChain(WHOLEPDB *wpdb, char *chain, COMPND *compnd)
void blSetElementSymbolFromAtomName(char *element, char *atom_name)
BOOL blSetHashValueInt(HASHTABLE *hashtable, char *key, int value)
BOOL blWriteWholePDB(FILE *fp, WHOLEPDB *wpdb)
void blWriteGromosPDB(FILE *fp, PDB *pdb)
int fsscanf(char *buffer, char *format,...)
void blWritePDBRecord(FILE *fp, PDB *pdb)
HASHTABLE * blInitializeHash(ULONG hashsize)
char other[MAXPDBANNOTATION]
char commonName[MAXPDBANNOTATION]
BOOL blWritePDBAsPDBML(FILE *fp, PDB *pdb)
void blFreeHash(HASHTABLE *hashtable)
void blWriteWholePDBHeaderNoRes(FILE *fp, WHOLEPDB *wpdb)
int blGetHashValueInt(HASHTABLE *hashtable, char *key)
Include file for fsscanf()
void blWriteTerCard(FILE *fp, PDB *p)
BOOL blHashKeyDefined(HASHTABLE *hashtable, char *key)
char ec[MAXPDBANNOTATION]
void blWriteGromosPDBRecord(FILE *fp, PDB *pdb)
void blWriteWholePDBTrailer(FILE *fp, WHOLEPDB *wpdb, int numTer)
STRINGLIST * blStoreString(STRINGLIST *StringList, char *string)
BOOL blAreResiduePointersBonded(PDB *res1, PDB *res2, REAL tol)
BOOL blFormatCheckWritePDB(PDB *pdb)
PDB * blFindResidue(PDB *pdb, char *chain, int resnum, char *insert)
#define CHAINMATCH(chain1, chain2)
#define KILLLEADSPACES(y, x)
char molecule[MAXPDBANNOTATION]
int blWritePDBAsPDBorGromos(FILE *fp, PDB *pdb, BOOL doGromos)
Type definitions for maths.
struct pdb_entry * conect[MAXCONECT]
char chain[blMAXCHAINLABEL]
char ** blGetPDBChainLabels(PDB *pdb, int *nChains)
void blWritePDBRecordAtnam(FILE *fp, PDB *pdb)
char scientificName[MAXPDBANNOTATION]
BOOL blGetHeaderWholePDB(WHOLEPDB *wpdb, char *header, int maxheader, char *date, int maxdate, char *pdbcode, int maxcode)
char mutation[MAXPDBANNOTATION]