[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ESPResSo-users] Implementation of S2 code
From: |
Muhammad Anwar |
Subject: |
[ESPResSo-users] Implementation of S2 code |
Date: |
Sat, 1 Oct 2011 13:40:40 +0200 |
User-agent: |
Thunderbird 2.0.0.24 (X11/20101027) |
Hello,
Dear Users and developers,
I am trying to implement orientational order parameter algorithm in
ESPResSo, i compiled it successfully, the problem i am finding is ,
when i try to calculate the parameter, it give result for one step then
give message of "segmentation fault". I am following
"lipid_orient_order" code to learn how to implement in espresso because
it is very close to my work. The code is like this
int orient_order_S2(double* result)
{
*result = 0.0;
//my code
*result = -2*z2;
return TCL_OK;
}
*and parse function is
*
static int tclcommand_analyze_parse_orient_order_S2(Tcl_Interp *interp,
int argc, char **argv)
{
double result;
char buffer[TCL_DOUBLE_SPACE];
int i , j ;
result = 0;
if (n_total_particles <= 1) {
Tcl_AppendResult(interp, "(not enough particles)",
(char *)NULL);
return (TCL_OK);
}
/* Do the calculation */
if ( orient_order_S2(&result) != TCL_OK ) {
Tcl_AppendResult(interp, "Error calculating orientational order ",
(char *)NULL);
return TCL_ERROR;
}
Tcl_PrintDouble(interp, result, buffer);
Tcl_AppendResult(interp, buffer, (char *)NULL);
return TCL_OK;
Tcl_AppendResult(interp, "Error calculating orientational order ",
(char *)NULL);
return TCL_ERROR;
}
I will really appreciate if any body can help about this problem.
Thanks and have a nice day.
Best Regards,
Muhammad Anwar
- [ESPResSo-users] Implementation of S2 code,
Muhammad Anwar <=