Skip to main content

A Toolset For Molecular Dynamics

Project description

Python Utilities for Molecular Dynamics

Introduction

MDScribe is a set of command-line scripts and a library written to make setting up the molecular dynamics simulations easier for Desmond, OpenMM, and Amber.

Install

$ pip install mdscribe

Usage for Desmond

from mdscribe.desmond import Multisim

# read template .msj and .cfg
md_msj = Multisim(template="desmond-md.msj")
md_cfg = Multisim(template="desmond-md.cfg")

with open(msj_file,"w") as msj:
    # modify desmond msj template
    md_msj.dot.simulate[-1].cfg_file = cfg_file_basename
    
    # Setting up restraints using the restraints keyword:
    # https://www.schrodinger.com/kb/332119
    if args.posres_force > 0.0:
        # print the restraints in the multisim log file
        md_msj.dot.simulate[-1].print_restraint = 'true'

        # add the new terms defined in "restraints.new" to existing restraints.
        # The default is restraints.existing = ignore which will 
        # delete existing terms before adding any new ones.
        # md_msj.dot.simulate[-1].restraints.existing = 'retain'

        md_msj.dot.simulate[-1].restraints.new = [
            {
                'name'              : 'posre_harm',
                'atoms'             : [ f'"{args.posres}"' ],
                'force_constants'   : [ args.posres_force, ] * 3,
            }
            ]
        # force constants in the x, y, and z direction

    md_msj.write(msj)

with open(cfg_file,"w") as cfg:
    # modify desmond cfg template
    md_cfg.dot.randomize_velocity.seed = random.randint(1000, 9999)
    md_cfg.dot.time = total_simulation_time
    md_cfg.dot.temperature = t_schedule
    md_cfg.dot.trajectory.interval = args.interval
    md_cfg.write(cfg)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdscribe-0.5.4.tar.gz (85.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mdscribe-0.5.4-py3-none-any.whl (102.0 kB view details)

Uploaded Python 3

mdscribe-0.5.4-2-py3-none-any.whl (102.0 kB view details)

Uploaded Python 3

mdscribe-0.5.4-1-py3-none-any.whl (102.0 kB view details)

Uploaded Python 3

File details

Details for the file mdscribe-0.5.4.tar.gz.

File metadata

  • Download URL: mdscribe-0.5.4.tar.gz
  • Upload date:
  • Size: 85.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mdscribe-0.5.4.tar.gz
Algorithm Hash digest
SHA256 b5c7216722fc8531e9a2bff357d1a6b4709ca720201d57c87e5380b423033090
MD5 1bf1cb33dd06d4349d26147dea2ca1c2
BLAKE2b-256 059c31ace73c338503a121638476a96a8724cf02e2e9efb4c703a54bfc39cd46

See more details on using hashes here.

File details

Details for the file mdscribe-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: mdscribe-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 102.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mdscribe-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a87e8cd195f996d1110c78a1c1bed37ea76690d97307bdfdf82aa50f17a55988
MD5 a2b3599a7862c6375adffdb60dd7f430
BLAKE2b-256 c190bab868d7da179b519f66072b059e1b17e67a23882267f7df888ed081cb18

See more details on using hashes here.

File details

Details for the file mdscribe-0.5.4-2-py3-none-any.whl.

File metadata

  • Download URL: mdscribe-0.5.4-2-py3-none-any.whl
  • Upload date:
  • Size: 102.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mdscribe-0.5.4-2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c763a515f828f5635314d9406f02240d7b38dc10f74e835a867eaca2ce673b0
MD5 2a2d8985765b49c8c85fe3c3cb46b7ca
BLAKE2b-256 59d57554014d06b69a4249c3ab1a0579a45a8d3a3ced130523d92cd8db1a1f1c

See more details on using hashes here.

File details

Details for the file mdscribe-0.5.4-1-py3-none-any.whl.

File metadata

  • Download URL: mdscribe-0.5.4-1-py3-none-any.whl
  • Upload date:
  • Size: 102.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mdscribe-0.5.4-1-py3-none-any.whl
Algorithm Hash digest
SHA256 819a2b9e287dedc4163527ff35febc79af41971e1f3cfef4298eed8a775d6123
MD5 a45cc72c33d2a5a8cc88f9a0e167f197
BLAKE2b-256 5a634d967bc10ea93e315bbc458bd3318dc655535486dab56b85b643a94a0b10

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page