The American Psychiatric Association (APA) has issued a warning to its members to stop psychoanalysing Donald Trump because it breeches the organisation's strict code of ethics.

A great deal of armchair psychology has been written to explain Mr Trump’s behaviour, with some commentators confidently claiming he is a psychopath or a sociopath – terms which are often misunderstood and bandied about too casually, according to some practitioners.

Some professionals have declared the President is suffering from a personality disorder – with many citing narcissistic personality disorder as one they believe afflicts him.

Watergate reporter Carl Bernstein: Trump’s attacks on the press are more dangerous than Nixon’s

Following his recent press conferences, psychiatrists as well as media commentators have increasingly declared something is not quite “right” with Mr Trump’s psyche, but the APA says this increasingly common trend by psychiatrists to “diagnose” those they haven’t treated must end.

“The unique atmosphere of this year’s election cycle may lead some to want to psychoanalyse the candidates,” Maria Oquendo, president of the APA, wrote, “but to do so would not only be unethical, it would be irresponsible.”

Of course, Mr Trump is not the first politician whose character has attracted frenzied speculation by the media, the public and mental health professionals. Back in 1964, various psychiatrists decided to analyse Republican Presidential candidate Barry Goldwater.

A survey in US magazine Fact questioned more than 12,000 psychiatrists about Mr Goldwater's health. About 2,400 responded, with about half of these declaring him psychologically unfit to be President.

After Fact carried the results of the survey as a news story, Mr Goldwater sued for libel – and won.

The speculation was so frenzied that it resulted in what is known as the “Goldwater rule”.

It states: “On occasion psychiatrists are asked for an opinion about an individual who is in the light of public attention or who has disclosed information about himself or herself through public media.

“In such circumstances, a psychiatrist may share with the public his or her expertise about psychiatric issues in general. However, it is unethical for a psychiatrist to offer a professional opinion unless he or she has conducted an examination and has been granted proper authorization for such a statement.”

The Goldwater rule has been ignored by the many professionals who have waded into the debate around Mr Trump’s psychology.

Jeffrey Flier, a former dean of Harvard Medical School, confidently declared on Twitter: “Narcissistic personality disorder. Trump doesn’t just have it, he defines it. #trumpdiagnosis”.

And not content with a snappy 140 character tweet, a professor at Northwestern University published a 9,000 word psychological evaluation of the President – from a distance rather than from the couch – with mainly covered Mr Trump’s perceived narcissism.

In the UK, Oxford University Professor Kevin Dutton hit the headlines when he found Mr Trump scored higher than Hitler on the psychopathy scale.

Other American politicians to have undergone scrutiny of their mental health include Thomas Eagleton, who in 1972 withdrew as Democrat George McGovern’s running mate after it was revealed he had been hospitalised three times for depression and had undergone electric shock therapy.

Both George Bush Senior and his Democratic opponent Michael Dukakis denied in 1988 they had ever undergone psychiatric treatment after the Washington Times reported on rumours related to Mr Dukakis’s mental health.

But some psychotherapists claim they feel compelled to break their own code of ethics and speak out about Mr Trump because they believe he poses a danger to the psychological health of many Americans.

“As psychotherapists practising in the United States, we are alarmed by the rise of the ideology of Trumpism, which we see as a threat to the well-being of the people we care for and to American democracy itself,” the Citizen Therapists Against Trumpism wrote in their manifesto.