mdcore
0.1.5
|
00001 /******************************************************************************* 00002 * This file is part of mdcore. 00003 * Coypright (c) 2010 Pedro Gonnet (pedro.gonnet@durham.ac.uk) 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU Lesser General Public License as published 00007 * by the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public License 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 * 00018 ******************************************************************************/ 00019 00020 /* angle error codes */ 00021 #define angle_err_ok 0 00022 #define angle_err_null -1 00023 #define angle_err_malloc -2 00024 00025 00027 extern int angle_err; 00028 00029 00031 struct angle { 00032 00033 /* ids of particles involved */ 00034 int i, j, k; 00035 00036 /* id of the potential. */ 00037 int pid; 00038 00039 }; 00040 00041 00042 /* associated functions */ 00043 int angle_eval ( struct angle *a , int N , struct engine *e , double *epot_out ); 00044 int angle_evalf ( struct angle *a , int N , struct engine *e , FPTYPE *f , double *epot_out ); 00045 int angle_eval_mod ( struct angle *a , int N , int nr_threads , int cid_mod , struct engine *e , double *epot_out ); 00046 int angle_eval_div ( struct angle *a , int N , int nr_threads , int cid_div , struct engine *e , double *epot_out );