mdcore  0.1.5
/home/pedro/work/mdcore/src/rigid.h
Go to the documentation of this file.
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 /* rigid error codes */
00021 #define rigid_err_ok                    0
00022 #define rigid_err_null                  -1
00023 #define rigid_err_malloc                -2
00024 
00025 
00026 /* Some constants. */
00027 #define rigid_maxparts                  10
00028 #define rigid_maxconstr                 (3*rigid_maxparts)
00029 #define rigid_maxiter                   50
00030 
00031 
00033 extern int rigid_err;
00034 
00035 
00037 struct rigid {
00038 
00040     int nr_parts;
00041 
00043     int parts[ rigid_maxparts ];
00044     
00046     int nr_constr;
00047     
00049     struct {
00050         int i, j;
00051         double d2;
00052         } constr[ rigid_maxconstr ];
00053     
00054     };
00055     
00056 
00057 /* associated functions */
00058 int rigid_eval_shake ( struct rigid *r , int N , struct engine *e );
 All Data Structures Files Functions Variables Typedefs Enumerator Defines