Finding compounds with B, Si, Ca, and Mg in differing amounts
This would be an exceedingly difficult problem.

My suggestion might be to use a database like the Crystallography Open Database and perform searches with the elements you indicate.

For example, the search interface ensures B, Ca, Mg, and Si are all in the compound. I get 141 matches.

It would be incredibly hard to predict compounds with arbitrary stoichiometry. There are several genetic algorithm search packages that let one attempt to find low-energy crystal structures given a formula, including:


XtalOpt
GASP
USPEX


This is, however, an incredibly active area of research. I'm not sure if any of these packages can handle arbitrary amounts of different elements, or how they would handle missing elements. (For example, the elements you describe could be found in various borosilicate minerals given that oxygen is also allowed.)