The invention relates to pyridopyrimidinone compounds of formula (I) or pharmaceutically acceptable salts thereof, wherein X, R, R2, R3, R4, R5 and R6 are as defined herein, as well as pharmaceutical compositions comprising such compounds, useful as NMDA receptor modulators in the treatment of neurological and psychiatric conditions.