what rom/date, gapps/date, theme, and other apps you got on there?
LineageOS14.1 2017-5-25
open_gapps-arm-7.1-micro-20170523
SuperSU2.79 + Playstore update
Viper4Android 2.5.0.5
Bro i don't think it's a software problem........bcoz i have tried Stock version (marshmallow),CyanogenMode 13 snapsot and LineageOS........i think there is a problem with battery........coz the phone shutsdown un predictabily even with 30 to 40 % of battery........but the problem is i can't confirm it as a battery damage because it may even cause due to wrong battery calibration........i have also tried calibrating it using some third party apps........still the problem continues........can you suggest any method to check battery problem........?
Thanks
Also i need to tell you that this problem doesn't arise when the battery is fully charged........it statrts when battery falls to somewhat 60% or something........