When aligning ATAC-seq reads it is helpful to specify the maximum insert size. This allows the aligner to correctly mark whether the distance between mates is "proper" and in turn will set the "PROPER_PAIR" flag in the SAM file. With Bowtie2 you can specify this size with the -X flag. Is it possible to set this option with BWA MEM?
I recommend that people don't rely on the "proper" flag. It is not a well-defined concept.
Typically we never know for sure what is really going on. It is basically an illusion, where we give up control to the developer and assume that "proper" meant the same to them as for us. We never fully understand all the decisions and corner cases that go with it.
The 9th (TLEN) column of a SAM file contains the template length - you can filter your SAM alignments by that column in parallel to other well-defined flags. But I do agree it is a lot less convenient to do so than filtering by a flag and I wish "proper pair" would be a better defined.
I think BWA calculates the insert size as mentioned here: Estimating Insert Size Distribution