Sodomy is always a sin. Having homosexual desires is only sinful if you don't dismiss them and put them aside. Same with deviant heterosexual desires.
Of course, I don't expect the SF Chronicle to understand the distinctions...
When it comes to "thoughts" as sin, our pastor once said that one cannot control each and every thought that comes into our heads and compared it to "a bird flying over and dropping on us but if we allow the bird to make a nest in our hair" then it becomes sin and is usually acted upon.
I thought that was a good analogy, such as having a particular weird dream that is very much against one's convictions.