This file is indexed.

/usr/include/ghemical/geomopt.h is in libghemical-dev 3.0.0-4.1build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
// GEOMOPT.H : geometry optimization classes.

// Copyright (C) 1998 Tommi Hassinen.

// This package is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.

// This package is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this package; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

/*################################################################################################*/

#ifndef GEOMOPT_H
#define GEOMOPT_H

class geomopt_param;

class geomopt;

/*################################################################################################*/

#include "engine.h"
#include "eng1_qm.h"

#include "conjgrad.h"

/*################################################################################################*/

class geomopt_param
{
	protected:
	
	bool confirm;		// for GUI only...
	
	public:
	
	bool enable_nsteps;
	i32s treshold_nsteps;
	
	bool enable_grad;
	f64 treshold_grad;
	
	bool enable_delta_e;
	f64 treshold_delta_e;
	
	public:
	
	geomopt_param(setup * su)
	{
		confirm = false;
		
	// set the defaults...
	// ^^^^^^^^^^^^^^^^^^^
		
		enable_nsteps = true;
		treshold_nsteps = 2500;
	setup1_qm * suqm = dynamic_cast<setup1_qm *>(su);
	if (suqm != NULL) treshold_nsteps = 500;		// override...
		
		enable_grad = true;
		treshold_grad = 1.0e-3;
		
		enable_delta_e = false;
		treshold_delta_e = 1.0e-7;
	}
	
	~geomopt_param(void) { }
	
	bool GetConfirm(void) { return confirm; }
	void Confirm(void) { confirm = true; }
};

/*################################################################################################*/

/// A geometry optimization class.

class geomopt : public conjugate_gradient
{
	protected:
	
	engine * eng;
	
	public:
	
	geomopt(engine *, i32s, f64, f64);
	~geomopt(void);
	
	f64 GetValue(void);		// virtual
	f64 GetGradient(void);		// virtual
};

/*################################################################################################*/

#endif	// GEOMOPT_H

// eof