Unverified Commit ae329acd authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #2255 from akohlmey/charset-cleanup

Charset cleanup in (most) source files
parents 41535d8d 477b97f2
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -9,8 +9,6 @@
 *
 *
 *****************************************************************************/
/*r @file vector_3.h @brief      
*/ 

# ifndef CVECTOR_3A_H
# define CVECTOR_3A_H
+16 −67
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@

 *
*******************************************************************************/
/*r @file vector_3.h @brief     
/*r @file vector_3.h
*/

# ifndef VECTOR_3_H
@@ -92,7 +92,6 @@
# endif

# ifndef fmod
//r       
# define fmod(a,b)  ((a)-((long)((a)/(b))*(b)))
# endif

@@ -104,8 +103,6 @@ typedef double vec_type;
typedef float vec_type;
#endif

//e "infinitely" large number in Vector_3 sense
//r " "    Vector_3
//# ifndef SINGLE_PRECISION
//# define VEC_INFTY 1.e20
//# else
@@ -113,8 +110,6 @@ typedef float vec_type;
//# endif
#define VEC_INFTY numeric_limits<vec_type>::max()

//e "infinitely" small number in Vector_3 sense (used for vector comparisons)
//r " "    Vector_3 (  )
//# ifndef SINGLE_PRECISION
//# define VEC_ZERO 1.e-20
//# else
@@ -122,7 +117,6 @@ typedef float vec_type;
//# endif
#define VEC_ZERO 512*numeric_limits<vec_type>::epsilon()

//r N-   T,    
template <class T, const int N=3>
struct Vector_Nt {
  typedef T value_type;
@@ -160,14 +154,12 @@ struct Vector_Nt {
    for (int i=0; i<N; i++) v[i]=v1[i];
  }

  //r     it
  template <class A>
  void copy_to(A *beg) const {
    for (int i=0; i<N; i++, ++beg)
      *beg=v[i];
  }

  //r   
  inline T& operator[](int i) const { return (T&)v[i]; };


@@ -177,14 +169,12 @@ struct Vector_Nt {
    return *this;
  }

  //r     a.
  inline Vector_Nt& operator=(const T &a){
    for (int i=0; i<N; i++)
      v[i]=a;
    return *this;
  };

