In the next example, we calculate the scattering profile of a structure consisting of atoms 1-11558 using the ONEBEAD approach. This structure could be made of protein(s), DNA, RNA, or complexes. As a first step, let's create and open the plumed.dat
file, which will contain all the instructions:
vim plumed.dat
The first requirement is to provide the PDB of the structure via MOLINFO, in this case template_AA.pdb
. Detailed information about the input file can be found in the technical support section.
MOLINFO STRUCTURE=template_AA.pdb
The SAS instructions need the corresponding action option, which can be either SAXS or SANS. In the following example, we proceed by opening the SAXS action:
MOLINFO STRUCTURE=template_AA.pdb
SAXS ...
The SAXS calculation options must be listed with the appropriate flags, in any order. Here, we include atoms 1-11878 and specify the ONEBEAD mapping (1 bead for 1 amino acid, 3 beads for 1 nucleotide). The same template_AA.pdb
is used for both MOLINFO and TEMPLATE. The GPU flag allows the calculation of the scattering profile(s) on the GPU; this feature requires PLUMED to be compiled with support for the ArrayFire library. See the corresponding technical support section in this manual for more information. The electron density of the solvent is set to 0.334 electrons per cubic angstrom (bulk water) with the SOLVDENS flag. In the example, the solvation layer contribution is ignored by setting SOLVATION_CORRECTION=0.00. For this reason, other flags such as SASA_CUTOFF and SOLVATION_STRIDE are not required. Further examples are given at the end of this page.
MOLINFO STRUCTURE=template_AA.pdb
SAXS ...
ATOMS=1-11878
ONEBEAD
LABEL=saxsdata
GPU
TEMPLATE=template_AA.pdb
SOLVDENS=0.334
SOLVATION_CORRECTION=0.00
After the option flags, the user has to provide the list of q-values for which the corresponding SAS intensity must be calculated. In this example, we provide 121 q-values, from almost zero to 0.3 Å-1 (which corresponds to the maximum momentum transfer available for the ONEBEAD mapping), every 0.0025 Å-1. The more the q-values, the more intensive the calculation. After listing the q-values, the SAXS action must be closed and the intensities printed. In the case of a trajectory, it is possible to select the printing frequency. In the example, the intensities are printed at every simulation step, specifying STRIDE=1. Additional {}
brackets have been added to prevent a readability issue, they are optional to run the code. Save and close the file.
MOLINFO STRUCTURE=template_AA.pdb
SAXS ...
ATOMS=1-11878
ONEBEAD
LABEL=saxsdata
#GPU #This flag requires PLUMED to be compiled with Arrayfire
TEMPLATE=template_AA.pdb
SOLVDENS=0.334
SOLVATION_CORRECTION=0.00
QVALUE1=0.0000000001
QVALUE2=0.0025
QVALUE3=0.0050
QVALUE4=0.0075
QVALUE5=0.0100
QVALUE6=0.0125
QVALUE7=0.0150
QVALUE8=0.0175
QVALUE9=0.0200
QVALUE10=0.0225
QVALUE11=0.0250
QVALUE12=0.0275
QVALUE13=0.0300
QVALUE14=0.0325
QVALUE15=0.0350
QVALUE16=0.0375
QVALUE17=0.0400
QVALUE18=0.0425
QVALUE19=0.0450
QVALUE20=0.0475
QVALUE21=0.0500
QVALUE22=0.0525
QVALUE23=0.0550
QVALUE24=0.0575
QVALUE25=0.0600
QVALUE26=0.0625
QVALUE27=0.0650
QVALUE28=0.0675
QVALUE29=0.0700
QVALUE30=0.0725
QVALUE31=0.0750
QVALUE32=0.0775
QVALUE33=0.0800
QVALUE34=0.0825
QVALUE35=0.0850
QVALUE36=0.0875
QVALUE37=0.0900
QVALUE38=0.0925
QVALUE39=0.0950
QVALUE40=0.0975
QVALUE41=0.1000
QVALUE42=0.1025
QVALUE43=0.1050
QVALUE44=0.1075
QVALUE45=0.1100
QVALUE46=0.1125
QVALUE47=0.1150
QVALUE48=0.1175
QVALUE49=0.1200
QVALUE50=0.1225
QVALUE51=0.1250
QVALUE52=0.1275
QVALUE53=0.1300
QVALUE54=0.1325
QVALUE55=0.1350
QVALUE56=0.1375
QVALUE57=0.1400
QVALUE58=0.1425
QVALUE59=0.1450
QVALUE60=0.1475
QVALUE61=0.1500
QVALUE62=0.1525
QVALUE63=0.1550
QVALUE64=0.1575
QVALUE65=0.1600
QVALUE66=0.1625
QVALUE67=0.1650
QVALUE68=0.1675
QVALUE69=0.1700
QVALUE70=0.1725
QVALUE71=0.1750
QVALUE72=0.1775
QVALUE73=0.1800
QVALUE74=0.1825
QVALUE75=0.1850
QVALUE76=0.1875
QVALUE77=0.1900
QVALUE78=0.1925
QVALUE79=0.1950
QVALUE80=0.1975
QVALUE81=0.2000
QVALUE82=0.2025
QVALUE83=0.2050
QVALUE84=0.2075
QVALUE85=0.2100
QVALUE86=0.2125
QVALUE87=0.2150
QVALUE88=0.2175
QVALUE89=0.2200
QVALUE90=0.2225
QVALUE91=0.2250
QVALUE92=0.2275
QVALUE93=0.2300
QVALUE94=0.2325
QVALUE95=0.2350
QVALUE96=0.2375
QVALUE97=0.2400
QVALUE98=0.2425
QVALUE99=0.2450
QVALUE100=0.2475
QVALUE101=0.2500
QVALUE102=0.2525
QVALUE103=0.2550
QVALUE104=0.2575
QVALUE105=0.2600
QVALUE106=0.2625
QVALUE107=0.2650
QVALUE108=0.2675
QVALUE109=0.2700
QVALUE110=0.2725
QVALUE111=0.2750
QVALUE112=0.2775
QVALUE113=0.2800
QVALUE114=0.2825
QVALUE115=0.2850
QVALUE116=0.2875
QVALUE117=0.2900
QVALUE118=0.2925
QVALUE119=0.2950
QVALUE120=0.2975
QVALUE121=0.3000
... SAXS
PRINT ARG={(saxsdata\.q-.*)} STRIDE=1 FILE=SAXSINT
As an additional example, we provide a SANS action with a different setup. The solvent layer contribution is set to 80 electrons/nm3. Since we want to calculate the SANS intensity, there will be an automatic conversion from electron density to water molecule density. Unlike the previous example, the solvation correction is now activated. We specified the solvent exposed area threshold for a bead to 1 nm2 using the flag SASA_CUTOFF. The bead exposure is evaluated by the LCPO algorithm, and since calculating it for each step of the simulation could be computationally expensive, it is possible to set the frequency for the solvent-accessible surface area estimation with the SOLVATION_STRIDE flag. By default, it is set to 10 steps. Finally, the fraction of deuterated solvent is specified with DEUTER_CONC. This information is also used to configure the implicit hydrogen-deuterium exchange: with a probability equal to the deuterium concentration in the solvent (60% in this case), an exposed bead is considered deuterated.
SANS ...
ATOMS=1-11878
ONEBEAD
LABEL=saxsdata
GPU
TEMPLATE=template_AA.pdb
SOLVDENS=0.334
DEUTER_CONC=0.6
SOLVATION_CORRECTION=0.80
SASA_CUTOFF=1.0
SOLVATION_STRIDE=10
QVALUE1=
QVALUE2=
... SANS
In the following table, a list of the possible flags accepted by the SAXS/SANS action:
Flag | Default value | Description |
---|---|---|
NOPBC | false | Ignore the periodic boundary conditions when calculating distances |
SERIAL | false | Perform the calculation in serial - for debug purpose |
DEVICEID | -1 | Identifier of the GPU to be used |
GPU | false | Calculate SAXS/SANS using ARRAYFIRE on a GPU |
ABSOLUTE | false | Absolute intensity: the intensities for each q-value are not normalized for the intensity at q=0. |
ATOMISTIC | false | Calculate SAXS/SANS using the atomistic model |
MARTINI | false | Calculate SAXS using the Martini model |
ONEBEAD | false | Calculate SAXS/SANS for a single bead model |
TEMPLATE | template.pdb | A PDB file is required for ONEBEAD mapping |
ATOMS | The atoms to be included in the calculation | |
QVALUE | Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, ... | |
PARAMETERS | Used parameter Keywords like PARAMETERS1, PARAMETERS2. These are used to calculate the form factor for the i th atom/bead | |
PARAMETERSFILE | Read the PARAMETERS from a file | |
DEUTER_CONC | 0. | Fraction of deuterated solvent. For SANS only. |
SOLVDENS | 0.334 | Density of the solvent |
SOLVATION_CORRECTION | 0.0 | Solvation layer electron density correction (ONEBEAD only) |
SASA_CUTOFF | 1.0 | SASA value to consider a residue as exposed to the solvent (ONEBEAD only) |
EXPINT | Experimental intensity for a specific q value | |
SOLVATION_STRIDE | 10 | Number of steps between every new residues solvation estimation via LCPO (ONEBEAD only) |
SCALE_EXPINT | 1.0 | Scaling value for experimental data normalization. Cannot be used with ABSOLUTE. |
Before running the driver, it is possible to set the number of CPU cores to be used for the analysis as an environment variable in the terminal where the PLUMED driver will be launched. In the following example 8 cores are used:
export PLUMED_NUM_THREADS=8
Finally, run the driver to analyse a:
plumed driver --plumed plumed.dat --mf_pdb template_AA.pdb
In this case the PDB is the same that is provided to MOLINFO, TEMPLATE and analysed.
plumed driver --plumed plumed.dat --mf_xtc trj.xtc