Do I apologise?

So I've not spoke to my ex since our argument on Sunday, he suffers with ocd and it was related to something I accidently did that triggered him. Anyway he screamed at me in the doorway as I was showering and I kindly asked him to stop and please leave me alone.
I felt this was an explosive reaction and I was trying to create a boundary so I could later talk to him.
Anyway, I partly take the blame, but I also don't think it's ok to scream at someone stood in the doorway when I had no idea i would set him off
(He never once explained what triggers or sets him off. Never once explained this in depth or even discussed it).
I wasn't going to message him, but I feel it is only right to apologise for causing him unknown distress.
I don't have anything else to say to him, but I personally think he also needs to take some accountability for his response. Ok he was distressed but it doesn't make it ok to scream at someone who's stood naked showering.
Do I apologise?
Post Opinion