  //r .      VEC_ZERO   
  inline bool operator==(const Vector_Nt &vect) const{
    for (int i=0; i<N ;i++)
      if(fabs(v[i]-vect.v[i])>VEC_ZERO)return false;
@@ -209,7 +199,6 @@ struct Vector_Nt {
    return result;
  }

  //r   
  inline T operator*(const Vector_Nt& vect) const {
    T result=0;
    for (int i=0; i<N; i++)
@@ -217,7 +206,6 @@ struct Vector_Nt {
    return result;
  }

  //r    
  inline Vector_Nt operator*(const T &coeff) const {
    Vector_Nt result;
    for (int i=0; i<N; i++)
@@ -226,7 +214,6 @@ struct Vector_Nt {
  }

  //e vector multiplication (N=3 only)
  //r  
  inline Vector_Nt operator%(const Vector_Nt &r) const{ //reserved for N specializations
    if(N==3){
      return Vector_Nt(v[1]*r.v[2]-v[2]*r.v[1],v[2]*r.v[0]-v[0]*r.v[2],v[0]*r.v[1]-v[1]*r.v[0]);
@@ -234,10 +221,8 @@ struct Vector_Nt {
    return *this;
  }

  //r     (  ).
 //  friend Vector_Nt operator*(T coeff,const Vector_Nt& vec);

  //r    
  inline Vector_Nt operator/(const T &coeff) const {
    Vector_Nt result;
    for (int i=0; i<N; i++)
@@ -245,7 +230,6 @@ struct Vector_Nt {
    return result;
  }

  //r    -1
  inline Vector_Nt operator-() const {
    Vector_Nt r;
    for (int i=0; i<N; i++)
@@ -253,35 +237,30 @@ struct Vector_Nt {
    return r;
  }

  //r   
  inline Vector_Nt& operator+=(const Vector_Nt &vect){
    for (int i=0; i<N; i++)
      v[i]+=vect.v[i];
    return *this;
  }

  //r   
  inline Vector_Nt& operator-=(const Vector_Nt &vect){
    for (int i=0; i<N; i++)
      v[i]-=vect.v[i];
    return *this;
  }

  //r     
  inline Vector_Nt& operator*=(const T &coeff){
    for (int i=0; i<N; i++)
      v[i]*=coeff;
    return *this;
  }

  //r     
  inline Vector_Nt& operator/=(const T &coeff){
    for (int i=0; i<N; i++)
      v[i]/=coeff;
    return *this;
  }

  //r   
  T norm2() const {
    T result=0;
    for (int i=0; i<N; i++)
@@ -289,12 +268,10 @@ struct Vector_Nt {
    return result;
  }

  //r  
  T norm() const {
    return sqrt(norm2());
  }

  //r      (   norm()  newnorm). 
  T normalize(T newnorm=1.){
    T norm=this->norm();
    if(norm>=VEC_ZERO){
@@ -333,14 +310,6 @@ struct Vector_Nt {
  //e assumes that each coordinate absolute value is in the range [0,cell[i])
  //e returned vector is in the range [-cell[i]/2,cell[i]/2)
  //e flags indicate the periodicity in specific directions: 0x1 for X, 0x2 for Y, 0x4 for Z
  //r     
  /*r ,       -   , 
     ,   rcell,     
     .  *this   ,   *this.\n
  ,  *this    3*3      ,    
  *this   .\n
  ,   . 
  */ 
  Vector_Nt rcell1(const Vector_Nt &cell,int flags=0xffff) const{
    Vector_Nt ret(*this);
    int i;
@@ -378,9 +347,6 @@ struct Vector_Nt {

  //e reduction to elementary cell [0, cell[i]) (FOR REDUCTION TO ELEMENTARY CELL)
  //e flags indicate the periodicity in specific directions: 0x1 for X, 0x2 for Y, 0x4 for Z
  //r   ,   rcell1,      *this     .
  /*r       ,   .    -  
         */ 
  Vector_Nt rcell(const Vector_Nt &cell, int flags=0xffff) const {
    Vector_Nt ret(*this);
    for (int i=0, flag=1; i<N; i++, flag<<=1) {
@@ -408,7 +374,6 @@ struct Vector_Nt {
  }


  //r          ind 
  T maxcoord(int *ind=NULL) const {
    int im=0;
    T vv=v[0];
@@ -452,7 +417,6 @@ struct Vector_Nt {
  }


  //r          ind 
  T mincoord(int *ind=NULL) const {
    int im=0;
    T vv=v[0];
@@ -466,7 +430,6 @@ struct Vector_Nt {
    return vv;
  }

  //r       ,   (x,y,z)\\n
  void print() const{
    cout<< "(";
    for(int i=0;i<N;i++){
@@ -515,25 +478,18 @@ class Vector_N: public Vector_Nt<vec_type, N>{


//e finds the maximum distance between vector pairs
//r      va1[i], va2[i], i=1..n
/*r @param va1 -  Vector_3[n]
    @param n -   va1  va2
*/
vec_type dist_max(Vector_3 *va1,Vector_3 *va2,int n);

//e finds average distance between vector pairs
//r      va1[i], va2[i], i=1..n
vec_type dist_av(Vector_3 *va1,Vector_3 *va2,int n);

//e finds the average difference norm between two vector sets of the same length
/*e optionally gives the indexes for maximal and minimal difference
 va2 can be NULL, then the norm of va1 is used */

//r     va1[i]  va2[i],  ,  , ,    min  max 
vec_type diff_av(Vector_3 *va1,Vector_3 *va2,int n, int *minind=0, int *maxind=0);

//e finds suitable perpendicular to a vector
//r     vAB
Vector_3 FindPerp(const Vector_3 &vAB);


@@ -551,13 +507,6 @@ Vector_3 GetIScopei(const Vector_3 *varr,int *indarr,int n,Vector_3* box_min,Vec
// neue Funktionen

//e clears vector array with optional integer index
//r   ,    
/*r 
  Vector_3 vec[]  n .  ind==NULL,  
  n .  ind!=NULL,   i=0..n-1
 vec[ind[i]]
. @ref indexed_calculations.
*/ 
void clear_vecarri(int n,Vector_3 *vec, int *ind=0);

//e reflects the vector ini+dir*t+0.5*force*t^2 to be inside a box limited by 0 and box sizes
+2 −2
Original line number Diff line number Diff line
@@ -1442,7 +1442,7 @@ public:

/// \brief Colvar component: alternative path collective variable using geometry, variable s
/// For more information see https://plumed.github.io/doc-v2.5/user-doc/html/_p_a_t_h.html
/// Díaz Leines, G.; Ensing, B. Path Finding on High-Dimensional Free Energy Landscapes. Phys. Rev. Lett. 2012, 109 (2), 020601. https://doi.org/10.1103/PhysRevLett.109.020601.
/// Diaz Leines, G.; Ensing, B. Path Finding on High-Dimensional Free Energy Landscapes. Phys. Rev. Lett. 2012, 109 (2), 020601. https://doi.org/10.1103/PhysRevLett.109.020601.
class colvar::gspath
  : public colvar::CartesianBasedPath, public GeometricPathCV::GeometricPathBase<cvm::atom_pos, cvm::real, GeometricPathCV::path_sz::S>
{
@@ -1534,7 +1534,7 @@ public:
/// \brief Colvar component: alternative path collective variable using geometry, variable s
/// Allow any combination of existing (scalar) CVs
/// For more information see https://plumed.github.io/doc-v2.5/user-doc/html/_p_a_t_h.html
/// Díaz Leines, G.; Ensing, B. Path Finding on High-Dimensional Free Energy Landscapes. Phys. Rev. Lett. 2012, 109 (2), 020601. https://doi.org/10.1103/PhysRevLett.109.020601.
/// Diaz Leines, G.; Ensing, B. Path Finding on High-Dimensional Free Energy Landscapes. Phys. Rev. Lett. 2012, 109 (2), 020601. https://doi.org/10.1103/PhysRevLett.109.020601.
class colvar::gspathCV
  : public colvar::CVBasedPath, public GeometricPathCV::GeometricPathBase<colvarvalue, cvm::real, GeometricPathCV::path_sz::S>
{
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ class Soft : public BaseAtomic<numtyp, acctyp> {
  /// Special LJ values
  UCL_D_Vec<numtyp> sp_lj;

  /// If atom type constants fit in shared memory, use fast kßernels
  /// If atom type constants fit in shared memory, use fast kernels
  bool shared_types;

  /// Number of atom types
+29 −29

File changed.

Contains only whitespace changes.

+21 −21

File changed.

Contains only whitespace changes.

+35 −35

File changed.

Contains only whitespace changes.

+48 −48

File changed.

Contains only whitespace changes.

+18 −18

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+10 −10

File changed.

Contains only whitespace changes.

+13 −13

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+10 −10

File changed.

Contains only whitespace changes.

+18 −18

File changed.

Contains only whitespace changes.

+428 −428

File changed.

Contains only whitespace changes.

+19 −19

File changed.

Contains only whitespace changes.

+39 −39

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+99 −99

File changed.

Contains only whitespace changes.

+218 −218

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+20 −20

File changed.

Contains only whitespace changes.

+5 −5

File changed.

Contains only whitespace changes.

+13 −13

File changed.

Contains only whitespace changes.

+6 −6

File changed.

Contains only whitespace changes.

+8 −8

File changed.

Contains only whitespace changes.

+68 −68

File changed.

Contains only whitespace changes.

+47 −47

File changed.

Contains only whitespace changes.

+5 −5

File changed.

Contains only whitespace changes.

Loading