<commit_before>//
//  Copyright (C) 2001-2010 <NAME> and Rational Discovery LLC
//
//   @@ All Rights Reserved @@
//  This file is part of the RDKit.
//  The contents are covered by the terms of the BSD license
//  which is included in the file license.txt, found at the root
//  of the RDKit source tree.
//
/*! \file Atom.h

  \brief Defines the Atom class and associated typedefs

*/  
#ifndef _RD_ATOM_H
#define _RD_ATOM_H

// Std stuff
#include <iostream>
#include <boost/foreach.hpp>

// ours
#include <Query/QueryObjects.h>
#include <RDGeneral/types.h>
#include <RDGeneral/Dict.h>

namespace RDKit{
  class ROMol;
  class RWMol;
  class AtomMonomerInfo;

  //! The class for representing atoms
  /*!

    <b>Notes:</b>
      - many of the methods of Atom require that the Atom be associated
        with a molecule (an ROMol).
      - each Atom maintains a Dict of \c properties:  
          - Each \c property is keyed by name and can store an
	    arbitrary type.
	  - \c Properties can be marked as \c calculated, in which case
	    they will be cleared when the \c clearComputedProps() method
	    is called.
          - Because they have no impact upon chemistry, all \c property
	    operations are \c const, this allows extra flexibility for
	    clients who need to store extra data on Atom objects.
      - Atom objects are lazy about computing their explicit and implicit valence
        values.  These will not be computed until their values are requested.

    <b>Chirality:</b>

    The chirality of an Atom is determined by two things:
      - its \c chiralTag
      - the input order of its bonds (see note below for handling of
        implicit Hs)

    For tetrahedral coordination, the \c chiralTag tells you what
    direction you have to rotate to get from bond 2 to bond 3 while looking
    down bond 1. This is pretty much identical to the SMILES representation of
    chirality.

    NOTE: if an atom has an implicit H, the bond to that H is considered to be
    at the *end* of the list of other bonds.

  */
  class Atom {
    friend class MolPickler; //!< the pickler needs access to our privates
    friend class ROMol;
    friend class RWMol;
  public:

    typedef boost::shared_ptr<Atom>    ATOM_SPTR;
    typedef boost::shared_ptr<const Atom>    C_ATOM_SPTR;
    // FIX: grn...
    typedef Queries::Query<int,Atom const *,true> QUERYATOM_QUERY;

    //! store hybridization
    typedef enum {
      UNSPECIFIED=0, //!< hybridization that hasn't been specified
      S,
      SP,
      SP2,
      SP3,
      SP3D,
      SP3D2,
      OTHER          //!< unrecognized hybridization
    } HybridizationType;

    //! store type of chirality
    typedef enum {
      CHI_UNSPECIFIED=0,  //!< chirality that hasn't been specified
      CHI_TETRAHEDRAL_CW, //!< tetrahedral: clockwise rotation (SMILES @@)
      CHI_TETRAHEDRAL_CCW,//!< tetrahedral: counter-clockwise rotation (SMILES @)
      CHI_OTHER           //!< some unrecognized type of chirality
    } ChiralType;

    Atom();
    //! construct an Atom with a particular atomic number
    explicit Atom(unsigned int num);
    //! construct an Atom with a particular symbol (looked up in the PeriodicTable)
    explicit Atom(std::string what);
    Atom(const Atom & other);
    virtual ~Atom();

    //! makes a copy of this Atom and returns a pointer to it.
    /*!
      <b>Note:</b> the caller is responsible for <tt>delete</tt>ing the result
    */
    virtual Atom *copy() const;

    //! returns our atomic number
    int getAtomicNum() const { return d_atomicNum; };
    //! sets our atomic number
    void setAtomicNum(int newNum) { d_atomicNum = newNum; };

