Hi Mariana,
classic RAxML8 can export a ML-model based and optimised distance matrix using the MSA and a guide tree but it comes in a non-standard list format:
taxon1 taxon2 distance
taxon1 taxon3 distance
taxon1 taxon4 distance
...
which you have to parse yourself into a distance matrix.
Command is -f x, the tree can be read in with -t, e.g.
raxmlHPC -s Matrix.epf -m GTRGAMMA -f x -t RAxML_bestTree — without partitioning scheme
raxmlHPC -s Matrix.epf -m GTRGAMMA -f x -t RAxML_bestTree -q partition_file — using a partitioning scheme
/G.