Hello everyone!
I created a lipid bilayer (by using Gromacs) and wanted to inflate it. I used command: perl inflategro.pl system.gro 4 DPPC 14 system_inflated.gro 5 area.dat.
But I got an error: Undefined subroutine &main::round called at inflategro.pl line 387.
A part of code inflategro.pl:
# Checking for protein lipid overlap
$upper_rm=0;
$lower_rm=0;
if ($cutoff>0) {
if ($switch==0) {
print "Checking for overlap....\n";
print "...this might actually take a while....\n";
$overlapcount=0;
for ($k=1; $k<=$zaehler; $k++) {
$uppercheck=0;
$lowercheck=0;
$progress=($k/$zaehler)*100;
$progress=round ($progress,2); **\\387 line with problem**
print STDOUT "$progress % done...\r";
if (substr($atmname_l[$k],0,1) eq "P") {
$res=$resnum_l[$k];
$overlap[$res]=0;
for ($i=1; $i<=$counter; $i++) {
if ($atmname_p[$i] eq "CA") {
$distance=abstand ($x_l[$k]+$translatex_l[$res],$y_l[$k]+$translatey_l[$res],$z_l[$k],$x_p[$i]+$translatex_p,$y_p[$i]+$translatey_p,$z_p[$i]);
if ($distance<=$cutoff) {
$overlap[$res]=1;
if ($z_l[$k] > $middle) {$uppercheck=1;}
if ($z_l[$k] < $middle) {$lowercheck=1;}
}
}
}
$overlapcount=$overlapcount+$overlap[$res];
if ($uppercheck==1) {$upper_rm++;}
if ($lowercheck==1) {$lower_rm++;}
}
}
How can I solve this problem? Thanks in advance!