We introduce a new method to derive depth- and residue-dependent, membrane burial potentials from known structures of trans-membrane helical bundles (TMHs) and beta-barrels (TMBs). The potential for a whole protein is evaluated at a series of z positions along the membrane normal at different tilt and rotational angles, denoted as E(z,tilt,rot), for each protein in the dataset. In addition to standard amino acid terms, we incorporate z-dependent energies for unsatisfied H-bond acceptors and donors. The parameters that maximizes the probability of the native positions are obtained by five-fold cross-validation, dropout regularization and stochastic gradient descent. Specifically, we minimize the gap energy between E(z,tilt,rot) when placed at its native state and log(Σe-E(z,tilt,rot)). Comparison tests to existing membrane potentials are conducted for the correct reproduction of the native orientation. The addition of the H-bonding effects produces notable enhancement. Additional tests consider the free energy change in transition between trans-membrane and surface-bound states for model TMHs (KmLnKm, m=2,4, n=16,18,…,30; GLnRLnG, n=5,6,…,9) and TMBs (OmpA, OmpT, OmpLA) from MD simulation. Trimerization of TMBs is also studied by the changes in the interfacial residues’ burial potential from the monomeric state. In conclusion, our potentials that include H-bonding effects successfully predict the orientations of membrane proteins. The potentials are employed in our new dynamics package to enable simulation of the insertion and folding of membrane proteins.