예제 #1
0
파일: plot.py 프로젝트: zizai/fullrmc
import os

# import matplotlib
import matplotlib.pyplot as plt

# fullrmc library imports
from fullrmc import Engine

# dirname
DIR_PATH = os.path.dirname( os.path.realpath(__file__) )
engineFilePath = os.path.join(DIR_PATH, "engine.rmc")



# load
ENGINE = Engine(path=None)
result, mes = ENGINE.is_engine(engineFilePath, mes=True)
if result:
    ENGINE = ENGINE.load(engineFilePath)
    for frame in list(ENGINE.frames):
        ENGINE.set_used_frame(frame)
        GR, SQ, ACN, EMD = ENGINE.constraints
        GR.plot(ax=plt.figure().gca(), intra=False, show=False)
        SQ.plot(ax=plt.figure().gca(), intra=False, show=False)
        if ACN.used:
            ACN.plot(ax=plt.figure().gca(), show=False)
        if ACN.used:
            EMD.plot(ax=plt.figure().gca(), show=False)
    plt.show()
else:
    print(mes)
예제 #2
0
# standard libraries imports
import os

# import matplotlib
import matplotlib.pyplot as plt

# fullrmc library imports
from fullrmc import Engine

# dirname
DIR_PATH = os.path.dirname(os.path.realpath(__file__))
engineFilePath = os.path.join(DIR_PATH, "system.rmc")

# load and plot
ENGINE = Engine(path=None)
result, mes = ENGINE.is_engine(engineFilePath, mes=True)
if result:
    ENGINE = ENGINE.load(engineFilePath)
    PDF, EMD = ENGINE.constraints
    EMD.plot(show=False)
    PDF.plot(intra=False, show=True)
else:
    print mes
예제 #3
0
# standard libraries imports
import os

# fullrmc library imports
from fullrmc import Engine

# dirname
DIR_PATH = os.path.dirname(os.path.realpath(__file__))
engineFilePath = os.path.join(DIR_PATH, "SiOx.rmc")

# load
ENGINE = Engine(path=None)
result, mes = ENGINE.is_engine(engineFilePath, mes=True)
if result:
    ENGINE = ENGINE.load(engineFilePath)
    ENGINE.visualize(boxWidth=0, representationParams="VDW 0.7 100")
else:
    print mes
예제 #4
0
# standard libraries imports
from __future__ import print_function
import os

# fullrmc library imports
from fullrmc import Engine

# dirname
DIR_PATH = os.path.dirname( os.path.realpath(__file__) )
engineFilePath = os.path.join(DIR_PATH, "engine.rmc")

# load
ENGINE = Engine(path=None)
result, mes = ENGINE.is_engine(engineFilePath, mes=True)
if result:
    ENGINE = ENGINE.load(engineFilePath)
    ENGINE.visualize(foldIntoBox=True, representationParams='VDW 0.1 20')
else:
    print(mes)
예제 #5
0
파일: visualize.py 프로젝트: zizai/fullrmc
# standard libraries imports
import os

# fullrmc library imports
from fullrmc import Engine

# dirname
DIR_PATH = os.path.dirname(os.path.realpath(__file__))
engineFilePath = os.path.join(DIR_PATH, "SiOx.rmc")

# load
ENGINE = Engine(path=None)
result, mes = ENGINE.is_engine(engineFilePath, mes=True)
if result:
    ENGINE = ENGINE.load(engineFilePath)
    ENGINE.set_used_frame('size_distribution/7')
    ENGINE.visualize(boxWidth=0, representationParams="VDW 0.4 100")
else:
    print mes