/*
FILE:     remark.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 _REMARK_H_
#define _REMARK_H_

#define  NAT                               0
#define  GEN                               1
#define  SYN                               2

#define PDB_REMARK_GENERAL                 1
#define PDB_REMARK_R_VALUE                 2
#define PDB_REMARK_NNNMMM_SYMOP            3
#define PDB_REMARK_XYZT                    4

#define PDB_REMARK_LEFT_JUSTIFIED          1
#define PDB_REMARK_RIGHT_JUSTIFIED         2

#define Num_Remark_3_prolsq_old           39
#define Num_Remark_3_nuclsq_old           33
#define Num_Remark_3_shelx_old             7 
#define Num_Remark_3_tnt_old              10
#define Num_Remark_3_xplor_old            38

#define Num_Remark_3_1                     3
#define Num_Remark_3_2                     5
#define Num_Remark_3_3                     2
#define Num_Remark_3_NMR                   5
#define Num_Remark_3_General               6
#define Num_Remark_3_Fit_Agreement         7
#define Num_Remark_3_BValue               10
#define Num_Remark_3_ESD                   4
#define Num_Remark_3_ESU                   5
#define Num_Remark_3_AtomCount             5
#define Num_Remark_3_Isotropic             5
#define Num_Remark_3_Solvent               4
#define Num_Remark_3_XPLOR                 8
#define Num_Remark_3_CNS                   7
#define Num_Remark_3_CNS_Mixed             9
#define Num_Remark_3_Cryo_Em              23
#define Num_Remark_3_XPLOR_CNS_Fit         8
#define Num_Remark_3_XPLOR_CNS_Bin        11
#define Num_Remark_3_XPLOR_CNS_Corss       3
#define Num_Remark_3_XPLOR_CNS_RMSD        5
#define Num_Remark_3_XPlor1                3
#define Num_Remark_3_XPlor2                2
#define Num_Remark_3_NUCLSQ_PROLSQ         8
#define Num_Remark_3_Prolsq_RMSD           6
#define Num_Remark_3_Prolsq_Plane          2
#define Num_Remark_3_Prolsq_NonBonded      5
#define Num_Remark_3_Prolsq_Torsion        5
#define Num_Remark_3_Nuclsq_RMSD           6
#define Num_Remark_3_Nuclsq_NonBonded      3
#define Num_Remark_3_Nuclsq_Isotropic      5
#define Num_Remark_3_REFMAC_BIN            9
#define Num_Remark_3_REFMAC_AtomCount      2
#define Num_Remark_3_REFMAC_CORR           3
#define Num_Remark_3_REFMAC_RMSD          26
#define Num_Remark_3_REFMAC_RMSD_X        27
#define Num_Remark_3_REFMAC_ISOTROPIC      6
#define Num_Remark_3_REFMAC_ANISOTROPIC    4
#define Num_Remark_3_REFMAC_NCS            2
#define Num_Remark_3_REFMAC_NCS_GROUP     12
#define Num_Remark_3_REFMAC_TLS            2
#define Num_Remark_3_REFMAC_TLS_GROUP     17
#define Num_Remark_3_REFMAC_BULK           6
#define Num_Remark_3_Shelxl_Refine         7
#define Num_Remark_3_Shelxl_NoCutOff       7
#define Num_Remark_3_Shelxl_4SIG           7
#define Num_Remark_3_Shelxl_Model          6
#define Num_Remark_3_Shelxl_RMSD          11
#define Num_Remark_3_Shelxl_BULK           2
#define Num_Remark_3_Shelxl_STEREO         2
#define Num_Remark_3_General_TNT           8
#define Num_Remark_3_Tnt_RMSD              9
#define Num_Remark_3_Tnt_Restraint         3
#define Num_Remark_4                       1
#define Num_Remark_18                     14
#define Num_Remark_90                      6
#define Num_Remark_100                     3
#define Num_Remark_100_RCSB                2
#define Num_Remark_200                    48
#define Num_Remark_210                    24
#define Num_Remark_215                     5
#define Num_Remark_220                     4
#define Num_Remark_225                     5
#define Num_Remark_230                    44
#define Num_Remark_240                     5
#define Num_Remark_245                    32
#define Num_Remark_247                     6
#define Num_Remark_250                     5
#define Num_Remark_265_2                  22
#define Num_Remark_265_3                   5
#define Num_Remark_265_5                   3
#define Num_Remark_280                     5
#define Num_Remark_290                    17
#define Num_Remark_103                     3
#define Num_Remark_105                     4
#define Num_Remark_106                     4
#define Num_Remark_300                     4
#define Num_Remark_300_Cryo_Em             3
#define Num_Remark_300_Cryo_Em_A           6
#define Num_Remark_300_Cryo_Em_V           8
#define Num_Remark_300_NMR                 4
#define Num_Remark_300_VIRUS               5
#define Num_Remark_350                     7
#define Num_Remark_375                     6
#define Num_Remark_465                     6
#define Num_Remark_470                     5
#define Num_Remark_500_A                   6
#define Num_Remark_500_S                  15
#define Num_Remark_500_NMR                 6
#define Num_Remark_500_BOND               14
#define Num_Remark_500_ANGLE              14
#define Num_Remark_500_TORSION            11
#define Num_Remark_500_NON_CIS             8
#define Num_Remark_525                     8
#define Num_Remark_800                     3

typedef struct remark_field_struct {
  const char  *TokenName;    /* NDB token Name */
  int   FieldId;             /* Field Number corresponding to NdbToken */
  int   FieldStCol;          /* Starting column, 1 will be the start pos of
                              * this column */
  int   FieldType;           /* Field Type, 1:int 2:double 3-:string */
  int   FieldWidth;             
  int   FieldPrec;
  int   FieldJustification;
  const char  *Text;         /* Text to to put, if NDB token Name is not known,
                              * or FieldId = 0 otherwise, the place holder to
                              * tell program what to do */
} REMARK_FIELD;

