No! It is not true to say that Optifine is a virus, yet your computer might judge it as one. It is 100% trustworthy software and safe to use. If you face the same issue, probably you have downloaded a fraudulent version.