In [2]:
import prody as pd
import numpy as np
import matplotlib.pyplot as plt
In [4]:
run compile-func.py -g 30,3,5+40,6.6,5.2+2,5,6.6+22,3.7,8.8+30,2,18+2,5,19+25,2,20
File func.txt created

Сгенерированная функция электронной плотности.

Восстановление функции электронной плотности по полному набору гармоник без различных шумов.

In [7]:
run func2fourier.py -i func.txt -o fourier.txt
..Done
In [9]:
run fourier-filter.py -i fourier.txt -r 0-5 -o fourier1.txt
..Done
In [10]:
run fourier2func.py -f func.txt -i fourier1.txt -o func1.txt
File func1.txt with function and its recovering is created

Набор гармоник 0-5. Качество восстановления плохое.

In [13]:
run fourier-filter.py -i fourier.txt -r 0-10 -o fourier2.txt
..Done
In [14]:
run fourier2func.py -f func.txt -i fourier2.txt -o func2.txt
File func2.txt with function and its recovering is created

Набор гармоник 0-10. Качество среднее, нельзя определить положение водородов.

In [15]:
run fourier-filter.py -i fourier.txt -r 0-20 -o fourier3.txt
..Done
In [20]:
run fourier2func.py -f func.txt -i fourier3.txt -o func3.txt
File func3.txt with function and its recovering is created

Набор гармоник 0-20. Качество среднее.

In [17]:
run fourier-filter.py -i fourier.txt -r 0-30 -o fourier4.txt
..Done
In [21]:
run fourier2func.py -f func.txt -i fourier4.txt -o func4.txt
File func4.txt with function and its recovering is created

Набор гармоник 0-30. Качество хорошее. Атомы видны хорошо, но есть шум.

In [19]:
run fourier-filter.py -i fourier.txt -r 0-40 -o fourier5.txt
..Done
In [22]:
run fourier2func.py -f func.txt -i fourier5.txt -o func5.txt
File func5.txt with function and its recovering is created

Набор гармоник 0-40. Качество восстановления отличное.

Восстановление функции электронной плотности по полному набору гармоник (0-40) с зашумлением.

In [26]:
run func2fourier.py -i func.txt -F 20 -o fourierF20.txt
..Done
In [27]:
run fourier-filter.py -i fourierF20.txt -r 0-40 -o fourierF20.txt
..Done
In [28]:
run fourier2func.py -f func.txt -i fourierF20.txt -o funcF20.txt
File funcF20.txt with function and its recovering is created

Набор гармоник 0-40. Зашумление 20% по амплитуде. Качество хорошее, хотя выделить водород уже сложнее.

In [29]:
run func2fourier.py -i func.txt -F 40 -o fourierF40.txt
..Done
In [30]:
run fourier-filter.py -i fourierF40.txt -r 0-40 -o fourierF40.txt
..Done
In [31]:
run fourier2func.py -f func.txt -i fourierF40.txt -o funcF40.txt
File funcF40.txt with function and its recovering is created

Набор гармоник 0-40. Зашумление по амплитуде 40%. Качество ухудшилось, не все положения атомомв получится определить.

In [32]:
run func2fourier.py -i func.txt -F 70 -o fourierF70.txt
..Done
In [33]:
run fourier-filter.py -i fourierF70.txt -r 0-40 -o fourierF70.txt
..Done
In [34]:
run fourier2func.py -f func.txt -i fourierF70.txt -o funcF70.txt
File funcF70.txt with function and its recovering is created

Набор гармоник 0-40. Зашумление по амплитуде 70%. Качество ухудшилась, сложно разобраться в чтении.

In [37]:
run func2fourier.py -i func.txt -P 20 -o fourierP20.txt
..Done
In [38]:
run fourier-filter.py -i fourierP20.txt -r 0-40 -o fourierP20.txt
..Done
In [39]:
run fourier2func.py -f func.txt -i fourierP20.txt -o funcP20.txt
File funcP20.txt with function and its recovering is created

Набор гармоник 0-40. Зашумление по фазе 20%. Качество хорошее, в целом атомы видны.

In [40]:
run func2fourier.py -i func.txt -P 40 -o fourierP40.txt
..Done
In [41]:
run fourier-filter.py -i fourierP40.txt -r 0-40 -o fourierP40.txt
..Done
In [42]:
run fourier2func.py -f func.txt -i fourierP40.txt -o funcP40.txt
File funcP40.txt with function and its recovering is created

Набор гармоник 0-40. Зашумление по фазе 40%. Качество плохое, сложнно определить положение атомов.

