The Ninth Configuration

Sometime in the 1970s "Toward the end of the War in Vietnam", a large castle is used by the US Government as an insane asylum for military personnel. Among the many patients there is a former astronaut, Billy Cutshaw (Scott Wilson), who aborted a moon launch and was dragged screaming from the capsule, suffering from an apparent mental breakdown.
Colonel Kane (Stacy Keach), a former member of a United States Marine Corps special unit, arrives at the castle to take over the treatment of the patients. He meets Colonel Fell (Ed Flanders), who helps Kane acclimate himself to the eccentricities of the patients. Kane pays special attention to Cutshaw, repeatedly asking him why he did not want to go to the moon. Cutshaw refuses to answer but instead gives him a St. Christopher medal.
Kane falls asleep in his office and has a nightmare. When recounting it, he explains to Fell that they are the nightmares of his brother Vincent, a former patient and murderer who is now dead. Later, Cutshaw talks with another patient about Kane. Cutshaw suspects that Kane is crazy himself. He asserts that psychiatrists often go crazy and have the highest suicide rate of any profession.
Cutshaw talks with Kane again, and they debate God and the idea that there is a divine plan. Kane, who believes that the existence of a God is far more likely than humanity's having emerged from "random chance", argues that deeds of pure self-sacrifice are proof of human goodness, which can only be explained by divine purpose. Cutshaw demands that Kane recall one concrete example of pure self-sacrifice from his personal experience; Kane is unable. Kane takes Cutshaw to a church service, which Cutshaw interrupts with several outbursts, and Kane momentarily hallucinates. After returning to the castle, Cutshaw thanks Kane and asks him to send him a sign as proof of an afterlife should Kane die first. Kane promises to try.
When Kane meets with a new patient, the patient calls him "Killer Kane", and Kane flashes back to Vietnam, where he has decapitated a young boy. The soldier urges Kane to leave, and he screams. In the present, Kane collapses, unconscious. Fell explains to the staff that Kane is Vincent "Killer" Kane and suffered a breakdown in Vietnam. When Fell, who is Kane's brother Hudson, was dispatched back to America, Kane received the dispatch by accident. Kane created a new persona for himself â a healer, like his brother. Subconsciously hoping to heal people to make up for his "murders", Kane returned to the US as his brother. Realizing Kane's mental state, the Army psychiatric staff maintained the charade and sent him to Fell's hospital under the pretext of being its commanding officer. In reality, Fell has been the commanding officer all along. Kane awakens and remembers nothing of the incident.
Cutshaw escapes the castle and visits a bar. A biker gang recognizes Cutshaw from news reports and brutalize him. A waitress contacts the hospital, and Kane arrives to retrieve him. Kane humbles himself to the bikers to extricate Cutshaw, but the bikers are disgusted by his behavior. The gang attempt to rape Cutshaw. Kane snaps and kills most of the bikers with his bare hands.
Kane and Cutshaw return to the castle, and the police arrive to arrest Kane for the murders at the bar. Cutshaw visits Kane, who has wrapped himself in a blanket. Dreamy and distant, Kane disjointedly mumbles to Cutshaw about God and proof of human goodness before passing out. As Cutshaw leaves, Kane's hand emerges from his blankets and drops a bloody knife. Outside Kane's room, Cutshaw notices a spot of blood on his shoe. Rushing back in, Cutshaw discovers that Kane committed suicide to provide proof of human goodness.
Some time later, Cutshaw has returned to uniform and visits the now-abandoned castle. After reading a note left by Kane which expresses hope that his sacrifice will shock Cutshaw back to sanity, Cutshaw finds a Saint Christopher's medal has somehow appeared in his car. He turns it over to confirm whether it was the one he gave to Kane and silently rejoices at what he sees.

Question: What is the large castle used as?
Answer: The large castle is used as an insane asylum for military personnel.