I have been looking through the forum and found a thread about a theoretical mdma alternative. I found this interesting and wondering how you first draw them and how to design them to fit the effects you want. Sorry if my English is bad or i have posted it on the wrong thread.
If clubcard's post was a bit too hard to understand, I'll try putting it in more "layman-friendly" terms:
This is amphetamine:
Amphetamine is a "noradrenaline-dopamine releasing agent", producing pure stimulant effects. To produce the "rolly" feeling people love about MDMA-like drugs (so-called "empathogens"), we also need our drug to release serotonin. Now, from looking at the effects of other amphetamines, we have a rough idea about the SAR, or "structure-activity-relationship" of this class of drugs.
Look at the hexagon-thingie on the left of the molecule. This is called a "phenyl ring". By examining the effects of related drugs, we know that adding stuff to the bottom left corner (the "4"- or "p"-position) causes it to release greater amounts of serotonin vs dopamine and noradrenaline. However, many of these related drugs are either not all that "fun" (because there's no longer enough dopamine being released), or they have really bad side effects (like acting as MAO inhibitors, or being just plain toxic to your brain cells). Adding stuff to the top left corner of the ring (the "3"- or "m"-position) can also make it release serotonin, but this time it might be that you're releasing enough dopamine and not enough serotonin.
So you might think about adding stuff to both corners, but this might make the molecule too bulky to perfectly interact with your neurons. So finally, you stumble upon the idea to add an oxygen molecule to both the 3- and the 4-position, and connect them with a methylene group, giving you the 3,4-Methylenedioxy-bridge.
This is MDMA, or 3,4-
Methylene
Dioxy
Meth
Amphetamine
Note how it has not just the 3,4-MD bridge, but also an N-methyl group (hence "methamphetamine"). If we had only added the MD bridge, we'd have MDA, which doesn't just release the desired amount of the neurotransmitters we want, but also has a potentially unwanted side-effect: It is psychedelic/hallucinogenic, making it fairly unpredictable. However, we know that an N-methyl group can decrease the psychedelic activity of various related substances, and the same goes for MDMA, which is why it is pretty much perfect at what it does.
So if we wanted to find a legal substitute for MDMA, we'd have to keep looking at related illegal substances, and try and figure out which changes to the structure result in which changes to the effects (hence "structure-activity-relationship"), but there is no guarantee that the structure we'd come up would actually be good, so some unfortunate lab rat or brave/stupid human would have to try it to see if it actually has the expected effects.