soprano.calculate.nmr.simpson#
Classes and functions for interfacing with the SIMPSON spin dynamics software.
Functions
|
Load a SIMPSON output .dat file and return it as a numpy array. |
|
Write a .spinsys input file for use with SIMPSON, given the details of a system. |
Classes
|
A class storing parameters and scripts for the production of a SIMPSON input file. |
- class soprano.calculate.nmr.simpson.SimpsonSequence(spinsys_source)[source]#
Bases:
object
A class storing parameters and scripts for the production of a SIMPSON input file. The parameters of the simulation are stored in a dictionary member accessible as .pars and can be set at will.
Args:spinsys_source (str): path of the .spinsys file to use in thesimulation
- soprano.calculate.nmr.simpson.load_simpson_dat(filename)[source]#
Load a SIMPSON output .dat file and return it as a numpy array.
- soprano.calculate.nmr.simpson.write_spinsys(s, isotope_list=None, use_ms=False, ms_iso=False, q_order=0, dip_sel=None, path=None, ref={}, grad=-1.0, obs_nuc=None)[source]#
Write a .spinsys input file for use with SIMPSON, given the details of a system. This is meant to be a low-level function, used by other higher level interfaces in NMRCalculator.
Args:s (ase.Atoms): atomic structure containing the desired spins. Allatoms will be included - if that is not the desiredresult, this should be accomplished by making this asubset of the full structure.isotope_list ([int]): list of isotopes for each element in the system.If left to None, default NMR-active isotopeswill be used.use_ms (bool): if True, include shift interactions from magneticshieldings.ms_iso (bool): if True, all magnetic shieldings will be madeisotropic.q_order(int): if greater than 0, include quadrupolar interactions fromElectric Field Gradients at the given order (1 or 2).dip_sel (AtomSelection): if not None, include dipolar couplingsbetween atoms belonging to this set.path (str): path to save the newly created file to. If not provided,the contents will be simply returned as a string.ref (dict): dictionary of reference values for the calculation. Thisis used to convert from raw shielding values to chemicalshifts. The dictionary should be in the form{element: value}, where value is the reference shieldingfor that element in ppm.grad (float|dict|list): gradient to use when converting from rawshielding values to chemical shifts. If afloat is provided, it will be used for allelements. If a dictionary is provided, itshould be in the form {element: value}, wherevalue is the gradient for that element. If alist is provided, it should be have one valueper site. Defaults to a gradient of -1.0 forall elements.obs_nuc (str) : specify the nucleus to be observed, e.g. 1H.Returns:file_contents (str): spinsys file in string format. Only returned ifno save path is provided.