Twisted mass qcd contractions library and main programs