/*
FILE:     _maxit.h
*/
/*
VERSION:  1.600
*/
/*
DATE:     2/3/2005
*/
/*
  Comments and Questions to: sw-help@rcsb.rutgers.edu
*/
/*
COPYRIGHT 1999-2005 Rutgers - The State University of New Jersey

This software is provided WITHOUT WARRANTY OF MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER WARRANTY, EXPRESS OR
IMPLIED.  RUTGERS MAKE NO REPRESENTATION OR WARRANTY THAT THE
SOFTWARE WILL NOT INFRINGE ANY PATENT, COPYRIGHT OR OTHER
PROPRIETARY RIGHT.

The user of this software shall indemnify, hold harmless and defend
Rutgers, its governors, trustees, officers, employees, students,
agents and the authors against any and all claims, suits,
losses, liabilities, damages, costs, fees, and expenses including
reasonable attorneys' fees resulting from or arising out of the
use of this software.  This indemnification shall include, but is
not limited to, any and all claims alleging products liability.
*/
/*
               PDB SOFTWARE LICENSE AGREEMENT

BY CLICKING THE ACCEPTANCE BUTTON OR INSTALLING OR USING 
THIS "SOFTWARE, THE INDIVIDUAL OR ENTITY LICENSING THE  
SOFTWARE ("LICENSEE") IS CONSENTING TO BE BOUND BY AND IS 
BECOMING A PARTY TO THIS AGREEMENT.  IF LICENSEE DOES NOT 
AGREE TO ALL OF THE TERMS OF THIS AGREEMENT
THE LICENSEE MUST NOT INSTALL OR USE THE SOFTWARE.

1. LICENSE AGREEMENT

This is a license between you ("Licensee") and the Protein Data Bank (PDB) 
at Rutgers, The State University of New Jersey (hereafter referred to 
as "RUTGERS").   The software is owned by RUTGERS and protected by 
copyright laws, and some elements are protected by laws governing 
trademarks, trade dress and trade secrets, and may be protected by 
patent laws. 

2. LICENSE GRANT

RUTGERS grants you, and you hereby accept, non-exclusive, royalty-free 
perpetual license to install, use, modify, prepare derivative works, 
incorporate into other computer software, and distribute in binary 
and source code format, or any derivative work thereof, together with 
any associated media, printed materials, and on-line or electronic 
documentation (if any) provided by RUTGERS (collectively, the "SOFTWARE"), 
subject to the following terms and conditions: (i) any distribution 
of the SOFTWARE shall bind the receiver to the terms and conditions 
of this Agreement; (ii) any distribution of the SOFTWARE in modified 
form shall clearly state that the SOFTWARE has been modified from 
the version originally obtained from RUTGERS.  

2. COPYRIGHT; RETENTION OF RIGHTS.  

The above license grant is conditioned on the following: (i) you must 
reproduce all copyright notices and other proprietary notices on any 
copies of the SOFTWARE and you must not remove such notices; (ii) in 
the event you compile the SOFTWARE, you will include the copyright 
notice with the binary in such a manner as to allow it to be easily 
viewable; (iii) if you incorporate the SOFTWARE into other code, you 
must provide notice that the code contains the SOFTWARE and include 
a copy of the copyright notices and other proprietary notices.  All 
copies of the SOFTWARE shall be subject to the terms of this Agreement.  

3. NO MAINTENANCE OR SUPPORT; TREATMENT OF ENHANCEMENTS 

RUTGERS is under no obligation whatsoever to: (i) provide maintenance 
or support for the SOFTWARE; or (ii) to notify you of bug fixes, patches, 
or upgrades to the features, functionality or performance of the 
SOFTWARE ("Enhancements") (if any), whether developed by RUTGERS 
or third parties.  If, in its sole discretion, RUTGERS makes an 
Enhancement available to you and RUTGERS does not separately enter 
into a written license agreement with you relating to such bug fix, 
patch or upgrade, then it shall be deemed incorporated into the SOFTWARE 
and subject to this Agreement. You are under no obligation whatsoever 
to provide any Enhancements to RUTGERS or the public that you may 
develop over time; however, if you choose to provide your Enhancements 
to RUTGERS, or if you choose to otherwise publish or distribute your 
Enhancements, in source code form without contemporaneously requiring 
end users or RUTGERS to enter into a separate written license agreement 
for such Enhancements, then you hereby grant RUTGERS a non-exclusive,
royalty-free perpetual license to install, use, modify, prepare
derivative works, incorporate into the SOFTWARE or other computer
software, distribute, and sublicense your Enhancements or derivative
works thereof, in binary and source code form.

4. FEES.  There is no license fee for the SOFTWARE.  If Licensee
wishes to receive the SOFTWARE on media, there may be a small charge
for the media and for shipping and handling.  Licensee is
responsible for any and all taxes.

5. TERMINATION.  Without prejudice to any other rights, Licensor
may terminate this Agreement if Licensee breaches any of its terms
and conditions.  Upon termination, Licensee shall destroy all
copies of the SOFTWARE.

6. PROPRIETARY RIGHTS.  Title, ownership rights, and intellectual
property rights in the Product shall remain with RUTGERS.  Licensee 
acknowledges such ownership and intellectual property rights and will 
not take any action to jeopardize, limit or interfere in any manner 
with RUTGERS' ownership of or rights with respect to the SOFTWARE.  
The SOFTWARE is protected by copyright and other intellectual 
property laws and by international treaties.  Title and related 
rights in the content accessed through the SOFTWARE is the property 
of the applicable content owner and is protected by applicable law.  
The license granted under this Agreement gives Licensee no rights to such
content.

7. DISCLAIMER OF WARRANTY.  THE SOFTWARE IS PROVIDED FREE OF 
CHARGE, AND, THEREFORE, ON AN "AS IS" BASIS, WITHOUT WARRANTY OF 
ANY KIND, INCLUDING WITHOUT LIMITATION THE WARRANTIES THAT IT 
IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE 
OR NON-INFRINGING.  THE ENTIRE RISK AS TO THE QUALITY AND 
PERFORMANCE OF THE SOFTWARE IS BORNE BY LICENSEE.  SHOULD THE 
SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, THE LICENSEE AND NOT 
LICENSOR ASSUMES THE ENTIRE COST OF ANY SERVICE AND REPAIR.  
THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF 
THIS AGREEMENT.  NO USE OF THE PRODUCT IS AUTHORIZED HEREUNDER 
EXCEPT UNDER THIS DISCLAIMER.

8. LIMITATION OF LIABILITY.  TO THE MAXIMUM EXTENT PERMITTED BY
APPLICABLE LAW,  IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY 
INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 
OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, INCLUDING, 
WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK 
STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL 
OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF ADVISED OF THE
POSSIBILITY THEREOF. 
*/
#ifndef _MAXIT_H_
#define _MAXIT_H_