In [43]:
run func2fourier.py -i func.txt -P 70 -o fourierP70.txt
..Done
In [44]:
run fourier-filter.py -i fourierP70.txt -r 0-40 -o fourierP70.txt
..Done
In [45]:
run fourier2func.py -f func.txt -i fourierP70.txt -o funcP70.txt
File funcP70.txt with function and its recovering is created

Набор гармоник 0-40. Зашумление по фазе 70%. Качество плохое, сложно что-либо различить.

In [66]:
run func2fourier.py -i func.txt -F 20 -P 70 -o fourierF20P70.txt
..Done
In [67]:
run fourier-filter.py -i fourierF20P70.txt -r 0-40 -o fourierF20P70.txt
..Done
In [68]:
run fourier2func.py -f func.txt -i fourierF20P70.txt -o funcF20P70.txt
File funcF20P70.txt with function and its recovering is created

Набор гармоник 0-40. Зашумление по фазе 70%, по амплитуде 20%. Качество плохое.

In [69]:
run func2fourier.py -i func.txt -F 70 -P 20 -o fourierF70P20.txt
..Done
In [70]:
run fourier-filter.py -i fourierF70P20.txt -r 0-40 -o fourierF70P20.txt
..Done
In [71]:
run fourier2func.py -f func.txt -i fourierF70P20.txt -o funcF70P20.txt
File funcF70P20.txt with function and its recovering is created

Набор гармоник 0-40. Зашумление по фазе 20%, по амплитуде 70%. Качество плохое.

Восстановление функции электронной плотности по неполному набору гармоник.

In [52]:
run fourier-filter.py -i fourier.txt -r 2-40 -o fourier2-40.txt
..Done
In [53]:
run fourier2func.py -f func.txt -i fourier2-40.txt -o func2-40.txt
File func2-40.txt with function and its recovering is created

Набор гармоник 2-40(95%). Качество отличное, график просто слегка съехал вниз.

In [54]:
run fourier-filter.py -i fourier.txt -r 0-14,17-40 -o fourier0-14_17-40.txt
..Done
In [55]:
run fourier2func.py -f func.txt -i fourier0-14_17-40.txt -o func0-14_17-40.txt
File func0-14_17-40.txt with function and its recovering is created

Набор гармоник 0-14,17-40(92.5%). Качество хорошее, все атомы, кроме водородов, реально отличить.

In [56]:
run fourier-filter.py -i fourier.txt -r 0-18,21-40 -o fourier0-18_21-40.txt
..Done
In [57]:
run fourier2func.py -f func.txt -i fourier0-18_21-40.txt -o func0-18_21-40.txt
File func0-18_21-40.txt with function and its recovering is created

Набор гармоник 0-18,21-40(92.5%). Качество хорошее, все атомы, кроме водородов, реально отличить.

In [58]:
run fourier-filter.py -i fourier.txt -r 0-22,25-40 -o fourier0-22_25-40.txt
..Done
In [59]:
run fourier2func.py -f func.txt -i fourier0-22_25-40.txt -o func0-22_25-40.txt
File func0-22_25-40.txt with function and its recovering is created

Набор гармоник 0-22,25-40(92.5%). Качество хорошее, все атомы, кроме водородов, реально отличить.

In [60]:
run fourier-filter.py -i fourier.txt -r 0-5,20-40 -o fourier0-5_20-40.txt
..Done
In [61]:
run fourier2func.py -f func.txt -i fourier0-5_20-40.txt -o func0-5_20-40.txt
File func0-5_20-40.txt with function and its recovering is created

Набор гармоник 0-5,20-40(62.5%). Качество плохое, атомы сложно отличить от шума.

In [62]:
run fourier-filter.py -i fourier.txt -r 0-20,35-40 -o fourier0-20_35-40.txt
..Done
In [63]:
run fourier2func.py -f func.txt -i fourier0-20_35-40.txt -o func0-20_35-40.txt
File func0-20_35-40.txt with function and its recovering is created

Набор гармоник 0-20,35-40(62.5%). Качество хорошее, все атомы, кроме водородов, реально отличить.

In [64]:
run fourier-filter.py -i fourier.txt -r 0-40,50 -o fourier0-40_50.txt
..Done
In [65]:
run fourier2func.py -f func.txt -i fourier0-40_50.txt -o func0-40_50.txt
File func0-40_50.txt with function and its recovering is created

Набор гармоник 0-40,50(80%). Качество не портится.

Выводы:

  1. Удаление гармоник из конца набора помогает улучшить читаемость графика, в то время как потеря даже нескольких гармоник из начала набора приводит к тому, что становится невозможно отличить водороды (хотя восстановление все еще хорошее)
  2. Удаление большого количества гармоник сильнее ухудшает читаемость
In [ ]: