From 37791bf67add4094040a9b8706450695805bf88f Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Fri, 20 May 2016 18:35:21 +0000 Subject: [PATCH] Minimal changes to trisurf core to permit the trout rbc simulations with eliptical nucleus (optional parameters in tape R_nucleusX, R_nucleusY and R_nucleusZ) were added --- python/tape | 2 src/io.c | 3 src/tape | 16 +- src/neigh_test.c | 65 +++++++++ src/initial_distribution.c | 4 aclocal.m4 | 287 ++++++++++++----------------------------- src/general.h | 6 src/vertexmove.c | 9 + 8 files changed, 180 insertions(+), 212 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 9ecb44e..da47901 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,63 +20,32 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29.1) -dnl -dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. -dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a -dnl configuration script generated by Autoconf, you may include it under -dnl the same distribution terms that you use for the rest of that -dnl program. +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +# +# This program 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 program 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 program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. -dnl PKG_PREREQ(MIN-VERSION) -dnl ----------------------- -dnl Since: 0.29 -dnl -dnl Verify that the version of the pkg-config macros are at least -dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's -dnl installed version of pkg-config, this checks the developer's version -dnl of pkg.m4 when generating configure. -dnl -dnl To ensure that this macro is defined, also add: -dnl m4_ifndef([PKG_PREREQ], -dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) -dnl -dnl See the "Since" comment for each macro you use to see what version -dnl of the macros you require. -m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.1]) -m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, - [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) -])dnl PKG_PREREQ - -dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) -dnl ---------------------------------- -dnl Since: 0.16 -dnl -dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -dnl first found in the path. Checks that the version of pkg-config found -dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is -dnl used since that's the first version where most current features of -dnl pkg-config existed. +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -98,19 +67,18 @@ PKG_CONFIG="" fi fi[]dnl -])dnl PKG_PROG_PKG_CONFIG +])# PKG_PROG_PKG_CONFIG -dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------------------------------- -dnl Since: 0.18 -dnl -dnl Check to see whether a particular set of modules exists. Similar to -dnl PKG_CHECK_MODULES(), but does not set variables or print errors. -dnl -dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -dnl only at the first occurence in configure.ac, so if the first place -dnl it's called might be skipped (such as if it is within an "if", you -dnl have to call PKG_CHECK_EXISTS manually +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ @@ -120,10 +88,8 @@ $3])dnl fi]) -dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -dnl --------------------------------------------- -dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting -dnl pkg_failed based on the result. +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" @@ -135,11 +101,10 @@ else pkg_failed=untried fi[]dnl -])dnl _PKG_CONFIG +])# _PKG_CONFIG -dnl _PKG_SHORT_ERRORS_SUPPORTED -dnl --------------------------- -dnl Internal check to see if pkg-config supports short errors. +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -147,17 +112,19 @@ else _pkg_short_errors_supported=no fi[]dnl -])dnl _PKG_SHORT_ERRORS_SUPPORTED +])# _PKG_SHORT_ERRORS_SUPPORTED -dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl -------------------------------------------------------------- -dnl Since: 0.4.0 -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES might not happen, you should be sure to include an -dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl @@ -211,92 +178,9 @@ AC_MSG_RESULT([yes]) $3 fi[]dnl -])dnl PKG_CHECK_MODULES +])# PKG_CHECK_MODULES - -dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl --------------------------------------------------------------------- -dnl Since: 0.29 -dnl -dnl Checks for existence of MODULES and gathers its build flags with -dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags -dnl and VARIABLE-PREFIX_LIBS from --libs. -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to -dnl include an explicit call to PKG_PROG_PKG_CONFIG in your -dnl configure.ac. -AC_DEFUN([PKG_CHECK_MODULES_STATIC], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -_save_PKG_CONFIG=$PKG_CONFIG -PKG_CONFIG="$PKG_CONFIG --static" -PKG_CHECK_MODULES($@) -PKG_CONFIG=$_save_PKG_CONFIG[]dnl -])dnl PKG_CHECK_MODULES_STATIC - - -dnl PKG_INSTALLDIR([DIRECTORY]) -dnl ------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable pkgconfigdir as the location where a module -dnl should install pkg-config .pc files. By default the directory is -dnl $libdir/pkgconfig, but the default can be changed by passing -dnl DIRECTORY. The user can override through the --with-pkgconfigdir -dnl parameter. -AC_DEFUN([PKG_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([pkgconfigdir], - [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, - [with_pkgconfigdir=]pkg_default) -AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -])dnl PKG_INSTALLDIR - - -dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) -dnl -------------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable noarch_pkgconfigdir as the location where a -dnl module should install arch-independent pkg-config .pc files. By -dnl default the directory is $datadir/pkgconfig, but the default can be -dnl changed by passing DIRECTORY. The user can override through the -dnl --with-noarch-pkgconfigdir parameter. -AC_DEFUN([PKG_NOARCH_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([noarch-pkgconfigdir], - [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, - [with_noarch_pkgconfigdir=]pkg_default) -AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -])dnl PKG_NOARCH_INSTALLDIR - - -dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------- -dnl Since: 0.28 -dnl -dnl Retrieves the value of the pkg-config variable for the given module. -AC_DEFUN([PKG_CHECK_VAR], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl - -_PKG_CONFIG([$1], [variable="][$3]["], [$2]) -AS_VAR_COPY([$1], [pkg_cv_][$1]) - -AS_VAR_IF([$1], [""], [$5], [$4])dnl -])dnl PKG_CHECK_VAR - -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -308,10 +192,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -327,14 +211,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -379,14 +263,15 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -417,7 +302,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -608,7 +493,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -684,7 +569,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -774,8 +659,8 @@ # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -848,11 +733,7 @@ END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. -]) +fi]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -881,7 +762,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -892,7 +773,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then +if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -902,7 +783,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -923,7 +804,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -973,7 +854,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1012,7 +893,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1041,7 +922,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1088,7 +969,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1107,7 +988,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1188,7 +1069,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1248,7 +1129,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1276,7 +1157,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1295,7 +1176,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/python/tape b/python/tape index baaac60..74ebbf0 100644 --- a/python/tape +++ b/python/tape @@ -52,7 +52,7 @@ ####### Program Control ############ #how many MC sweeps between subsequent records of states to disk #200000 -mcsweeps=20 +mcsweeps=200000 #how many initial mcsweeps*inititer MC sweeps before recording to disk? #2 inititer=0 diff --git a/src/general.h b/src/general.h index 547680e..dccee34 100644 --- a/src/general.h +++ b/src/general.h @@ -260,6 +260,9 @@ long int nfil; long int nfono; long int R_nucleus; + ts_double R_nucleusX; + ts_double R_nucleusY; + ts_double R_nucleusZ; long int pswitch; long int constvolswitch; long int constareaswitch; @@ -307,6 +310,9 @@ ts_int pswitch; ts_tape *tape; ts_double R_nucleus; + ts_double R_nucleusX; + ts_double R_nucleusY; + ts_double R_nucleusZ; ts_double area; } ts_vesicle; diff --git a/src/initial_distribution.c b/src/initial_distribution.c index 4c82b35..ae7de0b 100644 --- a/src/initial_distribution.c +++ b/src/initial_distribution.c @@ -52,7 +52,9 @@ ts_vertex *vtx; ts_tape *tape=vesicle->tape; vesicle->R_nucleus=tape->R_nucleus*tape->R_nucleus; - + vesicle->R_nucleusX=tape->R_nucleusX*tape->R_nucleusX; + vesicle->R_nucleusY=tape->R_nucleusY*tape->R_nucleusY; + vesicle->R_nucleusZ=tape->R_nucleusZ*tape->R_nucleusZ; vesicle->clist->dmin_interspecies = tape->dmin_interspecies*tape->dmin_interspecies; //Initialize grafted polymers (brush): diff --git a/src/io.c b/src/io.c index c35d42b..2461de5 100644 --- a/src/io.c +++ b/src/io.c @@ -1031,6 +1031,9 @@ CFG_SIMPLE_INT("nfil",&tape->nfil), CFG_SIMPLE_INT("nfono",&tape->nfono), CFG_SIMPLE_INT("R_nucleus",&tape->R_nucleus), + CFG_SIMPLE_FLOAT("R_nucleusX",&tape->R_nucleusX), + CFG_SIMPLE_FLOAT("R_nucleusY",&tape->R_nucleusY), + CFG_SIMPLE_FLOAT("R_nucleusZ",&tape->R_nucleusZ), CFG_SIMPLE_FLOAT("dmax", &tape->dmax), CFG_SIMPLE_FLOAT("dmin_interspecies", &tape->dmin_interspecies), CFG_SIMPLE_FLOAT("xk0",&tape->xk0), diff --git a/src/neigh_test.c b/src/neigh_test.c new file mode 100644 index 0000000..49ea775 --- /dev/null +++ b/src/neigh_test.c @@ -0,0 +1,65 @@ +#include<stdio.h> +#include<math.h> +#include "general.h" +#include "vertex.h" +#include "bond.h" +#include "triangle.h" +#include "cell.h" +#include "vesicle.h" +#include "io.h" +#include "initial_distribution.h" +#include "frame.h" +#include "timestep.h" + +/** Entrance function to the program + * @param argv is a number of parameters used in program call (including the program name + * @param argc is a pointer to strings (character arrays) which holds the arguments + * @returns returns 0 on success, any other number on fail. +*/ + +int main(int argv, char *argc[]){ +ts_bool retval; + ts_vertex_list *vlist=init_vertex_list(5); +ts_vertex_list *vlist1; +ts_bond_list *blist=init_bond_list(); +ts_triangle_list *tlist=init_triangle_list(); +ts_cell_list *clist=init_cell_list(3,3,3,0.3); + +retval=vtx_add_cneighbour(blist,vlist->vtx[1],vlist->vtx[0]); +if(retval==TS_FAIL) printf("1. already a member or vertex is null!\n"); + +retval=vtx_add_neighbour(vlist->vtx[0],vlist->vtx[1]); +if(retval==TS_FAIL) printf("2. already a member or vertex is null!\n"); +fprintf(stderr,"Was here"); +retval=vertex_list_remove_vtx(vlist->vtx[1]->neigh,vlist->vtx[0]); +retval=vertex_list_remove_vtx(vlist->vtx[0]->neigh,vlist->vtx[1]); +vtx_add_neighbour(vlist->vtx[0],vlist->vtx[1]); +fprintf(stderr,"Was here too!\n"); + +vlist->vtx[0]->x=1.0; +vlist->vtx[0]->x=1.1; +vlist1=vertex_list_copy(vlist); +bond_add(blist, vlist->vtx[1],vlist->vtx[0]); +triangle_add(tlist,vlist->vtx[1],vlist->vtx[2],vlist->vtx[3]); + +triangle_add(tlist,vlist->vtx[1],vlist->vtx[2],vlist->vtx[3]); + +printf("Cell idx=1 has vertices=%u\n",clist->cell[0]->nvertex); +cell_add_vertex(clist->cell[0], vlist->vtx[0]); +printf("Cell idx=1 has vertices=%u\n",clist->cell[0]->nvertex); +printf("Cell idx=1 has vertex[0] has x coordinate=%e\n",clist->cell[0]->vertex[0]->x); +cell_list_cell_occupation_clear(clist); +printf("Cell idx=1 has vertices=%u\n",clist->cell[0]->nvertex); +cell_add_vertex(clist->cell[0], vlist->vtx[0]); + + +triangle_list_free(tlist); +bond_list_free(blist); +vtx_list_free(vlist); +cell_list_free(clist); + +vtx_list_free(vlist1); +printf("Tests complete.\n"); + +return 0; //program finished perfectly ok. We return 0. +} diff --git a/src/tape b/src/tape index baaac60..620a4a3 100644 --- a/src/tape +++ b/src/tape @@ -1,6 +1,6 @@ ####### Vesicle definitions ########### # nshell is a number of divisions of dipyramid -nshell=5 +nshell=10 # dmax is the max. bond length (in units l_min) dmax=1.7 # dmin_interspecies in the min. dist. between different vertex species (in units l_min) @@ -12,12 +12,12 @@ # Pressure calculations # (pswitch=1: calc. p*dV energy contribution) -pswitch = 0 +pswitch = 1 # pressure difference: p_inside - p_outside (in units kT/l_min^3): -pressure=0.0 +pressure=-10.0 #Constant volume constraint (0 disable constant volume, 1 enable wiht additional vertex move, 2 enable with epsvol) -constvolswitch=2 +constvolswitch=0 constvolprecision=1e-14 #Constant area constraint (0 disable constant area, 2 enable constant area with epsarea) @@ -25,7 +25,7 @@ ####### Polymer (brush) definitions ########### # npoly is a number of polymers attached to npoly distinct vertices on vesicle -npoly=2 +npoly=0 # nmono is a number of monomers in each polymer nmono=10 # Spring constant between monomers of the polymer @@ -42,7 +42,9 @@ ####### Nucleus (inside the vesicle) ########### # Radius of an impenetrable hard sphere inside the vesicle R_nucleus=0 - +R_nucleusX=2.0 +R_nucleusY=6.0 +R_nucleusZ=2.0 ####### Cell definitions ############ nxmax=60 nymax=60 @@ -52,7 +54,7 @@ ####### Program Control ############ #how many MC sweeps between subsequent records of states to disk #200000 -mcsweeps=20 +mcsweeps=2000 #how many initial mcsweeps*inititer MC sweeps before recording to disk? #2 inititer=0 diff --git a/src/vertexmove.c b/src/vertexmove.c index b065cbb..4caa86f 100644 --- a/src/vertexmove.c +++ b/src/vertexmove.c @@ -72,10 +72,19 @@ // TODO: Maybe faster if checks only nucleus-neighboring cells // Nucleus penetration check: +if(vesicle->R_nucleus>0.0){ if (vtx->x*vtx->x + vtx->y*vtx->y + vtx->z*vtx->z < vesicle->R_nucleus){ vtx=memcpy((void *)vtx,(void *)&backupvtx[0],sizeof(ts_vertex)); return TS_FAIL; } +} else if(vesicle->R_nucleusX>0.0){ +// fprintf(stderr,"DEBUG, (Rx, Ry,Rz)^2=(%f,%f,%f)\n",vesicle->R_nucleusX, vesicle->R_nucleusY, vesicle->R_nucleusZ); + if ((vtx->x*vtx->x)/vesicle->R_nucleusX + vtx->y*vtx->y/vesicle->R_nucleusY + (vtx->z*vtx->z)/vesicle->R_nucleusZ < 1.0){ + vtx=memcpy((void *)vtx,(void *)&backupvtx[0],sizeof(ts_vertex)); + return TS_FAIL; + } + +} //self avoidance check with distant vertices cellidx=vertex_self_avoidance(vesicle, vtx); -- Gitblit v1.9.3