Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git://github.com/espressomd/espresso

  • Loading branch information...
commit 6e3d27067f23b58c18af31957692e43f3db0e5ab 2 parents 03b428d + 137913e
@kessel kessel authored
View
7 doc/ug/part.tex
@@ -891,11 +891,12 @@ \subsection{Rigid arrangements of particles}
\end{essyntaxbox}
where n is the id of the non-virtual particle and d is its distance
from the virtual site.
-\item In a simulation on more than one cpu, the effective cell size
+\item In a simulation on more than one CPU, the effective cell size
needs to be larger than the largest distance between a non-virtual
particle and its associated virtual sites. To this aim, you need to
- set the global variable \texttt{min\_global\_cut} to this largest
- distance.
+ set the global variable \var{min\_global\_cut} to this largest
+ distance. \es issues a warning when creating a virtual site with
+ \lit{vs\_auto\_relate\_to} and the cutoff is insufficient.
\item If the virtual sites represent actual particles carrying a mass,
the inertia tensor of the non-virtual particle in the center of mass
needs to be adapted.
View
4 scripts/vtf.tcl
@@ -58,8 +58,8 @@ proc writevsf { file args } {
set r [expr 0.5*($lj_sigma+$lj_offset)]
lset list $type $r
} else {
- # default radius is 1.0
- lset list $type 1.0
+ # default radius is 0.5
+ lset list $type 0.5
}
}
}
View
1  src/tcl/lj_tcl.c
@@ -140,6 +140,7 @@ int tclcommand_inter_parse_lj(Tcl_Interp * interp,
compute_auto_shift = 0;
change++;
} else if (ARG_IS_S(4, "auto")) {
+ Tcl_ResetResult(interp);
compute_auto_shift = 1;
/* if shift is "auto", autocompute the shift */
change++;
View
9 src/virtual_sites_relative.c
@@ -218,6 +218,14 @@ int vs_relate_to(int part_num, int relate_to)
ERROR_SPRINTF(errtxt, "setting the vs_relative attributes failed");
return ES_ERROR;
}
+
+
+ // Check, if the distance between virtual and non-virtual particles is larger htan minimum global cutoff
+ // If so, warn user
+ double l=sqrt(sqrlen(d));
+ if (l>min_global_cut) {
+ printf("Warning: The distance between virtual and non-virtual particle (%f) is\nlarger than the minimum global cutoff (%f). This may lead to incorrect simulations\nunder certain conditions. Use \"setmd min_global_cut\" to increase the minimum cutoff.\n",l,min_global_cut);
+ }
// Now, calculate the quaternions which specify the angle between
// the director of the particel we relate to and the vector
@@ -232,7 +240,6 @@ int vs_relate_to(int part_num, int relate_to)
// Resolving this for the quat_(virtaul particle)
//Normalize desired director
- double l=sqrt(sqrlen(d));
int i;
for (i=0;i<3;i++)
d[i]/=l;
Please sign in to comment.
Something went wrong with that request. Please try again.