typedef struct remark_struct {           
   int Remark_No;                       
   int NumField;
   int Special_Treatment; 
   int Multiple_Treatment;
   REMARK_FIELD FieldList[12];
} REMARKS;

typedef struct group_remark_struct {
   int Remarks_No;
   int repeat[20];
   const char *TokenName[20];
   REMARKS *remarks[20];
   int  num_remarks[20];
} GROUP_REMARKS;

typedef struct PDB_Source_Format {
  const char *pdbname;
  const char *NdbTokenName;
  int NdbFieldNo;
  int NdbTokenId;
} PDB_Source_Format;

extern REMARKS Remark_2;
extern REMARKS Remark_2_NMR;
extern REMARKS Remark_3_prolsq_old[];
extern REMARKS Remark_3_xplor_old[];
extern REMARKS Remark_3_nuclsq_old[];
extern REMARKS Remark_3_tnt_old[];
extern REMARKS Remark_3_shelx_old[];
extern REMARKS Remark_3_NMR[];
extern REMARKS Remark_3_Cryo_Em[];
extern REMARKS Remark_4[];
extern REMARKS Remark_18[];
extern REMARKS Remark_90[];
extern REMARKS Remark_100[];
extern REMARKS Remark_100_RCSB[];
extern REMARKS Remark_101;
extern REMARKS Remark_102;
extern REMARKS Remark_103[];
extern REMARKS Remark_104;
extern REMARKS Remark_105[];
extern REMARKS Remark_106[];

extern REMARKS Remark_200[];
extern REMARKS Remark_210[];
extern REMARKS Remark_215[];
extern REMARKS Remark_220[];
extern REMARKS Remark_225[];
extern REMARKS Remark_230[];
extern REMARKS Remark_240[];
extern REMARKS Remark_245[];
extern REMARKS Remark_247[];
extern REMARKS Remark_250[];
extern REMARKS Remark_280[];
extern REMARKS Remark_375[];
extern REMARKS Remark_290[];
extern REMARKS Remark_350[];
extern REMARKS Remark_300[];
extern REMARKS Remark_300_Cryo_Em[];
extern REMARKS Remark_300_NMR[];
extern REMARKS Remark_300_VIRUS[];
extern REMARKS Remark_SYMMA;
extern REMARKS Remark_SYMMA_CHAIN[];
extern REMARKS Remark_465[];
extern REMARKS Remark_470[];
extern REMARKS Remark_500_A[];
extern REMARKS Remark_500_S[];
extern REMARKS Remark_500_NMR[];
extern REMARKS Remark_500_BOND[];
extern REMARKS Remark_500_ANGLE[];
extern REMARKS Remark_500_TORSION[];
extern REMARKS Remark_500_NON_CIS[];
extern REMARKS Remark_525[];
extern REMARKS Remark_800[];
extern REMARKS Remark_900;

extern GROUP_REMARKS *group_remarks[8];
extern GROUP_REMARKS *group_remarks_in[8];
extern GROUP_REMARKS Remark_Cryo_Em_300;
extern GROUP_REMARKS Remark_3_Solution;
extern GROUP_REMARKS Remark_265;

extern PDB_Source_Format PdbSource_Nat[];
extern PDB_Source_Format PdbSource_Gen[];
extern PDB_Source_Format PdbSource_Syn[];
extern PDB_Source_Format PdbSource_All[];

#endif
