Skip to content

Commit d2f851c

Browse files
authored
Merge pull request #97 from MobleyLab/post_edits
Merge in Samarjeet's updated figure and code
2 parents 8760dc5 + 6323cae commit d2f851c

6 files changed

Lines changed: 44 additions & 3 deletions

File tree

paper/basic_training.pdf

9.61 KB
Binary file not shown.

paper/basic_training.tex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3636
%%% ARTICLE SETUP
3737
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38-
\title{Best Practices for Foundations in Molecular Simulations [Article V1.0] v\versionnumber}
38+
\title{Best Practices for Foundations in Molecular Simulations [Article v\versionnumber]}
3939

4040
\author[1]{Efrem Braun}
4141
\author[2]{Justin Gilmer}
@@ -1077,8 +1077,9 @@ \subsubsection{ Ewald Summation}
10771077

10781078
\begin{figure}[h]
10791079
\centering
1080-
\includegraphics[width=\linewidth]{decay_comparison.pdf}
1081-
\caption{Comparison of decay of the original $r^{-1}$ term for Coulomb interactions (blue,*), the resulting direct-space term after Gaussian screening (black,-) and the $r^{-6}$ in van der Waals term (red, -.). }
1080+
\includegraphics[width=\linewidth]{py_decay_comparison.pdf}
1081+
\caption{Comparison of decay of the original $r^{-1}$ term for Coulomb interactions (blue,*), the resulting direct-space term after Gaussian screening (black,-) and the $r^{-6}$ in van der Waals term (red, -.).
1082+
Note: The value on the vertical axis has been scaled to allow easy visualization of the relative decay of each term. }
10821083
\label{decay}
10831084
\end{figure}
10841085

paper/decay_comparison.pdf

-3.15 KB
Binary file not shown.

paper/py_decay_comparison.pdf

14.4 KB
Binary file not shown.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import numpy as np
2+
from scipy import special as spc
3+
import matplotlib.pyplot as plt
4+
5+
r = np.linspace(1.0, 3.0, 30)
6+
print(r)
7+
8+
y = 1./r
9+
ylj = np.power(y, 6)
10+
print(ylj)
11+
e = spc.erfc(r) / r
12+
e = e /e[0]
13+
14+
fig = plt.figure()
15+
plt.plot(r, y, 'b*', r, ylj, 'r--', r, e, 'k-')
16+
plt.title("Comparison of 1/r, erfc(r) and 1/r^6")
17+
plt.legend(['1/r', '1/r^6', 'erfc(r)/r'])
18+
plt.xlabel('distance (r)')
19+
plt.ylabel('Function value ')
20+
plt.show()
21+
fig.savefig("py_decay_comparison.pdf", bbox_inches='tight')
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
x=1.0:0.1:3.5;
2+
3+
y = 1./x;
4+
h=figure
5+
plot(x,y,'b*')
6+
hold on;
7+
ylj=1./(x.^6);
8+
plot(x,ylj,'r-.')
9+
plot(x,erfc(x),'k-');
10+
hold off
11+
xlabel('distance')
12+
ylabel('function value')
13+
title('Comparison of 1/r, erfc(r) and 1/(r^6)')
14+
15+
set(h,'Units','Inches');
16+
pos = get(h,'Position');
17+
set(h,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)])
18+
19+
print(h,'decay_comparison.pdf','-dpdf')

0 commit comments

Comments
 (0)