Learning Regularized Positional Encoding for Molecular Prediction