A few weeks ago, an Illinois Central Gulf freight train jumped its tracks in Muldraugh, Ky. Four tank cars carrying vinyl chloride caught fire and the whole community of some 7,500 persons had to be evacuated.

Wrecks of this sort have become so frequent they are often no longer treated as important news, though the Illinois Central mess was so bad it made front pages. A 107-car Boston & Maine train went off its tracks in Gardner, Mass., but luckily the propane tank cars it was carrying were empty, or there might have been a terrible explosion such as the one that killed 15 people near Waverly, Tenn., in 1978.

Incidentally, it was only last April that another Boston & Maine train rammed a tank car in Sommerville, Mass. The phosphorus trichloride in its tanks excaped to form a cloud over the community, necessitating the evacuation of 13,000 people.

Without accusing any particular railroad, the suspicion exists that some are deliberately running unsafe lines. They certainly have every incentive not to maintain their tracks in a condition suitable for either the safety of their workers or the people who live near where trains loaded with dangerous chemicals roll. The Federal Railroad Administration will lend money at 2-percent interest to repair the right-of-ways after they're deteriorated enough, so why should a railroad spend its own money to keep itself in working order? A railroad isn't like a cat, which has an innate need to keep itself cleaned and groomed.

We're told it's overly strict regulation that is asphyxiating American industry. Still, there might be some along the railroad tracks who think it's American industry that's asphyxiating us, and that in some areas, the much-complained-of regulatory and inspection system is more a theoretical drag on profits than a real one.

Even with its trains killing people and terrorizing communities, a railroad can still be a decent investment. Illinois Central Industries, the proprietor of the Muldraugh, Ky., accident, has been paying around 8 percent on its stock. Some people have, and have actually gotten rich at it. For example, we have the Rodale Press in Emmaus, Pa., the publishers of Prevention, Organic Gardening, New Farm, Bicycling and New Shelter magazines. Rodale also publishes books, all devoted to healthy living and other books, all devoted to healthy living and other activities of unsurpassed ecological purity. It is also estimated that gross revenues were about $65 million last year, so sometimes at least in addition to being its own reward, virtue can bring in a few outside shekels.

Unhappily for the investor with a conscience, interested in making an honorable buck, Rodale is a private concern whose stock is not for sale to the public. Nevertheless, there is hope for the high-minded.

The Continental Savings and Loan Association of San Francisco offers a choice of what it calls Solar T-Bills or SOLAR T-Notes or Solar Certificates of deposit. In interest yield to you, these fully government-insured forms of deposit don't differ from what's being offered around the corner at your local S&L. What's different is that this money will only be lent to help people install solar heating equipment.

After they've taxed the interest on a savings-and-loan account and you figure in the ravages of inflation, any kind of deposit in a thrift institution, solar or nonsolar, is a money loser. But there are opportunities for the investor who would prefer to make his money without poisoning his neighbor.

Barron's recently did a study of three socially conscious mutual funds. (A mutual fund pools your money with other people's to buy shares of stock from a number of companies.) The Dreyfus Third Century Fund decides which company's stock to buy, not only after deciding it's a good business decision, but also after checking the company's environmental record and its employe-safety and hiring policies. That you can do good for yourself by doing good for others is exemplified by the Third Century's profit record. In the past five years, the value of Third Century stock has risen 169 percent. Which is not to say that virtue will be equally well rewarded in the next five years, so be warned. Investing in the goodly and godly will not change corporate behavior. Most investors will make their decisions on profit considerations alone, but they can console themselves with the adage that there is no such thing as dirty money, only dirty hands to pass it to you. t