    //! returns our symbol (determined by our atomic number)<commit_msg>proper quoting in comment for doxygen<commit_after>//
//  Copyright (C) 2001-2010 <NAME> and Rational Discovery LLC
//
//   @@ All Rights Reserved @@
//  This file is part of the RDKit.
//  The contents are covered by the terms of the BSD license
//  which is included in the file license.txt, found at the root
//  of the RDKit source tree.
//
/*! \file Atom.h

  \brief Defines the Atom class and associated typedefs

*/  
#ifndef _RD_ATOM_H
#define _RD_ATOM_H

// Std stuff
#include <iostream>
#include <boost/foreach.hpp>

// ours
#include <Query/QueryObjects.h>
#include <RDGeneral/types.h>
#include <RDGeneral/Dict.h>

namespace RDKit{
  class ROMol;
  class RWMol;
  class AtomMonomerInfo;

  //! The class for representing atoms
  /*!

    <b>Notes:</b>
      - many of the methods of Atom require that the Atom be associated
        with a molecule (an ROMol).
      - each Atom maintains a Dict of \c properties:  
          - Each \c property is keyed by name and can store an
	    arbitrary type.
	  - \c Properties can be marked as \c calculated, in which case
	    they will be cleared when the \c clearComputedProps() method
	    is called.
          - Because they have no impact upon chemistry, all \c property
	    operations are \c const, this allows extra flexibility for
	    clients who need to store extra data on Atom objects.
      - Atom objects are lazy about computing their explicit and implicit valence
        values.  These will not be computed until their values are requested.

    <b>Chirality:</b>

    The chirality of an Atom is determined by two things:
      - its \c chiralTag
      - the input order of its bonds (see note below for handling of
        implicit Hs)

    For tetrahedral coordination, the \c chiralTag tells you what
    direction you have to rotate to get from bond 2 to bond 3 while looking
    down bond 1. This is pretty much identical to the SMILES representation of
    chirality.

    NOTE: if an atom has an implicit H, the bond to that H is considered to be
    at the *end* of the list of other bonds.

  */
  class Atom {
    friend class MolPickler; //!< the pickler needs access to our privates
    friend class ROMol;
    friend class RWMol;
  public:

    typedef boost::shared_ptr<Atom>    ATOM_SPTR;
    typedef boost::shared_ptr<const Atom>    C_ATOM_SPTR;
    // FIX: grn...
    typedef Queries::Query<int,Atom const *,true> QUERYATOM_QUERY;

    //! store hybridization
    typedef enum {
      UNSPECIFIED=0, //!< hybridization that hasn't been specified
      S,
      SP,
      SP2,
      SP3,
      SP3D,
      SP3D2,
      OTHER          //!< unrecognized hybridization
    } HybridizationType;

    //! store type of chirality
    typedef enum {
      CHI_UNSPECIFIED=0,  //!< chirality that hasn't been specified
      CHI_TETRAHEDRAL_CW, //!< tetrahedral: clockwise rotation (SMILES \@\@)
      CHI_TETRAHEDRAL_CCW,//!< tetrahedral: counter-clockwise rotation (SMILES \@)
      CHI_OTHER           //!< some unrecognized type of chirality
    } ChiralType;

    Atom();
    //! construct an Atom with a particular atomic number
    explicit Atom(unsigned int num);
    //! construct an Atom with a particular symbol (looked up in the PeriodicTable)
    explicit Atom(std::string what);
    Atom(const Atom & other);
    virtual ~Atom();

    //! makes a copy of this Atom and returns a pointer to it.
    /*!
      <b>Note:</b> the caller is responsible for <tt>delete</tt>ing the result
    */
    virtual Atom *copy() const;

    //! returns our atomic number
    int getAtomicNum() const { return d_atomicNum; };
    //! sets our atomic number
    void setAtomicNum(int newNum) { d_atomicNum = newNum; };

    //! returns our symbol (determined by our atomic number)
{'fraction_non_alphanumeric': 0.08191901643725778, 'fraction_numerical': 0.004810904717359348, 'mean_word_length': 2.6207063376874697, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5132248', 'n_tokens_mistral': 2322, 'n_tokens_neox': 2180, 'n_words': 916}