ESPResSo 3.2.0-11-g9950804-git
Extensible Simulation Package for Soft Matter Research
soft_sphere.c
Go to the documentation of this file.
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 soft_sphere.c
00022  *
00023  *  Implementation of \ref soft_sphere.h
00024  */
00025 #include "soft_sphere.h"
00026 #include "communication.h"
00027 
00028 #ifdef SOFT_SPHERE
00029 
00030 int soft_sphere_set_params(int part_type_a, int part_type_b,
00031                            double a, double n, double cut, double offset)
00032 {
00033   IA_parameters *data = get_ia_param_safe(part_type_a, part_type_b);
00034 
00035   if (!data) return ES_ERROR;
00036 
00037   data->soft_a      = a;
00038   data->soft_n      = n;
00039   data->soft_cut    = cut;
00040   data->soft_offset = offset;
00041  
00042   /* broadcast interaction parameters */
00043   mpi_bcast_ia_params(part_type_a, part_type_b);
00044 
00045   return ES_OK;
00046 }
00047 
00048 #endif
00049