## 2 Materials and Methods
### Personalized Neuromusculoskeletal Model  
A personalized full-body NMS model possessing lower extremity and abdominal muscles was developed in OpenSim [26; 27] to estimate muscle and hip joint contact forces for each dynamic task. A pre-operative OpenSim model of the same patient previously developed by [PERSON] et al. [24] was used as a starting point. The parameter values of the model's Hill-type muscle-tendon units (MTUs) (i.e., peak isometric strength, optimal muscle fiber length, tendon slack length) were personalized using an EMG-driven modeling method [24; 28] applied to pre-operative walking data collected from the patient. Muscles with broad origins were represented using multiple lines of action and were modeled as multiple MTUs. This initial NMS model was modified to estimate the patient's post-operative muscle and hip joint contact forces during the dynamic motion trials. The pre-operative pelvis was replaced by the post-operative pelvis, which consisted of the remaining pelvis plus the custom implant. The hip center was adjusted slightly to match the hip center of the implant. The surgically removed muscles were also removed in the post-operative model. A total of 18 MTUs spanning the hip and abdomen were left in the post-operative model representing the muscles that were preserved during surgery. A list of the retained muscles can be found in [PERSON] et al. (2010), which presented post-operative hip joint contact forces over the gait cycle calculated using the same NMS model. For muscles retained in the post-operative model, MTU attachment sites and parameter values were taken from the pre-operative model. Figure 1: Post-operative assembly of the ipsilesional hemipelvis. (**a**) Geometric model of the post-operative pelvis assembly showing the layout of the nine screws securing the implant to the remaining bone. (**b**) Finite element (FE) model of the ipsilesional hemipelvis post-surgery. (**c**) Attachment areas of the muscle–tendon units retained after surgery and used in the model. A sequence of four analyses were performed primarily in OpenSim 4.0 to estimate muscle and hip joint contact forces for each dynamic activity. First, the OpenSim Inverse Kinematics Tool was used to convert post-operative experimental marker motions into post-operative model joint motions. Second, the OpenSim Inverse Dynamics Tool was used to convert post-operative joint motions and experimental ground reaction data into post-operative net joint moments produced by lower body and abdominal muscles. Third, a custom Matlab 2021b (MathWorks, Natick, MA, USA) function was used to estimate leg and abdominal muscle forces via static optimization by minimizing the sum of squares of muscle activations for each time frame. Fourth, the OpenSim Analysis Tool was used to perform a Joint Reaction Analysis that estimated the hip joint contact forces produced by estimated hip muscle forces. Seven critical external load cases were defined for subsequent FE analyses based on peak values of predicted hip joint contact forces during the dynamic motion trials (Figure 2). These critical load cases were labeled as GAIT 1, GAIT 2, SQDW, SQUP, STUP 1, STUP 2, and STDN, respectively. GAIT 1 and GAIT 2 corresponded to the first and third peaks of the hip joint contact force during a gait cycle, coinciding with the beginning and end of single-leg support. SQDW and SQUP corresponded to the peaks of hip joint contact force during the standing to squat down and squat down to standing motions, respectively. In this study, the squatting motion was associated with the motion to sit down and stand back up. STUP 1 and STUP 2 referred to the two peaks of hip joint contact forces that occur when walking up stairs, coinciding with the beginning and end of single-leg support. Lastly, STDN referred to the peak hip joint contact force that occurs when walking down stairs, coinciding with the beginning of single-leg support.