#ifndef _NUCLEICACIDATOM_H
#define _NUCLEICACIDATOM_H

#include "Atom.h"


/*
CLASS
   NucleicAcidAtom

KEYWORDS
   Nucleic Acid, RNA, DNA

AUTHORS
   Oranit Dror (mailto: oranit@post.tau.ac.il)

   Copyright: SAMBA group, Tel-Aviv Univ. Israel, 2004.

  OVERVIEW TEXT

USAGE  
*/

class NucleicAcidAtom : public Atom {
public:
  static const NucleicAcidAtom EMPTY_NUCLEIC_ATOM;

 
  // GROUP: Constructors


  ////  
  // A constructor that intiate a NucleicAcidAtom object from an ATOM
  // PDB record 
  NucleicAcidAtom(const char* const PDBrec) : Atom(PDBrec), pairedAtomIndex(-1) {}


  // GROUP: Query

  ////
  // Returns true if the atom is phosphate
  bool isP() const;

  ////
  // Returns true if the atom is phosphate
  bool isO3() const;

  ////
  // Returns true if the atom is a backbone atom
  bool isBackbone() const;


  ////
  // Returns true if the atom belongs to the sugar group of a nucleotide  
  bool isSugarAtom() const;
  

  ////
  // Returns true if the atom belongs to the phosphate group of a
  // nucleotide  
  bool isPhosphateAtom() const;


  ////
  // Returns true if the atom belongs to a nucleotide base
  bool isBaseAtom() const; 

  ////
  // Return the index of the paired atom in the molecule or -1 if the
  // atom is unpaired.
  const int getPairedAtomIndex() const {
    return pairedAtomIndex;
  }

  // GROUP: Setters
  
  ////
  // Sets the index of the paired atom in the molecule or -1 if such an
  // atom does not exist. 
  void setPairedAtomIndex(int index) {
    pairedAtomIndex = index;
  }

private:
  //// 
  // Construct an empty NucleicAcidAtom
  NucleicAcidAtom() : Atom(), pairedAtomIndex(-1) {}

  ////
  // Holds the index of the paired atom in the molecule or -1 if such
  // an atom does not exist 
  int pairedAtomIndex;
};



#endif //_NUCLEICACIDATOM_H

