![]() |
ESPResSo 3.2.0-11-g9950804-git
Extensible Simulation Package for Soft Matter Research
|
00001 /* 00002 Copyright (C) 2010,2011,2012,2013 The ESPResSo project 00003 Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 00004 Max-Planck-Institute for Polymer Research, Theory Group 00005 00006 This file is part of ESPResSo. 00007 00008 ESPResSo is free software: you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation, either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 ESPResSo is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 /** \file angle.c 00022 * 00023 * Implementation of \ref angle.h 00024 */ 00025 #include "angle.h" 00026 00027 #ifdef BOND_ANGLE_OLD 00028 #include "communication.h" 00029 00030 /** set parameters for the angle potential. 00031 00032 \todo The type of the angle potential 00033 is chosen via config.h and cannot be changed at runtime. 00034 */ 00035 int angle_set_params(int bond_type, double bend, double phi0) 00036 { 00037 if(bond_type < 0) 00038 return ES_ERROR; 00039 00040 make_bond_type_exist(bond_type); 00041 00042 bonded_ia_params[bond_type].p.angle.bend = bend; 00043 bonded_ia_params[bond_type].p.angle.phi0 = phi0; 00044 #ifdef BOND_ANGLE_COSINE 00045 bonded_ia_params[bond_type].p.angle.cos_phi0 = cos(phi0); 00046 bonded_ia_params[bond_type].p.angle.sin_phi0 = sin(phi0); 00047 #endif 00048 #ifdef BOND_ANGLE_COSSQUARE 00049 bonded_ia_params[bond_type].p.angle.cos_phi0 = cos(phi0); 00050 #endif 00051 bonded_ia_params[bond_type].type = BONDED_IA_ANGLE_OLD; 00052 bonded_ia_params[bond_type].num = 2; 00053 00054 /* broadcast interaction parameters */ 00055 mpi_bcast_ia_params(bond_type, -1); 00056 00057 return ES_OK; 00058 } 00059 00060 #endif 00061
1.7.5.1