#include <stdio.h>

#include "_validation.h"
#include "remark.h"

#define NDB_POLYMER_TEXT              "polymer"
#define NDB_NON_POLYMER_TEXT          "non-polymer"
#define NDB_WATER_TEXT                "water"
#define NDB_DNA_TEXT                  "DNA"
#define NDB_RNA_TEXT                  "RNA"
#define NDB_PR_TEXT                   "PROTEIN"
#define NDB_T_RNA_TEXT                "T-RNA"
#define NDB_HYBRID_TEXT               "DNA/RNA"

typedef struct {
        char sheetID[4];
        int  numStrands;
        int  initIndex;
        int  initRes;
        int  endIndex;
        int  endRes;
        int  sense;
        char curAtom[5];
        int  curIndex;
        int  curRes;
        char prevAtom[5];
        int  prevIndex;
        int  prevRes;
} _SHEET;

typedef struct {
        int  FstIndex;
        int  FstRes;
        int  SndIndex;
        int  SndRes;
        char SymOP_1[7];
        char SymOP_2[7];
} _SSBOND;

typedef struct {
        char FstAtom[5];
        char altLoc1[3];
        int  FstIndex;
        int  FstRes;
        char H_Atom[5];
        char altLocH[3];
        int  H_Index;
        int  H_Res;
        char SndAtom[5];
        char altLoc2[3];
        int  SndIndex;
        int  SndRes;
        char SymOP_1[7];
        char SymOP_2[7];
} _HYDBND;

