Example: Solvation of a Solute

The atom selection feature in X-PLOR can be used to solvate a solute, such as protein or nucleic acid. Suppose the user has set up coordinates and molecular structure files for the solute (“solute.pdb" and “solute.psf") and for a box of water (“water.pdb" and “water.psf" with SEGId “WAT") that is large enough to enclose the solute. The following X-PLOR script will create a composite coordinate and molecular structure file (“overlay.pdb" and “overlay.psf") deleting all waters that penetrate the protein:
structure @solute.psf end
coordinates @solute.pdb 
structure @water.psf end
coordinates @water.pdb 

delete
   selection=
        (  byres 
         (  segid "WAT"  
            and ( ( not segid "WAT" and not ( hydrogen ) ) around 2.6 ) 
        ))
end

write structure output=overlay.psf end
write coordinates output=overlay.pdb end
If the box of water molecules is not large enough, it can be made larger by duplicating and translating the original box (cf. Section 3.10).

Xplor-NIH 2023-11-10