Background: Current clinical assessments of Posttraumatic stress disorder (PTSD) rely solely on subjective symptoms and experiences reported by the patient, rather than objective biomarkers of the illness. Recent advances in data-driven computational approaches have been helpful in devising tools to objectively diagnose psychiatric disorders. Here we aimed to classify individuals with PTSD versus controls using heterogeneous brain datasets from the ENIGMA-PGC PTSD Working group. Methods: We analyzed brain MRI data from 3,527 structural-MRI; 2,502 resting state-fMRI; and 1,953 diffusion-MRI. First, we identified the brain features that best distinguish individuals with PTSD from controls (TEHC and HC) using traditional machine learning methods. Second, we assessed the utility of the denoising variational autoencoder (DVAE) and evaluated its classification performance. Third, we assessed the generalizability and reproducibility of both models using leave-one-site-out cross-validation procedure for each modality. Results: We found lower performance in classifying PTSD vs. controls with data from over 20 sites (60% test AUC for s-MRI, 59% for rs-fMRI and 56% for d-MRI), as compared to other studies run on single-site data. The performance increased when classifying PTSD from HC without trauma history across all three modalities (75% AUC). The classification performance remained intact when applying the DVAE framework, which reduced the number of features. Finally, we found that the DVAE framework achieved better generalization to unseen datasets compared with the traditional machine learning frameworks, albeit performance was slightly above chance. Conclusion: Our findings highlight the promise offered by machine learning methods for the diagnosis of patients with PTSD. The utility of brain biomarkers across three MRI modalities and the contribution of DVAE models for improving generalizability offers new insights into neural mechanisms involved in PTSD.