What is Thomas Aquinas' perspective on salvation for baptized heretics who believe in the Trinity? St. Thomas Aquinas is praised globally for his intellect, and such has gained him the merit of being a 'Doctor of the Church'. I am curious about several things though:


What are Aquinas's views on what is necessary for the attainment of salvation for the individual?
What are Aquinas's views on the nature of moral accountability for heretical opinion and action?
How do these views correspond to his view on heretics who are like-minded and like-spirited to the Church in more central matters, such as belief in the Trinity and the upholding of the Sacrament of Baptism? Modern heretics nowadays akin to this category would include the Roman Catholic Church's separated brethren, being Protestants and even more so Orthodox Christians. If Aquinas is silent about this matter, what would be the logical deduction one could make about his views regarding the salvation for baptized heretics who accept the Trinity taking into account his views on the two previous topics? 


*Note that I am not using the word 'heretic' here in a malicious way but rather in the way that is most useful given the context. The Roman Catholic Church, along with Aquinas, considers those outside of her to be 'heretics', and that is the intended meaning here. This language was used in order to better qualify the views of he who this question is about, being Thomas Aquinas.
As far as what's necessary for salvation, we'd have to start with Baptism:


  Men are bound to that without which they cannot obtain salvation. Now it is manifest that no one can obtain salvation but through Christ; wherefore the Apostle says (Rom. 5:18): "As by the offense of one unto all men unto condemnation; so also by the justice of one, unto all men unto justification of life." But for this end is Baptism conferred on a man, that being regenerated thereby, he may be incorporated in Christ, by becoming His member: wherefore it is written (Gal. 3:27): "As many of you as have been baptized in Christ, have put on Christ." Consequently it is manifest that all are bound to be baptized: and that without Baptism there is no salvation for men.


(Summa Theologica, Third Part, Question 68 Article 1)

Note, however, that Aquinas recognizes the possibility of "baptism by desire":


  the sacrament of Baptism may be wanting to anyone in reality but not in desire: for instance, when a man wishes to be baptized, but by some ill-chance he is forestalled by death before receiving Baptism. And such a man can obtain salvation without being actually baptized, on account of his desire for Baptism, which desire is the outcome of "faith that worketh by charity," whereby God, Whose power is not tied to visible sacraments, sanctifies man inwardly.


(Summa Theologica, Third Part, Question 68 Article 2)

The other Sacraments, Aquinas says, are necessary in certain situations, but not absolutely necessary to salvation.

The biggie, however, which interferes here is that Aquinas does state specifically that "there is no entering into salvation outside the Church" (S.T. Third Part, Question 73, Article 3). This will be a big problem, considering that heretics are ipso facto cut off from the Church.

In fact Aquinas is quite severe on heretics. He does believe that they should be allowed one opportunity to repent&mdash;but only one; and if they don't repent, or if they fall away a second time, they should be put to death:


  On the part of the Church ... there is mercy which looks to the conversion of the wanderer, wherefore she condemns not at once, but "after the first and second admonition," as the Apostle directs: after that, if he is yet stubborn, the Church no longer hoping for his conversion, looks to the salvation of others, by excommunicating him and separating him from the Church, and furthermore delivers him to the secular tribunal to be exterminated thereby from the world by death.


(S.T., Second Part of the Second Part, Question 11, Article 3)

Aquinas says nothing that I can find to indicate that he considers any particular heresies less noxious than others; I'd have to conclude that Aquinas believes that any heretic (and he would probably count those professing Protestant beliefs as heretics) should be given an opportunity to recant; but failing that, they should be handed over to the State to be put to death.