If you decide that your device is research only, and thus not a medical device you are not then compelled to comply with the medical device directive.
However, you may, instead, have to comply with one or more other European directives. As an example consider an physiological signal amplifier - you decide it is research only so not MDD. But instead it might fall into the Low Voltage Device Directive, the EMC Directive, the RoSH directive and the WEEE directive. The first three of those are all "CE" marking directives.
For a device that is software only I am not aware of any directives other than MDD that might apply. However, I would suggest that it would be "good practice" to consider the Essential Requirements of the MDD and apply those that would otherwise be applicable. I am here thinking about such things as making sure that the software is identifiable, with the manufacturer, type, version, configuration etc all being clearly shown.