espressomd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ESPResSo-devel] bugs in polymer.c


From: Limbach, Hans Joerg, LAUSANNE, NRC-FS
Subject: RE: [ESPResSo-devel] bugs in polymer.c
Date: Tue, 30 Oct 2007 14:48:06 +0100

Dear Peter, dear all

Thank you for pointing out this bug. There is a very crude routine doing
exactly this on the tcl level in scripts/ABHmath.tcl. Maybe someone
knows a better way. I did not spent a whole lot of time when I wrote
that piece of code.
It would be great if you could write a corresponding c-function and
incorporate it in random.h as an MDINLINE function (and send us an
updated version of random.h then so that we can place it in the next
version).

With best regards,
Hanjo

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden On 
> Behalf Of Peter Kosovan
> Sent: lundi, 29. octobre 2007 15:11
> To: address@hidden
> Subject: [ESPResSo-devel] bugs in polymer.c
> 
> Though I am a member of the user mailing list, I think this 
> better fits into the developers' list.
> 
> I found out that a call to polymer command with a fixed angle 
> produces very different results in the version 1.9.7h and 
> 2.0.2n even though I have taken care of the change of the 
> angle definition. Examining polymer.c (version 2.0.2n), on 
> the line 440 I found
> 
> phi = 2.0*d_random();
> 
> where should be
> 
> phi = 2.0*PI*d_random();
> 
> Using the polymer command with angle but without angle2 thus 
> produces wierd helix-like structures with prefered absolute 
> orientation in space. 
> When both angle and angle2 are used, everything is correct.
> 
> Also there is another minor bug repeated several times in the 
> same file. Using
> 
> theta  = PI*d_random();
> phi    = 2.0*PI*d_random();
> pos[0] = poz[0]+bond_length*sin(theta)*cos(phi);
> pos[1] = poz[1]+bond_length*sin(theta)*sin(phi);
> pos[2] = poz[2]+bond_length*cos(theta);
> 
> does not place a new monomer uniformly on the surface of a 
> unit sphere around the previous one, as it is supposed to. 
> Since the surface of 2*PI*sin(theta)*dtheta corresponds to 
> each dtheta, this code actually prefers the new monomer to be 
> placed around the poles (theta=0).
> 
> With regards
> 
> Peter
> 
> Peter Kosovan
> Department of Physical and Macromolecular Chemistry Faculty 
> of Science Charles University in Prague Czech Republic 
> address@hidden http://lynette.natur.cuni.cz 
> Tel. +420 221 951 290 Currently on a stay at the Wageningen 
> University, the Netherlands
> 
> 
> _______________________________________________
> ESPResSo-devel mailing list
> address@hidden
> https://fias.uni-frankfurt.de/mailman/listinfo/espresso-devel
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]