typedef _LINK _SLTBRG;

typedef struct {
        char SiteID[4];
        int  numRes;
        int  alloc_numRes;
        int  *initIndex;
        int  *initRes;
} _SITE;

typedef struct {
        char Name[20];
        char FstAtom[5];
        int  FstIndex;
        int  FstRes;
        char SndAtom[5];
        int  SndIndex;
        int  SndRes;
        char Replaced_Atom[5];
} _MODIFB;

typedef _MODIFB _MODIFP;

typedef struct {
        char Name[20];
        char FstAtom[5];
        int  FstIndex;
        int  FstRes;
        char SndAtom[5];
        int  SndIndex;
        int  SndRes;
        char Replaced_Atom[5];
        char Sugar_Name[26];
} _MODIFS;

typedef struct {
        char PDB_ID[5];
        int  FstIndex;
        int  FstRes;
        char Standard_Name[50];
        char *details;
} _MODRES;

typedef struct {
        int  initIndex;
        int  initRes;
        int  numAtoms;
} _HET;

typedef struct {
        int  Entity_ID;
        int  Old_Entity_ID;
        int  Number;
        char *Type;
        char *Source;
        char *Description;
} _ENTITY;

typedef struct {
        int  num;
        char date[20];
        char replaces[10];
        int  mod_type;
        char *record;
} PDB_REV;

typedef struct {
       _RESIDUE *res;
       _CHAIN   *chn;
       COORD    coord[4];
       int      exist[4];
       int      chnbreak;
       double   energy[4];
       int      hbond[4];
       char     ssbond[12];
       int      bridpt[2];
       int      ssbond1;
} _NRESIDUE;

typedef struct {
        CifString Asym_ID;
        char PDB_Strand_ID[3];
        int  chain_type;
        char First_Residue_Name[5];
        int  First_Residue_Number;
        int  n_stbiol;
        _STBIOL **stbiol;
} _BIOL_UNIT_INFO;

