Structural, optoelectronic, and biological properties of tetrahydroaltersolanol (C
16
H
20
O
7
) and fluorinated derivatives are calculated using density functional theory (DFT) and molecular docking approaches. It is shown that the pure C
16
H
20
O
7
molecule has a direct HOMO–LUMO energy gap about 3.1 eV. The substitution of F atom at A category decreases the electronic energy gap, while it is constant at B category. In A category, the behavior of the pure molecule changed from insulator to semiconductor with various substitution of F atom. The electronic properties were depended on the F sites in the pure molecule. The molecular electrical transport properties and charge-transfer possibilities increase with decreasing energy gap. The pure C
16
H
20
O
7
molecule with high energy gap has low chemical reactivity and substitution of F atom at considered molecule increases chemical reactivity. Obtained results show that F-O bonds in trifurcation bonds of C
16
H
19
O
7
(F14), C
16
H
19
O
7
(F16), and C
16
H
19
O
7
(F17) molecules play a key role in confronting with COVID-19, HIV, and HTLV proteases, respectively. Optical spectra, such as the dielectric functions, electron energy-loss spectroscopy, refractive index, extinction coefficient, and reflection spectra show that fluorinated derivatives of C
16
H
20
O
7
at B category can be used in the new drugs.
Graphical abstract