Aptamers are single stranded DNA, RNA or peptide sequences having the ability to bind a variety of specific targets (proteins, molecules as well as ions). Therefore, aptamer production and selection for therapeutic and diagnostic applications is very challenging. Usually they are in vitro generated, but, recently, computational approaches have been developed for the in silico selection, with a higher affinity for the specific target. Anyway, the mechanism of aptamer-ligand formation is not completely clear, and not obvious to predict. This paper aims to develop a computational model able to describe aptamer-ligand affinity performance by using the topological structure of the corresponding graphs, assessed by means of numerical tools such as the conventional degree distribution, but also the rank-degree distribution (hierarchy) and the node assortativity. Calculations are applied to the thrombin binding aptamer (TBA), and the TBA-thrombin complex, produced in the presence of Na+ or K+. The topological analysis reveals different affinity performances between the macromolecules in the presence of the two cations, as expected by previous investigations in literature. These results nominate the graph topological analysis as a novel theoretical tool for testing affinity. Otherwise, starting from the graphs, an electrical network can be obtained by using the specific electrical properties of amino acids and nucleobases. Therefore, a further analysis concerns with the electrical response, which reveals that the resistance sensitively depends on the presence of sodium or potassium thus posing resistance as a crucial physical parameter for testing affinity.