class _MAXIT: public _VALIDATION {
   public:
        _MAXIT(const int, const int);
        ~_MAXIT();
        void     Insert_a_Sheet(const char*, const int, const int, const int,
                        const int, const int, const int, const char*,
                        const int, const int, const char*, const int, const int);
        void     Insert_a_SSbond(const int, const int, const int, const int,
                                 const char*, const char*);
        void     Insert_a_Hydbnd(const char*, const char*, const int, const int,
                                 const char*, const char*, const int, const int,
                                 const char*, const char*, const int, const int,
                                 const char*, const char*);
        void     Insert_a_Sltbrg(const char*, const char*, const int, const int,
                                 const char*, const char*, const int, const int,
                                 const char*, const char*);
        void     Insert_a_Site(const char*, const int, const int);
        void     Insert_a_Het(const int, const int, const int);
        void     Insert_a_Modifb(const char*, const char*, const int, const int,
                                 const char*, const int, const int, const char*);
        void     Insert_a_Modifp(const char*, const char*, const int, const int,
                                 const char*, const int, const int, const char*);
        void     Insert_a_Modifs(const char*, const char*, const int, const int,
                                 const char*, const int, const int, const char*,
                                 const char*);
        void     Insert_a_Modres(const char*, const int, const int, const char*,
                                 const char*);
        void     input_structural_features(const int);
        void     output_structural_features(const int);
        // void     update_pdb_and_pub_numbers();
        void     pdb_to_ndb_general(const char*, const int);
        void     pdb_to_ndb_proc_remarks();
        void     pdb_to_ndb_postprocessing();
        void     delete_atom_count();
        void     ndb_to_pdb_general(const int);
        void     add_remark_90();
        void     ndb_to_cif_general(const int, const int, const int, const int, const int);
        void     update_encapsulated_cif();
        void     cif_to_ndb_general(const int, const int, const int, const int, const int,
                                    const int, const int, const int, const int);
        void     cif_to_ndb_exchange(const int, const int);
        void     ndb_to_cif_coordinates(const int, const int, const int, const int,
                                        const int, const int, const int, const int);
        void     open_mmcif_file();
        void     write_mmcif_file(const int, const int, const int);
        void     Output_Stbiol();
        void     Input_Entity();
        void     Output_Entity();
        void     match_entity_with_molecules();
        void     get_entity_card();
        void     get_compnd_card();
        void     get_origx_card();
        void     get_scale_card();
        void     get_cryst_card();
        // void     get_expdta_card();
        void     get_title_card();
        void     get_dchem_and_inhibt_cards();
        void     get_het_card();
        void     ndb_add_missing_information(const char*, const int, const char*);
        void     write_restraints_correspondences(FILE*);
        void     ndb_write_hydrogen_index();
        void     generate_ncs_strands();
        int      get_matrix(double m[3][4], const int);
        void     add_modification_information();
        void     get_create_secondary_structures_using_promotif(const char*);
        void     delete_atoms(const char *);
        void     insert_atoms(const char *);
        void     delete_residues(const char *);
        void     insert_residues(const char *);
        void     replace_residues(const char *);
        void     set_refine_program(_MAXIT*);
        void     merge_remarks(_MAXIT*);
        void     switch_residue_name_from_sequences();
        void     moving_waters();
        void     check_chnids();
        void     change_coordinates_symm(const char*);
        void     change_coordinates_non_symm(const char*);
        void     remove_secondary_structures();
        void     check_atom_number_count();
        void     get_virus_matrix_from_remark_350(const int);
        void     switch_hydrogen_labeling();
        void     convert_between_fractional_and_orthogonal(const int);
        void     classification(FILE*, FILE*, char*);
        void     delete_na_structural_features();
        void     update_na_structural_features();
        void     cif_process_revdat();
        void     cif_layer1_to_layer2_revdat();
        void     delete_terminal_atoms();
        void     correct_atom_name();
        void     renumber_pdb_numbers();
        void     search_complexity();
        void     remove_ebi_remark_500();
        void     generate_symmetry_and_ncs_related_strands(const char*, const int);
        void     generate_ncs_related_strands(const char*, const int);
        void     generate_packing();
        void     write_pdb_files(const char*, const int);
        // void     match_struct_asym();
        void     get_one_letter_code_from_coordinates();
        void     check_cryst1_card();
        void     get_biol_unit_formation();
        void     put_biol_unit_formation();
   private:
        // pdb_to_ndb
        void pdb_to_ndb_proc_header(const char*);
        void pdb_to_ndb_proc_compnd_and_source(const int);
        int  get_entity_index(const char*, const int);
        int  is_entity_a_protein(const int);
        void insert_a_card(const int, const int, const int, char*);
        One_Card_Info_Format** get_remarks(const int, int&);
        int* get_blocks_of_remarks(const int, int&, One_Card_Info_Format**);
        int  pdb_to_ndb_proc_remark(const int, One_Card_Info_Format**, const int, REMARKS*, const int);
        int  pdb_to_ndb_proc_remark_special(One_Card_Info_Format*, const int, REMARKS*);
        void pdb_to_ndb_postprocessing_remarks();
        // ndb_to_pdb
        void ndb_to_pdb_processing_authors();
        void ndb_to_pdb_processing_shelx_and_tnt();
        void ndb_to_pdb_processing_synchrotron();
        void ndb_to_pdb_proc_header();
        void replace_pdb_compnd_source_card();
        void add_compnd_card(const char*, const int);
        void ndb_to_pdb_get_source_card(const int, const int, const int, int*,
                     const int, PDB_Source_Format*);
        void ndb_to_pdb_get_remarks(const int);
        int  find_user_defined_remark(const int);
        void ndb_to_pdb_get_group_remarks();
        void ndb_to_pdb_get_general_remark(const int, REMARKS*, const int,
                         const int, const int, const int);
        void ndb_to_pdb_get_general_remark(REMARKS*);
        void ndb_to_pdb_get_general_remark(REMARKS*, One_Card_Info_Format*);
        void ndb_to_pdb_print_remark_value(char*, One_Card_Info_Format*,
                         REMARKS*, const int, const int);
        int  ndb_to_pdb_get_remark_from_premark(const int);
        int  ndb_to_pdb_get_remark_103_104();
        void ndb_to_pdb_get_remark_280_crystal();
        void ndb_to_pdb_get_remark_290();
        int  ndb_to_pdb_get_remark_300();
        int  ndb_to_pdb_get_remark_350();
        void ndb_to_pdb_get_remark_375();
        void ndb_to_pdb_get_remark_465();
        void ndb_to_pdb_get_remark_470();
        void ndb_to_pdb_get_remark_500(const int);
        void output_close_contact(ISTable*, BTreeObj<_DIndex>&, const int);
        void ndb_to_pdb_get_remark_525();
        void ndb_to_pdb_processing_nmr_remarks();
        int  check_virus_ncs_remark_300();
        int  check_virus_ncs_remark_350();
        void rms_deviation_of_bonds();
        void rms_deviation_of_angles();
        void outside_torsions();
        void non_cis_trans_torsions();
        void get_cispep_cards();
        void construct_remark_900();
        // ndb_to_cif
        void ndbcif_process_general(const int);
        void ndbcif_process_site_gen(const int);
        void ndbcif_process_rcsb_link(const int);
        void ndbcif_process_struct_sheet(const int);
        void ndbcif_process_struct_conn(const int);
        void ndbcif_process_nonstandard_list(const int);
        void ndbcif_process_struct_conf(const int);
        void ndbcif_process_stasym(const int);
        void ndbcif_process_entity_poly_seq(const int, const int);
        void ndbcif_process_asym_poly_seq_ndb(const int);
        void processing_r_factor(const double);
        void ndbcif_postprocessing_molecule_weight();
        void ndbcif_postprocessing_exptl_crystal();
        void ndbcif_postprocessing_wavelength_id();
        void ndbcif_postprocessing_ncs_oper();
        void ndbcif_postprocessing_cif_standard(const int, const int);
        void ndbcif_process_general_category(const int, const int);
        void ndbcif_process_remark(const int, const int);
        void ndbcif_process_matrix(const int);
        void ndbcif_process_name(const int);
        void ndbcif_process_refine_ls_restr(const int);
        void ndbcif_process_database_pdb_rev(const int);
        void get_ebi_validate_contact();
        void get_ebi_validate_bond();
        void get_ebi_validate_angle();
        void get_ebi_validate_torsion();
        void get_ebi_validate_peptide_omega();
        int  get_pdb_ndb_ids(const int id_option, CifString ids[3]);
        // cif_to_ndb
        void ndb_processing_categories_mapping(const int);
        void cifndb_process_category(ISTable*, const int, const int);
        void cifndb_process_general(const int, const int, const int, int *,
                    char SerialNo[10][82], char*, const int);
        void cifndb_process_special(const int, const int, const int, int *,
                    char SerialNo[10][82], const char*);
        void cifndb_process_general_category(ISTable*, const int, const int);
        void cifndb_process_remark(ISTable*, const int, const int);
        void cifndb_process_refine_ls_restr(ISTable*);
        void cifndb_process_matrix(ISTable*, const int);
        void cifndb_process_struct_site_gen(ISTable*);
        void cifndb_process_rcsb_link(ISTable*);
        void cifndb_process_struct_conf(ISTable*);
        void cifndb_process_sheet();
        void cifndb_process_struct_conn(ISTable*);
        void cifndb_process_database_pdb_rev(ISTable*);
        void put_into_card(const char*, const int, const int);
        void ndb_processing_requests();
        void ndb_processing_em_software();
        void ndb_processing_struct_category();
        void ndb_processing_struct_sheet_hbond();
        void ndb_processing_ndb_database_PDB_obs_spr_category();
        void ndb_processing_struct_ref_seq_and_diff();
        void post_processing_from_cif_to_ndb();
        // promotif
        void find_helices(const int, _NRESIDUE**);
        void find_sheets(const int, _NRESIDUE**, const char*);
        void find_ssbonds(const int, _NRESIDUE**);

