Hello everyone,
Would you please tell ma, what is the following error mean?how i can correct my script?
Script:
my \$atomCounter=0;
my \$Totalforce=0;
my \$bonds = \$doc->Bonds;
foreach my \$bond (@\$bonds) {{++\$atomCounter}
my \$atom1=\$bond->Atom1;
my \$atom2=\$bond->Atom2;
if((\$atom1->ElementSymbol eq "C") && (\$atom1->Style eq "CPK") && (\$atom2->ElementSymbol eq "C")){
my \$force=\$atom1->Force;
\$Totalforce= \$Totalforce+\$force;
#printf "%s %s %f\n", \$atom1->Style,\$atom1->ElementSymbol, \$force;
}
else{ if((\$atom2->ElementSymbol eq "C") && (\$atom2->Style eq "CPK") && (\$atom1->ElementSymbol eq "C")){
my \$force=\$atom2->Force;
\$Totalforce= \$Totalforce+\$force;
printf "%s %s %f\n", \$atom2->Style,\$atom2->ElementSymbol, \$force;
}
}
}
Error:
Operation "+": no method found,
left argument has no overloaded magic,
right argument in overloaded package Cfx::COM at
Best Regard
SJN