Tutorial 1:
Determining a scattering profile with hySAS

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.

Click on the labels of the actions for more information on what each action computes
tested onv2.9
tested onmaster
MOLINFOThis command is used to provide information on the molecules that are present in your system. More details STRUCTUREa file in pdb format containing a reference structure=template_AA.pdb

SAXSCalculates SAXS intensity. This action has hidden defaults. More details ...
        ATOMSThe atoms to be included in the calculation, e=1-11878
        ONEBEAD calculate SAXS for a single bead model
        LABELa label for the action so that its output can be referenced in the input to other actions=saxsdata
        #GPU            #This flag requires PLUMED to be compiled with Arrayfire
        TEMPLATE A PDB file is required for ONEBEAD mapping=template_AA.pdb
        SOLVDENS Density of the solvent to be used for the correction of atomistic form factors=0.334
        SOLVATION_CORRECTION Solvation layer electron density correction (ONEBEAD only)=0.00

QVALUE1Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0000000001
QVALUE2Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0025
QVALUE3Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0050
QVALUE4Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0075
QVALUE5Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0100
QVALUE6Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0125
QVALUE7Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0150
QVALUE8Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0175
QVALUE9Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0200
QVALUE10Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0225
QVALUE11Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0250
QVALUE12Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0275
QVALUE13Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0300
QVALUE14Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0325
QVALUE15Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0350
QVALUE16Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0375
QVALUE17Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0400
QVALUE18Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0425
QVALUE19Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0450
QVALUE20Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0475
QVALUE21Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0500
QVALUE22Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0525
QVALUE23Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0550
QVALUE24Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0575
QVALUE25Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0600
QVALUE26Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0625
QVALUE27Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0650
QVALUE28Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0675
QVALUE29Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0700
QVALUE30Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0725
QVALUE31Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0750
QVALUE32Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0775
QVALUE33Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0800
QVALUE34Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0825
QVALUE35Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0850
QVALUE36Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0875
QVALUE37Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0900
QVALUE38Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0925
QVALUE39Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0950
QVALUE40Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.0975
QVALUE41Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1000
QVALUE42Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1025
QVALUE43Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1050
QVALUE44Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1075
QVALUE45Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1100
QVALUE46Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1125
QVALUE47Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1150
QVALUE48Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1175
QVALUE49Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1200
QVALUE50Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1225
QVALUE51Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1250
QVALUE52Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1275
QVALUE53Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1300
QVALUE54Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1325
QVALUE55Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1350
QVALUE56Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1375
QVALUE57Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1400
QVALUE58Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1425
QVALUE59Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1450
QVALUE60Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1475
QVALUE61Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1500
QVALUE62Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1525
QVALUE63Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1550
QVALUE64Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1575
QVALUE65Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1600
QVALUE66Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1625
QVALUE67Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1650
QVALUE68Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1675
QVALUE69Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1700
QVALUE70Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1725
QVALUE71Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1750
QVALUE72Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1775
QVALUE73Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1800
QVALUE74Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1825
QVALUE75Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1850
QVALUE76Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1875
QVALUE77Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1900
QVALUE78Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1925
QVALUE79Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1950
QVALUE80Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.1975
QVALUE81Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2000
QVALUE82Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2025
QVALUE83Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2050
QVALUE84Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2075
QVALUE85Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2100
QVALUE86Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2125
QVALUE87Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2150
QVALUE88Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2175
QVALUE89Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2200
QVALUE90Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2225
QVALUE91Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2250
QVALUE92Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2275
QVALUE93Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2300
QVALUE94Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2325
QVALUE95Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2350
QVALUE96Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2375
QVALUE97Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2400
QVALUE98Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2425
QVALUE99Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2450
QVALUE100Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2475
QVALUE101Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2500
QVALUE102Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2525
QVALUE103Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2550
QVALUE104Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2575
QVALUE105Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2600
QVALUE106Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2625
QVALUE107Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2650
QVALUE108Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2675
QVALUE109Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2700
QVALUE110Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2725
QVALUE111Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2750
QVALUE112Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2775
QVALUE113Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2800
QVALUE114Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2825
QVALUE115Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2850
QVALUE116Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2875
QVALUE117Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2900
QVALUE118Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2925
QVALUE119Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2950
QVALUE120Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.2975
QVALUE121Selected scattering lengths in inverse angstroms are given as QVALUE1, QVALUE2, =0.3000

... SAXS

PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file={(saxsdata\.q-.*)} STRIDE the frequency with which the quantities of interest should be output=1 FILEthe name of the file on which to output these quantities=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:

PDB
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.

Trajectory
plumed driver --plumed plumed.dat --mf_xtc trj.xtc
Back to hySAS home