        void get_refn_card();
        int  find_entity_index(const int);
        char *get_protein_descriptor(_CHAIN *chain);
        void ndb_get_protein_name(char*, const int);
        void get_descriptor_ligand(char*);
        void insert_formul_card(const char*, const int, const int);
        void insert_het_card(_CHAIN*, const char*, const int, const char*, const int);
        void get_bspair_second_chain(const char*, const char*, const char*, char*, int&, char*);
        void Clear_Structural_Feature();
        void get_derived_features(CifFileObj*);
        void get_na_derived_features(CifFileObj*);

        int      _alloc_sheet, _n_sheet;
        _SHEET** _sheet;
        int      _alloc_ssbond, _n_ssbond;
        _SSBOND  **_ssbond;
        int      _alloc_hydbnd, _n_hydbnd;
        _HYDBND  **_hydbnd;
        int      _alloc_sltbrg, _n_sltbrg;
        _SLTBRG  **_sltbrg;
        int      _alloc_site, _n_site;
        _SITE**  _site;
        int      _alloc_het, _n_het;
        _HET**   _het;
        int      _alloc_modifb, _n_modifb;
        _MODIFB  **_modifb;
        int      _alloc_modifp, _n_modifp;
        _MODIFP  **_modifp;
        int      _alloc_modifs, _n_modifs;
        _MODIFS  **_modifs;
        int      _alloc_modres, _n_modres;
        _MODRES  **_modres;
        int      _n_entity;
        _ENTITY* _entity;
        int      _exist_helix;
        int      _exist_sheet;
        int      _exist_ssbond;
        int      _create_final_file;
        int      _n_biol_unit_info;
        _BIOL_UNIT_INFO **_biol_unit_info;
};

