I think you need to first extract your data of radial distraction of metal ions around carbon nanutube by VMD from the simulation data. then, you can normalize the densityρ(r) by dividing it by the bulk density ρ0. finally, you can plot ρ(r)/ρ0 versus the radial distance r.
to calculate RDF, use VMD. Open VMD and load your simulation data:
mol new structure.psf
mol addfile trajectory.dcd waitfor all
then,use measure command:
set sel1 [atomselect top "type METAL"]
set sel2 [atomselect top "type CARBON"]
set rdf [measure gofr $sel1 $sel2 delta 0.1 rmax 10.0]
change metal and carbon to the ones you use. save your RDF file:
set output [open "rdf.dat" w]
foreach {r value} $rdf {
puts $output "$r $value"
}
close $output
then, you can use python to normalize them using numpy and plot them using Matplotlib.