Ignore:
Timestamp:
Oct 3, 2016, 6:03:21 PM (9 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Fix_FitPotential_needs_atomicnumbers
Children:
fc08c7
Parents:
36f3d3
Message:

Added bonded flag to argument_t.

Location:
src/FunctionApproximation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/FunctionApproximation/FunctionArgument.cpp

    r36f3d3 rfdd789  
    4545  ost << "[(" << arg.indices.first << "," << arg.indices.second
    4646      << "), q(   " << arg.types.first << "," << arg.types.second << "),"
     47      << "bonded(" << (arg.bonded ? "true" : "false") << "),"
    4748      << "r=" << arg.distance;
    4849  return ost;
  • src/FunctionApproximation/FunctionArgument.hpp

    r36f3d3 rfdd789  
    3737  argument_t() :
    3838    distance(0.),
    39     globalid(-1)
     39    globalid(-1),
     40    bonded(false)
    4041  {}
    4142
     
    4546   *
    4647   * \param _distance distance argument
     48   * \param _bonded is this a distance between bonded (true) or nonbonded (false) atoms
    4749   */
    48   argument_t(const double &_distance) :
     50  argument_t(const double &_distance, const bool _bonded = false) :
    4951    SubgraphEdge(
    5052      indices_t( std::make_pair(0,1) ),
    5153      types_t( std::make_pair(0,0) )),
    5254    distance(_distance),
    53     globalid(-1)
     55    globalid(-1),
     56    bonded(_bonded)
    5457  {}
    5558
     
    5861   * \param _indices pair of indices associated with the \a _distance
    5962   * \param _distance distance argument
     63   * \param _bonded is this a distance between bonded (true) or nonbonded (false) atoms
    6064   */
    61   argument_t(const indices_t &_indices, const double &_distance) :
     65  argument_t(const indices_t &_indices, const double &_distance, const bool _bonded = false) :
    6266    SubgraphEdge(
    6367      indices,
    6468      types_t( std::make_pair(0,0) )),
    6569    distance(_distance),
    66     globalid(-1)
     70    globalid(-1),
     71    bonded(_bonded)
    6772  {}
    6873
     
    7277   * \param _types pair of particle type
    7378   * \param _distance distance argument
     79   * \param _bonded is this a distance between bonded (true) or nonbonded (false) atoms
    7480   */
    75   argument_t(const indices_t &_indices, const types_t &_types, const double &_distance) :
     81  argument_t(
     82      const indices_t &_indices,
     83      const types_t &_types,
     84      const double &_distance,
     85      const bool _bonded = false) :
    7686    SubgraphEdge(_indices, _types),
    7787    distance(_distance),
    78     globalid(-1)
     88    globalid(-1),
     89    bonded(_bonded)
    7990  {}
    8091
     
    109120  //!> global id refers to some global index, e.g. the configuration id in training set
    110121  size_t globalid;
     122  //!> states whether this argument is between bonded (true) or nonbonded (false) atoms
     123  bool bonded;
    111124};
    112125
Note: See TracChangeset for help on using the changeset viewer.