extern void pdb_to_ndb(const char*, const char*, const char*, const int, const int, const int, const char*, const int);
extern void pdb_to_cif(const char*, const char*, const char*, const int, const int, const int, const int, const int,
                       const int, const int, const int, const char*, const int, const int, const int);
extern void ndb_to_pdb(const char*, const char*, const char*, const int, const int);
extern void ndb_to_ndb(const char*, const char*, const char*, const int);
extern void ndb_to_cif(const char*, const char*, const char*, const int, const int, const int, const int, const int,
                       const int, const int, const int, const int);
extern void cif_to_ndb(const char*, const char*, const char*, const int, const int, const int, const int, const int,
                       const int, const char*, const int);
extern void cif_to_pdb(const char*, const char*, const char*, const int, const int, const int, const int, const int,
                       const int, const char*, const int);
extern void cif_to_cif(const char*, const char*, const char*, const int, const int, const int, const int, const int,
                       const int, const int, const int, const int, const int, const int, const int,
                       const int, const char*, const int, const int, const int);
extern void pdb_to_encapsulated_cif(const char*, const char*, const char*, const int, const int, const int);
extern void fractional_to_orthogonal(const char*, const char*, const char*);
extern void fractional_to_orthogonal(const char*, const char*, const char*, const int);
extern void orthogonal_to_fractional(const char*, const char*, const char*, const int);
extern void generate_sym_strands_NDB(const char*, const char*, const char*, const int);
extern void generate_sym_strands_CIF(const char*, const char*, const char*, const int);
extern void generate_ncs_strands_NDB(const char*, const char*, const char*, const int);
extern void generate_ncs_strands_CIF(const char*, const char*, const char*, const int);
extern void restraints_correspondences_NDB(const char*, const char*, const char*);
extern void restraints_correspondences_CIF(const char*, const char*, const char*, const int);
extern void remove_hydrogen_NDB(const char*, const char*, const char*, const int);
extern void remove_hydrogen_CIF(const char*, const char*, const char*, const int);
extern void remove_Q_atoms_CIF(const char*, const char*, const char*, const int);
extern void correction_chirality_NDB(const char*, const char*, const char*, const int);
extern void correction_chirality_CIF(const char*, const char*, const char*, const int);
extern void renumber_pdb_number_CIF(const char*, const char*, const char*);
extern void delete_atoms_NDB(const char*, const char*, const char*, const char*, const int);
extern void delete_atoms_CIF(const char*, const char*, const char*, const char*, const int);
extern void insert_atoms_NDB(const char*, const char*, const char*, const char*, const int);
extern void insert_atoms_CIF(const char*, const char*, const char*, const char*, const int);
extern void delete_residues_NDB(const char*, const char*, const char*, const char*, const int);
extern void delete_residues_CIF(const char*, const char*, const char*, const char*, const int);
extern void insert_residues_NDB(const char*, const char*, const char*, const char*, const int);
extern void insert_residues_CIF(const char*, const char*, const char*, const char*, const int);
extern void merge_remarks_NDB(const char*, const char*, const char*, const char*, const int);
extern void merge_remarks_CIF(const char*, const char*, const char*, const char*, const int);
extern void merge_coordinates_NDB(const char*, const char*, const char*, const char*, const int);
extern void merge_coordinates_CIF(const char*, const char*, const char*, const char*, const int);
extern void moving_waters_NDB(const char*, const char*, const char*, const int);
extern void moving_waters_CIF(const char*, const char*, const char*, const int);
extern void switch_residue_names_NDB(const char*, const char*, const char*, const int);
extern void switch_residue_names_CIF(const char*, const char*, const char*, const int);
extern void change_coordinates_symm_CIF(const char*, const char*, const char*, const char*);
extern void change_coordinates_non_symm_CIF(const char*, const char*, const char*, const char*);
extern void get_virus_matrix_from_remark_350(const char*, const char*, const char*, const int);
extern void update_hydrogen_nomenclature(const char*, const char*, const char*);
extern void switch_conect_from_old_to_new();
extern void switch_conect_from_new_to_old();
extern void check_file(const char*, const char*);
extern void classification(const char*, const char*, FILE*, FILE*);
extern void check_file(const char*, const char*, FILE*, const int);
extern void cif_layer1_to_layer2(const char*, const char*, const char*);
extern void merge_waters_CIF(const char*, const char*, const char*);
extern void replace_residues_NDB(const char*, const char*, const char*, const char*, const int);
extern void replace_residues_CIF(const char*, const char*, const char*, const char*);
extern void search_complexity(const char*, const char*);
extern void cif_to_biol_unit_pdb(const char*, const char*, const char*, const int, const int);
extern void exchange_cif_to_internal_cif(const char*, const char*, const char*);
extern void cif_to_packing_pdb(const char*, const char*, const char*, const int);
extern void get_one_letter_code_from_coordinates(const char*, const char*, const char*);
extern void separation_string_base_word(char *old_string, char *str1, char *str2, const char *word);
extern void get_hpub_letter(const char *filename);

#endif
