lib/AtomicFeaturizer.cpp
// featurizer for single eta & single selected_neighbor_atomname (if selected)
featurizer for single eta & single selected_neighbor_atomname (if selected)
featurizer for single eta & single selected_neighbor_atomname ( if selected )
bool AtomicFeaturizer::featurizeEta(const vector<vector<Atom*> >& neighbors,
                                    const vector<vector<double> >& pdin,
                                    double cutoff, double eta, string ngh_select,
                                    Molecule* selMol,
                                    vector<double>& features){
  int natom = selMol->getNAtom();
  double featureOneAtm;
  Atom* ai;
  string atmname;
  features.clear();
  for (unsigned int i=0; i < natom; i++){
    ai = selMol->getAtom(i);
    atmname = ai->getAtmName();
    featureOneAtm = featurizeEtAtm(neighbors, pdin, cutoff, eta, ai, ngh_select);
    features.push_back(featureOneAtm);
  }
  return 0;
}
bool AtomicFeaturizer :: featurizeEta ( const vector < vector < Atom * > > & neighbors , const vector < vector < double > > & pdin , double cutoff , double eta , string ngh_select , Molecule * selMol , vector < double > & features ) { int natom = selMol -> getNAtom ( ) ; double featureOneAtm ; Atom * ai ; string atmname ; features . clear ( ) ; for ( unsigned int i = 0 ; i < natom ; i ++ ) { ai = selMol -> getAtom ( i ) ; atmname = ai -> getAtmName ( ) ; featureOneAtm = featurizeEtAtm ( neighbors , pdin , cutoff , eta , ai , ngh_select ) ; features . push_back ( featureOneAtm ) ; } return 0 ; }
featurizer for single eta & single selected_neighbor_atomname (if selected)
featurizer for single eta & single selected_neighbor_atomname ( if selected )
// ngh_select: NEIGHBOR atmname to be considered to calculate features; //             leave empty when not specified, all atoms will be taken into consideration // initialize feature vectors // initialize parameters // get feature of each atom and push back into the features vector